Denys Vlasenko | 4142f01 | 2017-07-05 22:19:28 +0200 | [diff] [blame^] | 1 | # Testing glob-escaping of every ASCII punctuation char |
| 2 | # Some chars have more than one test |
| 3 | # 21..2f |
| 4 | case '!' in [\!] ) echo ok;; *) echo 'WRONG!';; esac |
| 5 | case '"' in [\"] ) echo ok;; *) echo 'WRONG"';; esac |
| 6 | case '#' in [\#] ) echo ok;; *) echo 'WRONG#';; esac |
| 7 | case '$' in [\$] ) echo ok;; *) echo 'WRONG$';; esac |
| 8 | case '%' in [\%] ) echo ok;; *) echo 'WRONG%';; esac |
| 9 | case '&' in [\&] ) echo ok;; *) echo 'WRONG&';; esac |
| 10 | case "'" in [\'] ) echo ok;; *) echo "WRONG'";; esac |
| 11 | case '(' in [\(] ) echo ok;; *) echo 'WRONG(';; esac |
| 12 | case ')' in [\)] ) echo ok;; *) echo 'WRONG)';; esac |
| 13 | case '*' in [\*] ) echo ok;; *) echo 'WRONG*';; esac |
| 14 | case '+' in [\+] ) echo ok;; *) echo 'WRONG+';; esac |
| 15 | case ',' in [\,] ) echo ok;; *) echo 'WRONG,';; esac |
| 16 | case '-' in [\-] ) echo ok;; *) echo 'WRONG-';; esac |
| 17 | case '-' in [a\-c]) echo ok;; *) echo 'WRONGa\-c';; esac |
| 18 | case '.' in [\.] ) echo ok;; *) echo 'WRONG.';; esac |
| 19 | case '/' in [\/] ) echo ok;; *) echo 'WRONG/';; esac |
| 20 | # 3a..40 |
| 21 | case ':' in [\:] ) echo ok;; *) echo 'WRONG:';; esac |
| 22 | case ';' in [\;] ) echo ok;; *) echo 'WRONG;';; esac |
| 23 | case '<' in [\<] ) echo ok;; *) echo 'WRONG<';; esac |
| 24 | case '=' in [\=] ) echo ok;; *) echo 'WRONG=';; esac |
| 25 | case '>' in [\>] ) echo ok;; *) echo 'WRONG>';; esac |
| 26 | case '?' in [\?] ) echo ok;; *) echo 'WRONG?';; esac |
| 27 | case '@' in [\@] ) echo ok;; *) echo 'WRONG@';; esac |
| 28 | # 5b..60 |
| 29 | case '[' in [\[] ) echo ok;; *) echo 'WRONG[';; esac |
| 30 | case '\' in [\\] ) echo ok;; *) echo 'WRONG\';; esac |
| 31 | case '\' in \\ ) echo ok;; *) echo 'WRONG\\';; esac |
| 32 | case ']' in [\]] ) echo ok;; *) echo 'WRONG]';; esac |
| 33 | case ']' in [a\]]) echo ok;; *) echo 'WRONGa]';; esac |
| 34 | case '^' in [\^] ) echo ok;; *) echo 'WRONG^';; esac |
| 35 | case '_' in [\_] ) echo ok;; *) echo 'WRONG_';; esac |
| 36 | case '`' in [\`] ) echo ok;; *) echo 'WRONG`';; esac |
| 37 | # 7b..7e |
| 38 | case '{' in [\{] ) echo ok;; *) echo 'WRONG{';; esac |
| 39 | case '|' in [\|] ) echo ok;; *) echo 'WRONG|';; esac |
| 40 | case '}' in [\}] ) echo ok;; *) echo 'WRONG}';; esac |
| 41 | case '~' in [\~] ) echo ok;; *) echo 'WRONG~';; esac |