5 echo "Testing PostgreSQL compilation..."
7 LC_CTYPE
=de_DE.ISO8859-1
9 export LC_CTYPE LC_COLLATE
11 echo "Testing LC_CTYPE..."
12 if ! test-ctype
> de-ctype.out
; then
15 diff expected
/de-ctype.out de-ctype.out
17 echo "Testing LC_COLLATE..."
18 perl ..
/sort-test.pl test-de-sort.
in > test-de-sort.out
19 diff expected
/test-de-sort.out test-de-sort.out
21 ### If you have Python - uncomment the following two lines
22 #python ../sort-test.py test-de-sort.in > test-de-sort.out
23 #diff expected/test-de-sort.out test-de-sort.out
30 for f
in char varchar text
; do
31 if echo $f |
grep -q char
; then
36 echo "Testing PgSQL: sort on $ftype type..."
38 dropdb testlocale
>/dev
/null
2>&1
39 createdb testlocale || abort
"createdb failed"
40 psql
-d testlocale
-c "CREATE TABLE wordlist (name_en char(20), name_de $ftype);" >/dev
/null
2>&1 || abort
"createtable failed"
41 psql testlocale
< test-de.sql.
in > test-de-
$f.sql.out
2>/dev
/null || abort
"test query failed"
42 diff expected
/test-de-
$f.sql.out test-de-
$f.sql.out
45 for f
in char varchar text
; do
46 if echo $f |
grep -q char
; then
51 echo "Testing PgSQL: upper () on $ftype type..."
53 dropdb testlocale
>/dev
/null
2>&1
54 createdb testlocale || abort
"createdb failed"
55 psql
-d testlocale
-c "CREATE TABLE wordlist (name_en char(20), name_de $ftype);" >/dev
/null
2>&1 || abort
"createtable failed"
56 psql testlocale
< test-de-upper.sql.
in > test-de-upper-
$f.sql.out
2>/dev
/null || abort
"test query failed"
57 diff expected
/test-de-upper-
$f.sql.out test-de-upper-
$f.sql.out
60 echo "Testing PgSQL: select on regexp..."
61 psql testlocale
< test-de-select.sql.
in > test-de-select.sql.out
2>/dev
/null || abort
"select query failed"
62 diff expected
/test-de-select.sql.out test-de-select.sql.out
63 dropdb testlocale || abort
"dropdb failed"