Fix obsolete comment regarding FSM truncation.
[PostgreSQL.git] / src / test / locale / koi8-to-win1251 / runall
blobb5a16493f9ee14a1d634c8d738373fba7ab763c9
1 #! /bin/sh
3 PATH=..:$PATH
5 echo "Testing PostgreSQL compilation..."
7 LC_CTYPE=ru_RU.KOI8-R
8 LC_COLLATE=$LC_CTYPE
9 export LC_CTYPE LC_COLLATE
11 PGCLIENTENCODING=win
12 export PGCLIENTENCODING
14 echo "Testing LC_COLLATE..."
15 perl ../sort-test.pl test-koi8-sort.in > test-koi8-sort.out
16 diff expected/test-koi8-sort.out test-koi8-sort.out
18 ### If you have Python - uncomment the following two lines
19 #python ../sort-test.py test-koi8-sort.in > test-koi8-sort.out
20 #diff expected/test-koi8-sort.out test-koi8-sort.out
23 abort() {
24 [ "$1" ] && echo "$*"
25 exit 1
28 for f in char varchar text; do
29 if echo $f | grep -q char; then
30 ftype="$f(60)"
31 else
32 ftype="$f"
34 echo "Testing PgSQL: sort on $ftype type..."
36 dropdb testlocale >/dev/null 2>&1
37 createdb testlocale || abort "createdb failed"
38 psql -d testlocale -c "CREATE TABLE usastates (abbrev char(2), name_en char(20), name_ru $ftype);" >/dev/null 2>&1 || abort "createtable failed"
39 psql testlocale < test-koi8.sql.in > test-koi8-$f.sql.out 2>/dev/null || abort "test query failed"
40 diff expected/test-koi8-$f.sql.out test-koi8-$f.sql.out
41 done
42 echo "Testing PgSQL: select on regexp..."
43 psql testlocale < test-koi8-select.sql.in > test-koi8-select.sql.out 2>/dev/null || abort "select query failed"
44 diff expected/test-koi8-select.sql.out test-koi8-select.sql.out
45 dropdb testlocale || abort "dropdb failed"
46 echo "Finished."