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

ruby-changes:11719

From: mame <ko1@a...>
Date: Thu, 7 May 2009 21:44:44 +0900 (JST)
Subject: [ruby-changes:11719] Ruby:r23362 (trunk): * test/ruby/test_rubyoptions.rb (test_indentation_check): add a test

mame	2009-05-07 21:44:25 +0900 (Thu, 07 May 2009)

  New Revision: 23362

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

  Log:
    * test/ruby/test_rubyoptions.rb (test_indentation_check): add a test
      for indentation check.  [ruby-dev:38382]

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

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 23361)
+++ ChangeLog	(revision 23362)
@@ -1,3 +1,8 @@
+Thu May  7 21:42:51 2009  Yusuke Endoh  <mame@t...>
+
+	* test/ruby/test_rubyoptions.rb (test_indentation_check): add a test
+	  for indentation check.  [ruby-dev:38382]
+
 Thu May  7 16:40:09 2009  Nobuyoshi Nakada  <nobu@r...>
 
 	* array.c (rb_ary_flatten_bang): returns nil if nothing changed.
Index: test/ruby/test_rubyoptions.rb
===================================================================
--- test/ruby/test_rubyoptions.rb	(revision 23361)
+++ test/ruby/test_rubyoptions.rb	(revision 23362)
@@ -284,4 +284,15 @@
     assert_in_out_err(%w(- -#=foo), "#!ruby -s\n", [],
                       /invalid name for global variable - -# \(NameError\)/)
   end
+
+  def test_indentation_check
+    t = Tempfile.new(["test_ruby_test_rubyoption", ".rb"])
+    t.puts "begin"
+    t.puts " end"
+    t.close
+    assert_in_out_err(["-w", t.path], "", [], /:2: warning: mismatched indentations at 'end' with 'begin' at 1/)
+    assert_in_out_err(["-wr", t.path, "-e", ""], "", [], /:2: warning: mismatched indentations at 'end' with 'begin' at 1/)
+  ensure
+    t.close(true) if t
+  end
 end

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

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