xref: /freebsd/bin/sh/tests/builtins/case6.0 (revision d1bdc2821fcd416ab9b238580386eb605a6128d0)
1
2unset LC_ALL
3LC_CTYPE=de_DE.ISO8859-1
4export LC_CTYPE
5
6c1=e
7# o umlaut
8c2=$(printf '\366')
9# non-break space
10c3=$(printf '\240')
11c4=$(printf '\240')
12# $c2$c3$c4 form one utf-8 character
13
14ok=0
15case $c1$c2$c3$c4 in
16*) ok=1 ;;
17esac
18if [ $ok = 0 ]; then
19	echo wrong at $LINENO
20	exit 3
21fi
22
23case $c1$c2$c3$c4 in
24$c1$c2$c3$c4) ;;
25*) echo wrong at $LINENO ;;
26esac
27
28case $c1$c2$c3$c4 in
29"$c1$c2$c3$c4") ;;
30*) echo wrong at $LINENO ;;
31esac
32
33case $c1$c2$c3$c4 in
34????) ;;
35*) echo wrong at $LINENO ;;
36esac
37
38case $c1$c2$c3$c4 in
39[!$c2][!b][!c][!d]) ;;
40*) echo wrong at $LINENO ;;
41esac
42
43case $c1$c2$c3$c4 in
44[$c1][$c2][$c3][$c4]) ;;
45*) echo wrong at $LINENO ;;
46esac
47
48case $c1$c2$c3$c4 in
49["$c1"]["$c2"]["$c3"]["$c4"]) ;;
50*) echo wrong at $LINENO ;;
51esac
52