should be it

This commit is contained in:
2025-10-24 19:21:19 -05:00
parent a4b23fc57c
commit f09560c7b1
14047 changed files with 3161551 additions and 1 deletions

View File

@@ -0,0 +1,69 @@
# name: test/sql/parser/invisible_spaces.test
# description: Test invisible spaces
# group: [parser]
statement ok
PRAGMA enable_verification
# non-breaking space
query I
SELECT 42;
----
42
# test all special unicode spaces
# see https://jkorpela.fi/chars/spaces.html for a list
foreach unicode_space       
query I
SELECT${unicode_space}42;
----
42
# unicode space in strings are not modified
query I
SELECT${unicode_space}strlen('${unicode_space}')>=2;
----
true
# unicode spaces in strings with escaped quotes
query I
SELECT${unicode_space}strlen(' ''${unicode_space}')>=4;
----
true
# unicode space in comment
query I
SELECT${unicode_space} -- ${unicode_space};
42
----
42
# multiple unicode spaces
query I
SELECT${unicode_space}42${unicode_space}${unicode_space}${unicode_space}${unicode_space}${unicode_space}
----
42
# invisible space in identifiers
query I
SELECT a${unicode_space} FROM (SELECT 42) t(a);
----
42
endloop
# the query can still fail even after replacing unicode spaces
statement error
SELEC 
----
<REGEX>:.*Parser Error.*syntax error.*
# only a unicode space
statement ok
 
statement error
S
----
<REGEX>:.*Parser Error.*syntax error.*