diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-07-05 23:12:15 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-07-05 23:12:15 +0200 |
commit | bd43c6784fb53826806c7cb51a1ed54e95eb4be9 (patch) | |
tree | 8b250b2eaa4781af90a4c4b6702903b11cdf7f24 /shell/hush_test/hush-quoting | |
parent | 4142f0187dcf8454e8d2a8d16b321dbd573c170e (diff) |
hush: fix quoted_punct.tests failure
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test/hush-quoting')
-rw-r--r-- | shell/hush_test/hush-quoting/quoted_punct.right | 35 | ||||
-rwxr-xr-x | shell/hush_test/hush-quoting/quoted_punct.tests | 41 |
2 files changed, 76 insertions, 0 deletions
diff --git a/shell/hush_test/hush-quoting/quoted_punct.right b/shell/hush_test/hush-quoting/quoted_punct.right new file mode 100644 index 000000000..ab66c3ce0 --- /dev/null +++ b/shell/hush_test/hush-quoting/quoted_punct.right @@ -0,0 +1,35 @@ +ok +ok +ok +ok +ok +ok +ok +ok +ok +ok +ok +ok +ok +ok +ok +ok +ok +ok +ok +ok +ok +ok +ok +ok +ok +ok +ok +ok +ok +ok +ok +ok +ok +ok +ok diff --git a/shell/hush_test/hush-quoting/quoted_punct.tests b/shell/hush_test/hush-quoting/quoted_punct.tests new file mode 100755 index 000000000..83ee40bf4 --- /dev/null +++ b/shell/hush_test/hush-quoting/quoted_punct.tests @@ -0,0 +1,41 @@ +# Testing glob-escaping of every ASCII punctuation char +# Some chars have more than one test +# 21..2f +case '!' in [\!] ) echo ok;; *) echo 'WRONG!';; esac +case '"' in [\"] ) echo ok;; *) echo 'WRONG"';; esac +case '#' in [\#] ) echo ok;; *) echo 'WRONG#';; esac +case '$' in [\$] ) echo ok;; *) echo 'WRONG$';; esac +case '%' in [\%] ) echo ok;; *) echo 'WRONG%';; esac +case '&' in [\&] ) echo ok;; *) echo 'WRONG&';; esac +case "'" in [\'] ) echo ok;; *) echo "WRONG'";; esac +case '(' in [\(] ) echo ok;; *) echo 'WRONG(';; esac +case ')' in [\)] ) echo ok;; *) echo 'WRONG)';; esac +case '*' in [\*] ) echo ok;; *) echo 'WRONG*';; esac +case '+' in [\+] ) echo ok;; *) echo 'WRONG+';; esac +case ',' in [\,] ) echo ok;; *) echo 'WRONG,';; esac +case '-' in [\-] ) echo ok;; *) echo 'WRONG-';; esac +case '-' in [a\-c]) echo ok;; *) echo 'WRONGa\-c';; esac +case '.' in [\.] ) echo ok;; *) echo 'WRONG.';; esac +case '/' in [\/] ) echo ok;; *) echo 'WRONG/';; esac +# 3a..40 +case ':' in [\:] ) echo ok;; *) echo 'WRONG:';; esac +case ';' in [\;] ) echo ok;; *) echo 'WRONG;';; esac +case '<' in [\<] ) echo ok;; *) echo 'WRONG<';; esac +case '=' in [\=] ) echo ok;; *) echo 'WRONG=';; esac +case '>' in [\>] ) echo ok;; *) echo 'WRONG>';; esac +case '?' in [\?] ) echo ok;; *) echo 'WRONG?';; esac +case '@' in [\@] ) echo ok;; *) echo 'WRONG@';; esac +# 5b..60 +case '[' in [\[] ) echo ok;; *) echo 'WRONG[';; esac +case '\' in [\\] ) echo ok;; *) echo 'WRONG\';; esac +case '\' in \\ ) echo ok;; *) echo 'WRONG\\';; esac +case ']' in [\]] ) echo ok;; *) echo 'WRONG]';; esac +case ']' in [a\]]) echo ok;; *) echo 'WRONGa]';; esac +case '^' in [\^] ) echo ok;; *) echo 'WRONG^';; esac +case '_' in [\_] ) echo ok;; *) echo 'WRONG_';; esac +case '`' in [\`] ) echo ok;; *) echo 'WRONG`';; esac +# 7b..7e +case '{' in [\{] ) echo ok;; *) echo 'WRONG{';; esac +case '|' in [\|] ) echo ok;; *) echo 'WRONG|';; esac +case '}' in [\}] ) echo ok;; *) echo 'WRONG}';; esac +case '~' in [\~] ) echo ok;; *) echo 'WRONG~';; esac |