From ef1d280a4c93e4403ad8b2d0975950ab6e16c44b Mon Sep 17 00:00:00 2001 From: akr Date: Fri, 5 Oct 2007 07:43:34 +0000 Subject: * 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 --- bootstraptest/runner.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'bootstraptest/runner.rb') 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 -- cgit v1.2.3