aboutsummaryrefslogtreecommitdiff
path: root/unit-tests/test/script
diff options
context:
space:
mode:
Diffstat (limited to 'unit-tests/test/script')
-rw-r--r--unit-tests/test/script/parser/command-re-parse.test9
-rw-r--r--unit-tests/test/script/parser/here-document.test20
2 files changed, 29 insertions, 0 deletions
diff --git a/unit-tests/test/script/parser/command-re-parse.test b/unit-tests/test/script/parser/command-re-parse.test
new file mode 100644
index 0000000..956052d
--- /dev/null
+++ b/unit-tests/test/script/parser/command-re-parse.test
@@ -0,0 +1,9 @@
+
+# double-quote
+#
+$* <<EOI >>EOO
+x = cmd \\">!\\" "'<!'"
+$x
+EOI
+cmd ">!" "<!"
+EOO
diff --git a/unit-tests/test/script/parser/here-document.test b/unit-tests/test/script/parser/here-document.test
new file mode 100644
index 0000000..7cfa8d4
--- /dev/null
+++ b/unit-tests/test/script/parser/here-document.test
@@ -0,0 +1,20 @@
+
+# quote
+#
+# Note: they are still recognized in eval contexts.
+#
+$* <<EOI >>EOO
+cmd <<EOF
+'single'
+"double"
+b'o't"h"
+('single' "double")
+EOF
+EOI
+cmd <<EOF
+'single'
+"double"
+b'o't"h"
+'single' "double"
+EOF
+EOO