[前][次][番号順一覧][スレッド一覧]

ruby-changes:2146

From: ko1@a...
Date: 5 Oct 2007 16:43:49 +0900
Subject: [ruby-changes:2146] akr - Ruby:r13637 (trunk): * bootstraptest/runner.rb (assert_not_match): new method.

akr	2007-10-05 16:43:34 +0900 (Fri, 05 Oct 2007)

  New Revision: 13637

  Modified files:
    trunk/ChangeLog
    trunk/bootstraptest/runner.rb
    trunk/bootstraptest/test_knownbug.rb

  Log:
    * bootstraptest/runner.rb (assert_not_match): new method.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=13637&r2=13636
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/bootstraptest/runner.rb?r1=13637&r2=13636
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/bootstraptest/test_knownbug.rb?r1=13637&r2=13636

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 13636)
+++ ChangeLog	(revision 13637)
@@ -1,3 +1,7 @@
+Fri Oct  5 16:42:27 2007  Tanaka Akira  <akr@f...>
+
+	* bootstraptest/runner.rb (assert_not_match): new method.
+
 Fri Oct  5 16:15:52 2007  Akinori MUSHA  <knu@i...>
 
 	* configure.in: Turn on --enable-pthread by default for FreeBSD
Index: bootstraptest/test_knownbug.rb
===================================================================
--- bootstraptest/test_knownbug.rb	(revision 13636)
+++ bootstraptest/test_knownbug.rb	(revision 13637)
@@ -21,3 +21,8 @@
   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
+}
Index: bootstraptest/runner.rb
===================================================================
--- bootstraptest/runner.rb	(revision 13636)
+++ bootstraptest/runner.rb	(revision 13637)
@@ -166,6 +166,18 @@
   }
 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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml

[前][次][番号順一覧][スレッド一覧]