1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

It looks like the multibyte regress tests only work if both

the database encoding and the client encoding match the encoding expected
by the test.  So, force both of them to be set from the MULTIBYTE
environment var.  This allows regress tests to be run successfully in
multibyte environments other than the compiled-in default.
This commit is contained in:
Tom Lane
1999-04-25 23:30:31 +00:00
parent d69344c520
commit 26db818710

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
# $Header: /cvsroot/pgsql/src/test/regress/Attic/regress.sh,v 1.25 1999/04/25 21:56:19 tgl Exp $ # $Header: /cvsroot/pgsql/src/test/regress/Attic/regress.sh,v 1.26 1999/04/25 23:30:31 tgl Exp $
# #
if [ $# -eq 0 ] if [ $# -eq 0 ]
then then
@ -47,7 +47,17 @@ echo "=============== destroying old regression database... ================="
destroydb $HOST regression destroydb $HOST regression
echo "=============== creating new regression database... =================" echo "=============== creating new regression database... ================="
createdb $HOST regression if [ -n "$MULTIBYTE" ];then
mbtests=`echo $MULTIBYTE | tr "[A-Z]" "[a-z]"`
PGCLIENTENCODING="$MULTIBYTE"
export PGCLIENTENCODING
ENCODINGOPT="-E $MULTIBYTE"
else
mbtests=""
unset PGCLIENTENCODING
ENCODINGOPT=""
fi
createdb $ENCODINGOPT $HOST regression
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo createdb failed echo createdb failed
exit 1 exit 1
@ -55,14 +65,6 @@ fi
echo "=============== running regression queries... =================" echo "=============== running regression queries... ================="
echo "" > regression.diffs echo "" > regression.diffs
if [ -n "$MULTIBYTE" ];then
mbtests=`echo $MULTIBYTE | tr "[A-Z]" "[a-z]"`
PGCLIENTENCODING="$MULTIBYTE"
export PGCLIENTENCODING
else
mbtests=""
unset PGCLIENTENCODING
fi
for i in `cat sql/tests` $mbtests for i in `cat sql/tests` $mbtests
do do
$ECHO_N "${i} .. " $ECHO_C $ECHO_N "${i} .. " $ECHO_C