diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | bootstraptest/runner.rb | 12 | ||||
-rw-r--r-- | bootstraptest/test_knownbug.rb | 5 |
3 files changed, 21 insertions, 0 deletions
@@ -1,3 +1,7 @@ +Fri Oct 5 16:42:27 2007 Tanaka Akira <akr@fsij.org> + + * bootstraptest/runner.rb (assert_not_match): new method. + Fri Oct 5 16:15:52 2007 Akinori MUSHA <knu@iDaemons.org> * configure.in: Turn on --enable-pthread by default for FreeBSD 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 +} |