xref: /freebsd/bin/sh/tests/builtins/case6.0 (revision 0b3105a37d7adcadcb720112fed4dc4e8040be99)
1# $FreeBSD$
2
3unset LC_ALL
4LC_CTYPE=de_DE.ISO8859-1
5export LC_CTYPE
6
7c1=e
8# o umlaut
9c2=$(printf '\366')
10# non-break space
11c3=$(printf '\240')
12c4=$(printf '\240')
13# $c2$c3$c4 form one utf-8 character
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[!$c2][!b][!c][!d]) ;;
41*) echo wrong at $LINENO ;;
42esac
43
44case $c1$c2$c3$c4 in
45[$c1][$c2][$c3][$c4]) ;;
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