Single quotes inside a string literal have to be doubled
This commit is contained in:
Diego Reis
2025-08-01 11:34:31 -03:00
parent d4633415a7
commit 7c70ac2c4a
2 changed files with 27 additions and 28 deletions

View File

@@ -46,34 +46,33 @@ do_execsql_test_on_specific_db {:memory:} alter-table-add-column-typed {
"1|0"
}
# FIXME: #https://github.com/tursodatabase/turso/issues/2390
#do_execsql_test_on_specific_db {:memory:} alter-table-add-column-default {
# CREATE TABLE test (a);
# INSERT INTO test VALUES (1), (2), (3);
#
# ALTER TABLE test ADD b DEFAULT 0.1;
# ALTER TABLE test ADD c DEFAULT 'hello';
# SELECT * FROM test;
#
# CREATE INDEX idx ON test (b);
# SELECT b, c FROM test WHERE b = 0.1;
#
# ALTER TABLE test DROP a;
# SELECT * FROM test;
#
#} {
#"1|0.1|hello"
#"2|0.1|hello"
#"3|0.1|hello"
#
#"0.1|hello"
#"0.1|hello"
#"0.1|hello"
do_execsql_test_on_specific_db {:memory:} alter-table-add-column-default {
CREATE TABLE test (a);
INSERT INTO test VALUES (1), (2), (3);
#"0.1|hello"
#"0.1|hello"
#"0.1|hello"
#}
ALTER TABLE test ADD b DEFAULT 0.1;
ALTER TABLE test ADD c DEFAULT 'hello';
SELECT * FROM test;
CREATE INDEX idx ON test (b);
SELECT b, c FROM test WHERE b = 0.1;
ALTER TABLE test DROP a;
SELECT * FROM test;
} {
"1|0.1|hello"
"2|0.1|hello"
"3|0.1|hello"
"0.1|hello"
"0.1|hello"
"0.1|hello"
"0.1|hello"
"0.1|hello"
"0.1|hello"
}
do_execsql_test_on_specific_db {:memory:} alter-table-drop-column {
CREATE TABLE t (a, b);