Fix expected error message

This commit is contained in:
Jussi Saurio
2025-10-15 09:41:44 +03:00
parent 9bbf3bb780
commit 25cf56b8e8
3 changed files with 16 additions and 20 deletions

View File

@@ -90,26 +90,26 @@ do_execsql_test_on_specific_db {:memory:} offset-expr-int-and-string {
do_execsql_test_in_memory_error_content offset-expr-cannot-be-cast-losslessly-1 {
SELECT 1 LIMIT 3 OFFSET 1.1;
} {"the value in register cannot be cast to integer"}
} {"datatype mismatch"}
do_execsql_test_in_memory_error_content offset-expr-cannot-be-cast-losslessly-2 {
SELECT 1 LIMIT 3 OFFSET 1.1 + 2.2 + 1.9/8;
} {"the value in register cannot be cast to integer"}
} {"datatype mismatch"}
# Return error as float in expression cannot be cast losslessly
do_execsql_test_in_memory_error_content offset-expr-cannot-be-cast-losslessly-3 {
SELECT 1 LIMIT 3 OFFSET 1.1 + 'a';
} {"the value in register cannot be cast to integer"}
} {"datatype mismatch"}
do_execsql_test_in_memory_error_content offset-expr-invalid-data-type-1 {
SELECT 1 LIMIT 3 OFFSET 'a';
} {"the value in register cannot be cast to integer"}
} {"datatype mismatch"}
do_execsql_test_in_memory_error_content offset-expr-invalid-data-type-2 {
SELECT 1 LIMIT 3 OFFSET NULL;
} {"the value in register cannot be cast to integer"}
} {"datatype mismatch"}
# Expression below evaluates to NULL (string → 0)
do_execsql_test_in_memory_error_content offset-expr-invalid-data-type-3 {
SELECT 1 LIMIT 3 OFFSET 1/'iwillbezero ;-; ';
} {"the value in register cannot be cast to integer"}
} {"datatype mismatch"}