xref: /freebsd/bin/sh/tests/builtins/case5.0 (revision 6ae1554a5d9b318f8ad53ccc39fa5a961403da73)
1# $FreeBSD$
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
58