]> git.saurik.com Git - apple/shell_cmds.git/blame - sh/tests/builtins/case5.0
shell_cmds-216.60.1.tar.gz
[apple/shell_cmds.git] / sh / tests / builtins / case5.0
CommitLineData
deb63bfb 1# $FreeBSD: head/bin/sh/tests/builtins/case5.0 221646 2011-05-08 11:32:20Z jilles $
71aad674
A
2
3unset LC_ALL
4LC_CTYPE=en_US.UTF-8
5export LC_CTYPE
6
7c1=e
8# a umlaut
9c2=$(printf '\303\244')
10# euro sign
11c3=$(printf '\342\202\254')
12# some sort of 't' outside BMP
13c4=$(printf '\360\235\225\245')
14
15ok=0
16case $c1$c2$c3$c4 in
17*) ok=1 ;;
18esac
19if [ $ok = 0 ]; then
20 echo wrong at $LINENO
21 exit 3
22fi
23
24case $c1$c2$c3$c4 in
25$c1$c2$c3$c4) ;;
26*) echo wrong at $LINENO ;;
27esac
28
29case $c1$c2$c3$c4 in
30"$c1$c2$c3$c4") ;;
31*) echo wrong at $LINENO ;;
32esac
33
34case $c1$c2$c3$c4 in
35????) ;;
36*) echo wrong at $LINENO ;;
37esac
38
39case $c1.$c2.$c3.$c4 in
40?.?.?.?) ;;
41*) echo wrong at $LINENO ;;
42esac
43
44case $c1$c2$c3$c4 in
45[!a][!b][!c][!d]) ;;
46*) echo wrong at $LINENO ;;
47esac
48
49case $c1$c2$c3$c4 in
50[$c1][$c2][$c3][$c4]) ;;
51*) echo wrong at $LINENO ;;
52esac
53
54case $c1$c2$c3$c4 in
55["$c1"]["$c2"]["$c3"]["$c4"]) ;;
56*) echo wrong at $LINENO ;;
57esac