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

ruby-changes:25748

From: tadf <ko1@a...>
Date: Thu, 22 Nov 2012 21:37:26 +0900 (JST)
Subject: [ruby-changes:25748] tadf:r37805 (trunk): * test/ruby/test_rubyoptions.rb: added a test.

tadf	2012-11-22 21:36:22 +0900 (Thu, 22 Nov 2012)

  New Revision: 37805

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=37805

  Log:
    * test/ruby/test_rubyoptions.rb: added a test.

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/test_rubyoptions.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 37804)
+++ ChangeLog	(revision 37805)
@@ -1,3 +1,7 @@
+Thu Nov 22 21:34:51 2012  Tadayoshi Funaba  <tadf@d...>
+
+	* test/ruby/test_rubyoptions.rb: added a test.
+
 Thu Nov 22 20:32:07 2012  Tadayoshi Funaba  <tadf@d...>
 
 	* complex.c (string_to_c_strict, string_to_c): check NUL.
Index: test/ruby/test_rubyoptions.rb
===================================================================
--- test/ruby/test_rubyoptions.rb	(revision 37804)
+++ test/ruby/test_rubyoptions.rb	(revision 37805)
@@ -33,6 +33,17 @@
     end
   end
 
+  def test_usage2
+    assert_in_out_err(%w(-h)) do |r, e|
+      assert_operator(r[1..-1].collect{|x| x.size}.max, :<=, 80)
+      assert_equal([], e)
+    end
+    assert_in_out_err(%w(--help)) do |r, e|
+      assert_operator(r[1..-1].collect{|x| x.size}.max, :<=, 80)
+      assert_equal([], e)
+    end
+  end
+
   def test_option_variables
     assert_in_out_err(["-e", 'p [$-p, $-l, $-a]']) do |r, e|
       assert_equal(["[false, false, false]"], r)

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

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