blob: d0c3599272506d33a24507845664d57a309dafef [file] [log] [blame]
Denys Vlasenko8de5b9f2018-02-13 14:43:29 +01001# Case argument is globbed, match patterns are not.
2# This caught some bugs in the past.
3
4case z in
5\z ) echo ok1 ;;
6* ) echo BUG ;;
7esac
8case \z in
9z ) echo ok2 ;;
10* ) echo BUG ;;
11esac
12case \z in
13\z ) echo ok3 ;;
14* ) echo BUG ;;
15esac
16case z in
17\z ) echo ok4 ;;
18* ) echo BUG ;;
19esac
20case \\z in
21\\z ) echo ok5 ;;
22* ) echo BUG ;;
23esac
24echo Ok:$?
25
26case "\z" in
27"\z" ) echo ok6 ;;
28* ) echo BUG ;;
29esac
30case "\\z" in
31"\\z" ) echo ok7 ;;
32* ) echo BUG ;;
33esac
34case "\\\z" in
35"\\\z") echo ok8 ;;
36* ) echo BUG ;;
37esac
38echo Ok:$?