aboutsummaryrefslogtreecommitdiffstats
path: root/bootstraptest
diff options
context:
space:
mode:
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/runner.rb12
-rw-r--r--bootstraptest/test_knownbug.rb5
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
+}