Add test for sqlite FTS3 support.
This commit is contained in:
parent
d04b4a602e
commit
35f7760014
|
@ -144,6 +144,7 @@ add_test_file(utilities_test.cpp false)
|
|||
add_test_file(closure_test.cpp false)
|
||||
add_test_file(concurrentrun_test.cpp false)
|
||||
add_test_file(zeroconf_test.cpp false)
|
||||
add_test_file(sqlite_test.cpp false)
|
||||
|
||||
#if(LINUX AND HAVE_DBUS)
|
||||
# add_test_file(mpris1_test.cpp true)
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
#include "gtest/gtest.h"
|
||||
|
||||
#include <sqlite3.h>
|
||||
|
||||
TEST(SqliteTest, FTS3SupportEnabled) {
|
||||
sqlite3* db = NULL;
|
||||
int rc = sqlite3_open(":memory:", &db);
|
||||
ASSERT_EQ(0, rc);
|
||||
|
||||
char* errmsg = NULL;
|
||||
rc = sqlite3_exec(
|
||||
db, "CREATE VIRTUAL TABLE foo USING fts3(content, TEXT)",
|
||||
NULL, NULL, &errmsg);
|
||||
ASSERT_EQ(0, rc) << errmsg;
|
||||
|
||||
sqlite3_close(db);
|
||||
}
|
Loading…
Reference in New Issue