diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/sh.test | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/sh.test b/tests/sh.test index de5a433c..1adbd97f 100644 --- a/tests/sh.test +++ b/tests/sh.test @@ -170,6 +170,9 @@ testing '$(( ) )' 'echo ab$((echo hello) | tr e x)cd' "abhxllocd\n" "" "" # Loops and flow control testing "case" 'for i in A C J B; do case "$i" in A) echo got A ;; B) echo and B ;; C) echo then C ;; *) echo default ;; esac; done' \ "got A\nthen C\ndefault\nand B\n" "" "" +testing "case newlines" \ + $'case i\n\nin\n\na) echo one\n\n;;\n\ni)\n\necho two\n\n;;\n\nesac' \ + "two\n" "" "" testing "continue" 'for i in a b c; do for j in d e f; do echo $i $j; continue 2; done; done' \ "a d\nb d\nc d\n" "" "" @@ -481,3 +484,5 @@ shxpect '${a?b} sets err, stops cmdline eval' \ #HISTCMD - history number # #TMOUT - used by read + +# does not match: ./sh -c 'echo {a..Z}' becomes a ` _ ^ ] \ [ Z |