Fix obsolete comment regarding FSM truncation.
[PostgreSQL.git] / src / test / locale / de_DE.ISO8859-1 / runall
blobdda030530758bb1a4f901e7f68e34daee80b65d8
1 #! /bin/sh
3 PATH=..:$PATH
5 echo "Testing PostgreSQL compilation..."
7 LC_CTYPE=de_DE.ISO8859-1
8 LC_COLLATE=$LC_CTYPE
9 export LC_CTYPE LC_COLLATE
11 echo "Testing LC_CTYPE..."
12 if ! test-ctype > de-ctype.out; then
13 exit 1
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
25 abort() {
26 [ "$1" ] && echo "$*"
27 exit 1
30 for f in char varchar text; do
31 if echo $f | grep -q char; then
32 ftype="$f(30)"
33 else
34 ftype="$f"
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
43 done
45 for f in char varchar text; do
46 if echo $f | grep -q char; then
47 ftype="$f(30)"
48 else
49 ftype="$f"
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
58 done
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"
64 echo "Finished."