null+****@clear*****
null+****@clear*****
2010年 7月 5日 (月) 15:58:25 JST
Kouhei Sutou 2010-07-05 06:58:25 +0000 (Mon, 05 Jul 2010) New Revision: ca20bce439445b8f4ecb51367e22164ff9661f17 Log: add a test for nonexistent ID select. Modified files: test/unit/core/test-command-select.c Modified: test/unit/core/test-command-select.c (+20 -0) =================================================================== --- test/unit/core/test-command-select.c 2010-07-05 05:08:59 +0000 (bce2c0c) +++ test/unit/core/test-command-select.c 2010-07-05 06:58:25 +0000 (113f00c) @@ -28,6 +28,7 @@ void test_vector_geo_point(void); void test_vector_geo_point_with_query(void); void test_unmatched_output_columns(void); void test_vector_text(void); +void test_nonexistent_id(void); static gchar *tmp_directory; @@ -250,3 +251,22 @@ test_vector_text(void) "--match_columns articles " "--query groonga")); } + +void +test_nonexistent_id(void) +{ + assert_send_commands("table_create Sites TABLE_PAT_KEY ShortText\n" + "column_create Sites link COLUMN_SCALAR Sites\n" + "load --table Sites\n" + "[\n" + "[\"_key\"],\n" + "[\"groonga.org\"],\n" + "[\"razil.jp\"]\n" + "]"); + cut_assert_equal_string("[[[0]," + "[[\"_id\",\"UInt32\"]," + "[\"_key\",\"ShortText\"]]]]", + send_command("select Sites " + "--output_columns '_id _key' " + "--filter '_id == 100'")); +}