case5.0 revision 221646
1221646Sjilles# $FreeBSD: head/tools/regression/bin/sh/builtins/case5.0 221646 2011-05-08 11:32:20Z jilles $ 2221646Sjilles 3221646Sjillesunset LC_ALL 4221646SjillesLC_CTYPE=en_US.UTF-8 5221646Sjillesexport LC_CTYPE 6221646Sjilles 7221646Sjillesc1=e 8221646Sjilles# a umlaut 9221646Sjillesc2=$(printf '\303\244') 10221646Sjilles# euro sign 11221646Sjillesc3=$(printf '\342\202\254') 12221646Sjilles# some sort of 't' outside BMP 13221646Sjillesc4=$(printf '\360\235\225\245') 14221646Sjilles 15221646Sjillesok=0 16221646Sjillescase $c1$c2$c3$c4 in 17221646Sjilles*) ok=1 ;; 18221646Sjillesesac 19221646Sjillesif [ $ok = 0 ]; then 20221646Sjilles echo wrong at $LINENO 21221646Sjilles exit 3 22221646Sjillesfi 23221646Sjilles 24221646Sjillescase $c1$c2$c3$c4 in 25221646Sjilles$c1$c2$c3$c4) ;; 26221646Sjilles*) echo wrong at $LINENO ;; 27221646Sjillesesac 28221646Sjilles 29221646Sjillescase $c1$c2$c3$c4 in 30221646Sjilles"$c1$c2$c3$c4") ;; 31221646Sjilles*) echo wrong at $LINENO ;; 32221646Sjillesesac 33221646Sjilles 34221646Sjillescase $c1$c2$c3$c4 in 35221646Sjilles????) ;; 36221646Sjilles*) echo wrong at $LINENO ;; 37221646Sjillesesac 38221646Sjilles 39221646Sjillescase $c1.$c2.$c3.$c4 in 40221646Sjilles?.?.?.?) ;; 41221646Sjilles*) echo wrong at $LINENO ;; 42221646Sjillesesac 43221646Sjilles 44221646Sjillescase $c1$c2$c3$c4 in 45221646Sjilles[!a][!b][!c][!d]) ;; 46221646Sjilles*) echo wrong at $LINENO ;; 47221646Sjillesesac 48221646Sjilles 49221646Sjillescase $c1$c2$c3$c4 in 50221646Sjilles[$c1][$c2][$c3][$c4]) ;; 51221646Sjilles*) echo wrong at $LINENO ;; 52221646Sjillesesac 53221646Sjilles 54221646Sjillescase $c1$c2$c3$c4 in 55221646Sjilles["$c1"]["$c2"]["$c3"]["$c4"]) ;; 56221646Sjilles*) echo wrong at $LINENO ;; 57221646Sjillesesac 58