mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-18 09:04:19 +01:00
Fix cli tests
This commit is contained in:
@@ -338,16 +338,14 @@ def test_series():
|
|||||||
|
|
||||||
def test_kv():
|
def test_kv():
|
||||||
ext_path = "target/debug/liblimbo_ext_tests"
|
ext_path = "target/debug/liblimbo_ext_tests"
|
||||||
limbo = TestLimboShell()
|
limbo = TestLimboShell("")
|
||||||
limbo.run_test_fn(
|
limbo.run_test_fn(
|
||||||
"create virtual table t using kv_store;",
|
"create virtual table t using kv_store;",
|
||||||
lambda res: "Virtual table module not found: kv_store" in res,
|
lambda res: "Virtual table module not found: kv_store" in res,
|
||||||
)
|
)
|
||||||
limbo.execute_dot(f".load {ext_path}")
|
limbo.execute_dot(f".load {ext_path}")
|
||||||
limbo.run_test_fn(
|
limbo.debug_print(
|
||||||
"create virtual table t using kv_store;",
|
"create virtual table t using kv_store;",
|
||||||
null,
|
|
||||||
"can create kv_store vtable",
|
|
||||||
)
|
)
|
||||||
limbo.run_test_fn(
|
limbo.run_test_fn(
|
||||||
"insert into t values ('hello', 'world');",
|
"insert into t values ('hello', 'world');",
|
||||||
|
|||||||
@@ -111,7 +111,6 @@ class TestLimboShell:
|
|||||||
if init_commands is None:
|
if init_commands is None:
|
||||||
# Default initialization
|
# Default initialization
|
||||||
init_commands = """
|
init_commands = """
|
||||||
.open :memory:
|
|
||||||
CREATE TABLE users (id INTEGER PRIMARY KEY, first_name TEXT, last_name TEXT, age INTEGER);
|
CREATE TABLE users (id INTEGER PRIMARY KEY, first_name TEXT, last_name TEXT, age INTEGER);
|
||||||
CREATE TABLE products (id INTEGER PRIMARY KEY, name TEXT, price INTEGER);
|
CREATE TABLE products (id INTEGER PRIMARY KEY, name TEXT, price INTEGER);
|
||||||
INSERT INTO users VALUES (1, 'Alice', 'Smith', 30), (2, 'Bob', 'Johnson', 25),
|
INSERT INTO users VALUES (1, 'Alice', 'Smith', 30), (2, 'Bob', 'Johnson', 25),
|
||||||
|
|||||||
Reference in New Issue
Block a user