aboutsummaryrefslogtreecommitdiff
path: root/unit-tests/test/script/lexer/script-line.test
diff options
context:
space:
mode:
Diffstat (limited to 'unit-tests/test/script/lexer/script-line.test')
-rw-r--r--unit-tests/test/script/lexer/script-line.test68
1 files changed, 68 insertions, 0 deletions
diff --git a/unit-tests/test/script/lexer/script-line.test b/unit-tests/test/script/lexer/script-line.test
index b4fe3ef..a217591 100644
--- a/unit-tests/test/script/lexer/script-line.test
+++ b/unit-tests/test/script/lexer/script-line.test
@@ -16,3 +16,71 @@ $* <";" >>EOO # semi-only
;
<newline>
EOO
+
+$* <"cmd <+ 1>+" >>EOO # pass-redirect
+'cmd'
+<+
+'1'
+>+
+<newline>
+EOO
+
+$* <"cmd <- 1>-" >>EOO # null-redirect
+'cmd'
+<-
+'1'
+>-
+<newline>
+EOO
+
+$* <"cmd <a 1>b" >>EOO # str-redirect
+'cmd'
+<
+'a'
+'1'
+>
+'b'
+<newline>
+EOO
+
+$* <"cmd <:a 1>:b" >>EOO # str-nn-redirect
+'cmd'
+<:
+'a'
+'1'
+>:
+'b'
+<newline>
+EOO
+
+$* <"cmd <<EOI 1>>EOO" >>EOO # doc-redirect
+'cmd'
+<<
+'EOI'
+'1'
+>>
+'EOO'
+<newline>
+EOO
+
+$* <"cmd <<:EOI 1>>:EOO" >>EOO # doc-nn-redirect
+'cmd'
+<<:
+'EOI'
+'1'
+>>:
+'EOO'
+<newline>
+EOO
+
+$* <"cmd <<<in >>>out 2>>>&err" >>EOO # file-redirect
+'cmd'
+<<<
+'in'
+>>>
+'out'
+'2'
+>>>&
+'err'
+<newline>
+EOO