diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-10-05 07:43:34 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-10-05 07:43:34 +0000 |
commit | ef1d280a4c93e4403ad8b2d0975950ab6e16c44b (patch) | |
tree | b8c2bb030399f8d1b423d416df65844ba389bbb7 /bootstraptest | |
parent | 4005af452020c6b0061c67363076f156a145e747 (diff) | |
download | ruby-ef1d280a4c93e4403ad8b2d0975950ab6e16c44b.tar.gz |
* bootstraptest/runner.rb (assert_not_match): new method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest')
-rw-r--r-- | bootstraptest/runner.rb | 12 | ||||
-rw-r--r-- | bootstraptest/test_knownbug.rb | 5 |
2 files changed, 17 insertions, 0 deletions
diff --git a/bootstraptest/runner.rb b/bootstraptest/runner.rb index 7b971dd500..fd921f4675 100644 --- a/bootstraptest/runner.rb +++ b/bootstraptest/runner.rb @@ -166,6 +166,18 @@ def assert_match(expected_pattern, testsrc, message = '') } end +def assert_not_match(unexpected_pattern, testsrc, message = '') + newtest + assert_check(testsrc, message) {|result| + if unexpected_pattern !~ result + nil + else + desc = "#{unexpected_pattern.inspect} expected to be !~\n#{result.inspect}" + pretty(testsrc, desc, result) + end + } +end + def assert_normal_exit(testsrc, message = '') newtest $stderr.puts "\##{@count} #{@location}" if @verbose diff --git a/bootstraptest/test_knownbug.rb b/bootstraptest/test_knownbug.rb index 813c9427ef..ba91d5ca9f 100644 --- a/bootstraptest/test_knownbug.rb +++ b/bootstraptest/test_knownbug.rb @@ -21,3 +21,8 @@ assert_normal_exit %q{ require 'continuation' Fiber.new{ callcc{|c| @c = c } }.resume }, '[ruby-dev:31913]' + +assert_not_match /method_missing/, %q{ + STDERR.reopen(STDOUT) + variable_or_mehtod_not_exist +} |