add test for command line tool

Change-Id: I5ec7c3284ea2cf01b363089cbc93e063ac034dac
diff --git a/tests/basic_test.c b/tests/basic_test.c
index 929f216..c4491e3 100644
--- a/tests/basic_test.c
+++ b/tests/basic_test.c
@@ -127,6 +127,12 @@
   TEST_MSG("Unexpected word id: %lu", id);
 }
 
+void test_collocatordb_query_command_line_tool() {
+  int result = system("../build/collocatordb_query ../tests/data/wpd19_10000 ist > /dev/null 2>&1");
+  TEST_CHECK(result == 0);
+  TEST_MSG("collectordb_query command failed with result: %d", result);
+}
+
 TEST_LIST = {
     { "open database for reading", test_open_db },
     { "get word", test_get_word },
@@ -136,5 +142,6 @@
     { "writing", test_writing },
     { "version function", test_version_function },
     { "get word id", test_get_word_id },
+    { "collocatordb_query command line tool", test_collocatordb_query_command_line_tool},
     { NULL, NULL }
 };