Project

General

Profile

Backport #2762 ยป test.rb

test script - JonnyJD (Johannes Dewender), 02/19/2010 07:13 AM

 
1
#!/usr/bin/env ruby
2

    
3
puts "Using ruby #{RUBY_VERSION} on #{RUBY_PLATFORM} from #{RUBY_RELEASE_DATE}"
4
puts "File.read:"
5
File.read('testString.txt').sub!(/foo.*/, "hallo")
6
puts "  success"
7

    
8
puts "backticks:"
9
`cat testString.txt`.sub!(/foo.*/, "hallo")
10
puts "  success"
11

    
12
puts "No problem in this version"