aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/lexer+quoting.test.testscript
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-05-25 13:42:41 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-05-28 10:10:44 +0200
commitbb02e152dc036879ab0b2d1d8aa2cb19084b8e16 (patch)
treeca3f3e950351f5bfadeec5b0ecb31d6c5bae084f /libbuild2/lexer+quoting.test.testscript
parentaf5fa9e744acf6da12f2eab7f44810195c0d3ecd (diff)
Recognize quoting of first character in token
Use this to relax the pattern inclusion/exclusion syntax to only require unquoted +/-.
Diffstat (limited to 'libbuild2/lexer+quoting.test.testscript')
-rw-r--r--libbuild2/lexer+quoting.test.testscript30
1 files changed, 24 insertions, 6 deletions
diff --git a/libbuild2/lexer+quoting.test.testscript b/libbuild2/lexer+quoting.test.testscript
index 0143c90..ddfb0d0 100644
--- a/libbuild2/lexer+quoting.test.testscript
+++ b/libbuild2/lexer+quoting.test.testscript
@@ -56,9 +56,9 @@ EOO
: Token start already quoted
:
$* <'"$foo"' >>EOO
- '' [D/P]
+ '' [D/P/F]
$ [D/C]
- 'foo' [D/P]
+ 'foo' [D/P/F]
<newline>
EOO
@@ -66,7 +66,7 @@ EOO
: Token end still quoted
:
$* <'"foo$"' >>EOO
- 'foo' [D/P]
+ 'foo' [D/P/F]
$ [D/C]
'' [D/P]
<newline>
@@ -87,7 +87,7 @@ EOO
: Token continous with unquoted character
:
$* <'"fo"o' >>EOO
- 'foo' [D/P]
+ 'foo' [D/P/F]
<newline>
EOO
@@ -95,7 +95,7 @@ EOO
: Token continous with unquoted escaped character
:
$* <'"fo"\"' >>EOO
- 'fo"' [D/P]
+ 'fo"' [D/P/F]
<newline>
EOO
}
@@ -104,6 +104,24 @@ EOO
: mixed
:
$* <"\"fo\"'o'" >>EOO
-'foo' [M/P]
+'foo' [M/P/F]
<newline>
EOO
+
+: first
+:
+{
+ : empty-single
+ :
+ $* <"''+foo" >>EOO
+ '+foo' [S/P/F]
+ <newline>
+ EOO
+
+ : empty-double
+ :
+ $* <'""+foo' >>EOO
+ '+foo' [D/P/F]
+ <newline>
+ EOO
+}