aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/build/script/parser+line.test.testscript
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/build/script/parser+line.test.testscript')
-rw-r--r--libbuild2/build/script/parser+line.test.testscript39
1 files changed, 39 insertions, 0 deletions
diff --git a/libbuild2/build/script/parser+line.test.testscript b/libbuild2/build/script/parser+line.test.testscript
new file mode 100644
index 0000000..df4e77b
--- /dev/null
+++ b/libbuild2/build/script/parser+line.test.testscript
@@ -0,0 +1,39 @@
+# file : libbuild2/build/script/parser+line.test.testscript
+# license : MIT; see accompanying LICENSE file
+
+test.options += -d
+
+#\
+: if-else
+:
+$* <<EOI >|
+ if foo
+ bar
+ elif fox
+ baz
+ end
+ if! foo
+ bar
+ elif! fox
+ baz
+ end
+ EOI
+
+: command
+:
+$* <<EOI >|
+ foo >| 2>- &a &?b
+ foo >=c 2>~/error:.*/ &!c
+ foo >>:/~%EOF%
+ %.*
+ abc
+ %xyz.*%
+ EOF
+ EOI
+
+: quoting
+:
+$* <<EOI >|
+ foo 'bar' "baz" '' ""
+ EOI
+#\