gaulthiergain-tools/testfiles/test_sqlite.json

57 lines
1.8 KiB
JSON
Raw Normal View History

2020-09-16 09:14:26 +02:00
{
"typeTest": "stdin",
"timeMsCommand": 1000,
"listCommands": [
"create table tbl1(one varchar(10), two smallint);",
"insert into tbl1 values('hello!',10);",
"insert into tbl1 values('goodbye', 20);",
"select * from tbl1;",
".mode list",
"select * from tbl1;",
".separator ",
"select * from tbl1;",
".mode quote",
"select * from tbl1;",
".mode line",
"select * from tbl1;",
".mode column",
"select * from tbl1;",
".width 12 6",
"select * from tbl1;",
".header off",
"select * from tbl1;",
".mode insert new_table",
"select * from tbl1;",
".mode list",
".separator |",
".output test_file_1.txt",
"select * from tbl1;",
"SELECT * FROM tbl1;",
".once -x",
"SELECT * FROM tbl1;",
"CREATE TABLE images(name TEXT, type TEXT, img BLOB);",
"UPDATE docs SET body=edit(body) WHERE name='report-15';",
"UPDATE pics SET img=edit(img,'gimp') WHERE id='pic-1542';",
"SELECT length(edit(img,'gimp')) WHERE id='pic-1542';",
".header on",
".mode csv",
"SELECT * FROM tbl1;",
".system export.csv",
"create table tab1(one varchar(10), two smallint);",
".import export.csv tab1",
".save ex1.db",
".help",
"CREATE TABLE selftest(tno INTEGER PRIMARY KEY, op TEXT, cmd TEXT, ans TEXT);",
"CREATE TABLE tbl2 (f1 varchar(30) primary key,f2 text,f3 real);",
"insert into tbl1 values(10, 'hello!',10);",
"insert into tbl2 values(10, 'hello!',10);",
"UPDATE tbl2 SET f2=\",salut\", WHERE f2='hello!';",
"select * from tbl2;",
"UPDATE tbl2 SET text=edit(text, \"salut\",) WHERE text='hello!';",
"select * from tbl2;",
"DELETE tbl2 WHERE f2=\"salut\";",
"DELETE FROM tbl2 WHERE f2=\"salut\",;",
"DROP TABLE tbl2;",
".quit"
]
}