mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 18:18:03 +00:00
testing: Fix do_execsql_test() for JSON
The current scheme of combining SQL statements corrupts JSON by dropping the curly braces. Fix the issue by passing the SQL statement almost as-is to the database. However, for ".schema" to work, we need to trim extra whitespace.
This commit is contained in:
parent
0d5b4814ad
commit
5251f7a2f8
2 changed files with 1 additions and 1 deletions
0
testing/cmdlineshell.test
Normal file → Executable file
0
testing/cmdlineshell.test
Normal file → Executable file
|
@ -18,7 +18,7 @@ proc run_test {sqlite_exec sql expected_output} {
|
|||
|
||||
proc do_execsql_test {test_name sql_statements expected_outputs} {
|
||||
puts "Running test: $test_name"
|
||||
set combined_sql [join $sql_statements " "]
|
||||
set combined_sql [string trim $sql_statements]
|
||||
set combined_expected_output [join $expected_outputs "\n"]
|
||||
run_test $::sqlite_exec $combined_sql $combined_expected_output
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue