[Groonga-commit] groonga/groonga-command [master] Support empty line

Zurück zum Archiv-Index

Kouhei Sutou null+****@clear*****
Tue Nov 27 16:33:33 JST 2012


Kouhei Sutou	2012-11-27 16:33:33 +0900 (Tue, 27 Nov 2012)

  New Revision: 4c60b77f9400ccad72fd98429f56bb1b5ad8afac
  https://github.com/groonga/groonga-command/commit/4c60b77f9400ccad72fd98429f56bb1b5ad8afac

  Log:
    Support empty line

  Modified files:
    test/test-parser.rb

  Modified: test/test-parser.rb (+13 -0)
===================================================================
--- test/test-parser.rb    2012-11-27 16:31:57 +0900 (6d617bd)
+++ test/test-parser.rb    2012-11-27 16:33:33 +0900 (4de167f)
@@ -94,6 +94,19 @@ class ParserTest < Test::Unit::TestCase
           @parser.finish
           assert_equal("status", parsed_command.name)
         end
+
+        def test_empty_line
+          parsed_command = nil
+          @parser.on_command do |command|
+            parsed_command = command
+          end
+
+          @parser << "\n"
+          assert_nil(parsed_command)
+
+          @parser << "status\n"
+          assert_equal("status", parsed_command.name)
+        end
       end
 
       class LoadTest < self
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Zurück zum Archiv-Index