should be it
This commit is contained in:
37
external/duckdb/test/sql/pragma/test_pragma_parsing.test
vendored
Normal file
37
external/duckdb/test/sql/pragma/test_pragma_parsing.test
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
# name: test/sql/pragma/test_pragma_parsing.test
|
||||
# description: Test PRAGMA parsing
|
||||
# group: [pragma]
|
||||
|
||||
# Almost pragma but not quite
|
||||
statement error
|
||||
PRAG
|
||||
----
|
||||
Parser Error: syntax error at or near "PRAG"
|
||||
|
||||
# Pragma without a keyword
|
||||
statement error
|
||||
PRAGMA
|
||||
----
|
||||
<REGEX>:.*Parser Error.*syntax error at end of input.*
|
||||
|
||||
# Unknown pragma error
|
||||
statement error
|
||||
PRAGMA random_unknown_pragma
|
||||
----
|
||||
|
||||
# Call pragma in wrong way
|
||||
statement error
|
||||
PRAGMA table_info = 3
|
||||
----
|
||||
|
||||
statement ok
|
||||
CREATE TABLE integers(i INTEGER)
|
||||
|
||||
# Now it should work
|
||||
statement ok
|
||||
PRAGMA table_info('integers');
|
||||
|
||||
# Parsing also works with extra spaces
|
||||
statement ok
|
||||
PRAGMA table_info ('integers');
|
||||
|
||||
Reference in New Issue
Block a user