[Groonga-commit] groonga/groonga-command at b3dbe32 [fix-travis-ci-error] test: add --columns with --values

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Jan 13 17:30:20 JST 2016


Kouhei Sutou	2012-11-28 12:57:18 +0900 (Wed, 28 Nov 2012)

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

  Message:
    test: add --columns with --values

  Modified files:
    test/test-parser.rb

  Modified: test/test-parser.rb (+19 -1)
===================================================================
--- test/test-parser.rb    2012-11-28 12:54:49 +0900 (41b89b3)
+++ test/test-parser.rb    2012-11-28 12:57:18 +0900 (5a1734c)
@@ -129,7 +129,25 @@ class ParserTest < Test::Unit::TestCase
 
         class InlineTest < self
           class BracketTest < self
-            def test_bracket
+            def test_have_columns
+              command_line =
+                "load " +
+                  "--columns '_key, name' " +
+                  "--values '[[\"alice\", \"Alice\"]]' " +
+                  "--table Users"
+              @parser << command_line
+              assert_equal([], @events)
+              @parser << "\n"
+              assert_equal([
+                             [:load_start, command_line],
+                             [:load_header, command_line, ["_key", "name"]],
+                             [:load_value, command_line, ["alice", "Alice"]],
+                             [:load_complete, command_line],
+                           ],
+                           @events)
+            end
+
+            def test_no_columns
               command_line = "load --values '[[\"_key\"], [1]]' --table IDs"
               @parser << command_line
               assert_equal([], @events)
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index