Suitable error message for empty statements

This commit is contained in:
Alexey Romanov
2011-01-24 12:38:38 +03:00
parent 7134209896
commit 9d138346cd
2 changed files with 13 additions and 3 deletions

View File

@@ -61,6 +61,10 @@ basic_functionality() ->
AbbyOnly = [{1, <<"abby">>, 20, 2000}],
TableInfo = [{id, integer, [primary_key]}, {name, text, [not_null, unique]}, {age, integer}, {wage, integer}],
drop_all_tables(ct),
?debugMsg("Error message \"sqlite3 driver error: empty statement\" should be shown..."),
?assertEqual(
{error, 21, "empty statement"},
sqlite3:sql_exec(ct, "-- Comment")),
?assertEqual(
[],
sqlite3:list_tables(ct)),