47 fi
48
49 JAVA=$TESTJAVA/bin/java
50
51 tolower() {
52 echo "$1" | tr '[A-Z]' '[a-z]'
53 }
54
55 go() {
56
57 L="$1"
58 shift
59 if [ "x`locale -a | grep \^$L\$`" != "x$L" ]; then
60 echo "$L: Locale not supported, skipping..."
61 return
62 fi
63
64 ecs="$1"; shift
65
66 echo -n "$L: "
67 cs="`LC_ALL=$L $JAVA -cp $TESTCLASSES Default`"
68 if [ $? != 0 ]; then
69 exit 1
70 elif [ "`tolower $cs`" != "`tolower $ecs`" ]; then
71 echo "$cs, expected $ecs -- ERROR"
72 exit 1
73 else
74 echo "$cs, as expected"
75 fi
76
77 }
78
79 go en_US iso-8859-1
80 go ja_JP.utf8 utf-8
81 go tr_TR iso-8859-9
82 go C us-ascii
83
84 if [ "$s" = Linux ]; then
85 go ja_JP x-euc-jp-linux
86 go ja_JP.eucjp x-euc-jp-linux
87 go ja_JP.ujis x-euc-jp-linux
|
47 fi
48
49 JAVA=$TESTJAVA/bin/java
50
51 tolower() {
52 echo "$1" | tr '[A-Z]' '[a-z]'
53 }
54
55 go() {
56
57 L="$1"
58 shift
59 if [ "x`locale -a | grep \^$L\$`" != "x$L" ]; then
60 echo "$L: Locale not supported, skipping..."
61 return
62 fi
63
64 ecs="$1"; shift
65
66 echo -n "$L: "
67 cs="`LC_ALL=$L $JAVA ${TESTVMOPTS} -cp $TESTCLASSES Default`"
68 if [ $? != 0 ]; then
69 exit 1
70 elif [ "`tolower $cs`" != "`tolower $ecs`" ]; then
71 echo "$cs, expected $ecs -- ERROR"
72 exit 1
73 else
74 echo "$cs, as expected"
75 fi
76
77 }
78
79 go en_US iso-8859-1
80 go ja_JP.utf8 utf-8
81 go tr_TR iso-8859-9
82 go C us-ascii
83
84 if [ "$s" = Linux ]; then
85 go ja_JP x-euc-jp-linux
86 go ja_JP.eucjp x-euc-jp-linux
87 go ja_JP.ujis x-euc-jp-linux
|