Fix obsolete comment regarding FSM truncation.
[PostgreSQL.git] / src / test / mb / mbregress.sh
blob28fdf5937718f298e2ccbb56ad1648d09c727393
1 #! /bin/sh
2 # $PostgreSQL$
4 if echo '\c' | grep -s c >/dev/null 2>&1
5 then
6 ECHO_N="echo -n"
7 ECHO_C=""
8 else
9 ECHO_N="echo"
10 ECHO_C='\c'
13 if [ ! -d results ];then
14 mkdir results
17 dropdb utf8
18 createdb -E UTF8 utf8
20 PSQL="psql -n -e -q"
21 tests="euc_jp sjis euc_kr euc_cn euc_tw big5 utf8 mule_internal"
22 unset PGCLIENTENCODING
23 for i in $tests
25 $ECHO_N "${i} .. " $ECHO_C
27 if [ $i = sjis ];then
28 PGCLIENTENCODING=SJIS
29 export PGCLIENTENCODING
30 $PSQL euc_jp < sql/sjis.sql > results/sjis.out 2>&1
31 unset PGCLIENTENCODING
32 elif [ $i = big5 ];then
33 PGCLIENTENCODING=BIG5
34 export PGCLIENTENCODING
35 $PSQL euc_tw < sql/big5.sql > results/big5.out 2>&1
36 unset PGCLIENTENCODING
37 else
38 dropdb $i >/dev/null 2>&1
39 createdb -E `echo $i | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` $i >/dev/null
40 $PSQL $i < sql/${i}.sql > results/${i}.out 2>&1
43 if [ -f expected/${i}-${SYSTEM}.out ]
44 then
45 EXPECTED="expected/${i}-${SYSTEM}.out"
46 else
47 EXPECTED="expected/${i}.out"
50 if [ `diff ${EXPECTED} results/${i}.out | wc -l` -ne 0 ]
51 then
52 ( diff -wC3 ${EXPECTED} results/${i}.out; \
53 echo ""; \
54 echo "----------------------"; \
55 echo "" ) >> regression.diffs
56 echo failed
57 else
58 echo ok
60 done