mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-31 03:27:40 +01:00
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)
|
||||
|
17
tests/sqlite_test.cpp
Normal file
17
tests/sqlite_test.cpp
Normal file
@ -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…
x
Reference in New Issue
Block a user