summaryrefslogtreecommitdiff
path: root/shell/hush_test/hush-quoting/bkslash_case1.tests
blob: d0c3599272506d33a24507845664d57a309dafef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Case argument is globbed, match patterns are not.
# This caught some bugs in the past.

case z in
\z  ) echo ok1 ;;
*   ) echo BUG ;;
esac
case \z in
z   ) echo ok2 ;;
*   ) echo BUG ;;
esac
case \z in
\z  ) echo ok3 ;;
*   ) echo BUG ;;
esac
case z in
\z  ) echo ok4 ;;
*   ) echo BUG ;;
esac
case \\z in
\\z ) echo ok5 ;;
*   ) echo BUG ;;
esac
echo Ok:$?

case "\z" in
"\z"  ) echo ok6 ;;
*     ) echo BUG ;;
esac
case "\\z" in
"\\z" ) echo ok7 ;;
*     ) echo BUG ;;
esac
case "\\\z" in
"\\\z") echo ok8 ;;
*     ) echo BUG ;;
esac
echo Ok:$?