5
echo "Testing PostgreSQL compilation..."
9
export LC_CTYPE LC_COLLATE
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
28
for f in char varchar text; do
29
if echo $f | grep -q char; then
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
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"