Kouhei Sutou
null+****@clear*****
Wed Nov 28 12:57:18 JST 2012
Kouhei Sutou 2012-11-28 12:57:18 +0900 (Wed, 28 Nov 2012) New Revision: b3dbe3219f9c467879e96a381648a17675dc32fb https://github.com/groonga/groonga-command/commit/b3dbe3219f9c467879e96a381648a17675dc32fb Log: 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