mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-23 00:45:37 +01:00
add test
This commit is contained in:
@@ -458,3 +458,26 @@ do_execsql_test_skip_lines_on_specific_db 1 {:memory:} double-quote-inner-quotes
|
||||
SELECT id, content FROM inner_quotes_test ORDER BY id;
|
||||
} {1|"foo"
|
||||
2|'bar'}
|
||||
|
||||
# regression test for incorrect order of column in insert
|
||||
do_execsql_test_on_specific_db {:memory:} insert-tricky-column-order-values {
|
||||
create table t(x, y, z);
|
||||
insert into t(z, x) values (1, 2), (3, 4);
|
||||
insert into t(y, z) values (5, 6), (7, 8);
|
||||
select * from t;
|
||||
} {2||1
|
||||
4||3
|
||||
|5|6
|
||||
|7|8}
|
||||
|
||||
do_execsql_test_on_specific_db {:memory:} insert-tricky-column-order-table {
|
||||
create table t(x, y, z);
|
||||
create table q(x, y, z);
|
||||
insert into q values (1, 2, 3), (4, 5, 6);
|
||||
insert into t(z, x) select y, x from q;
|
||||
insert into t(y, z) select z, y from q;
|
||||
select * from t;
|
||||
} {1||2
|
||||
4||5
|
||||
|3|2
|
||||
|6|5}
|
||||
|
||||
Reference in New Issue
Block a user