Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit cc08d05

Browse files
Jan WieckJan Wieck
Jan Wieck
authored and
Jan Wieck
committed
Added 2 regression tests for NUMERIC data type.
1. Using 100 digits after decimal point on the default make runtest. 2. Using 1000 digits after decimal point in a new target make bigtest. At the end of 'make runtest', a hint about the new bigtest is printed. Jan
1 parent 78f7ccc commit cc08d05

File tree

7 files changed

+2575
-5
lines changed

7 files changed

+2575
-5
lines changed

src/test/regress/GNUmakefile

+22-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.17 1999/01/17 06:19:57 momjian Exp $
10+
# $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.18 1999/06/10 17:49:29 wieck Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

@@ -37,6 +37,11 @@ ifdef EXPSUFF
3737
INFILES+= $(DLOBJS:.o=$(EXPSUFF))
3838
endif
3939

40+
#
41+
# huge extra tests run in target bigtest
42+
#
43+
EXTRA_TESTS = numeric_big
44+
4045
#
4146
# prepare to run the test (including clean-up after the last run)
4247
#
@@ -66,6 +71,22 @@ ifneq ($(PORTNAME), win)
6671
else
6772
MULTIBYTE=$(MULTIBYTE);export MULTIBYTE; \
6873
./regress.sh $(PORTNAME) 2>&1 | tee regress.out
74+
endif
75+
@echo "ACTUAL RESULTS OF REGRESSION TEST ARE NOW IN FILE regress.out"
76+
@echo ""
77+
@echo "To run the optional huge test(s) too type 'make bigtest'"
78+
@echo "These actually are: $(EXTRA_TESTS)"
79+
80+
#
81+
# run the test including the huge extra tests
82+
#
83+
bigtest: $(INFILES)
84+
ifneq ($(PORTNAME), win)
85+
MULTIBYTE=$(MULTIBYTE);export MULTIBYTE; \
86+
$(SHELL) ./regress.sh $(PORTNAME) $(EXTRA_TESTS) 2>&1 | tee regress.out
87+
else
88+
MULTIBYTE=$(MULTIBYTE);export MULTIBYTE; \
89+
./regress.sh $(PORTNAME) $(EXTRA_TESTS) 2>&1 | tee regress.out
6990
endif
7091
@echo "ACTUAL RESULTS OF REGRESSION TEST ARE NOW IN FILE regress.out"
7192

src/test/regress/expected/numeric.out

+635
Large diffs are not rendered by default.

src/test/regress/expected/numeric_big.out

+625
Large diffs are not rendered by default.

src/test/regress/regress.sh

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/bin/sh
2-
# $Header: /cvsroot/pgsql/src/test/regress/Attic/regress.sh,v 1.28 1999/05/20 16:50:08 wieck Exp $
2+
# $Header: /cvsroot/pgsql/src/test/regress/Attic/regress.sh,v 1.29 1999/06/10 17:49:30 wieck Exp $
33
#
44
if [ $# -eq 0 ]
55
then
6-
echo "Syntax: $0 <portname>"
6+
echo "Syntax: $0 <portname> [extra-tests]"
77
exit 1
88
fi
99

@@ -13,6 +13,9 @@ then
1313
else
1414
HOST=""
1515
fi
16+
portname=$1
17+
export portname
18+
shift
1619

1720
if echo '\c' | grep -s c >/dev/null 2>&1
1821
then
@@ -33,7 +36,7 @@ PGDATESTYLE="Postgres,US"; export PGDATESTYLE
3336
#FRONTEND=monitor
3437
FRONTEND="psql $HOST -n -e -q"
3538

36-
SYSTEM=`../../config.guess | awk -F\- '{ split($3,a,/[0-9]/); printf"%s-%s", $1, a[1] }'`
39+
SYSTEM=`../../config.guess | awk -F\- '{ split($3,a,/[0-9]/); printf"%s-%s", $portname, a[1] }'`
3740

3841
echo "=============== Notes... ================="
3942
echo "postmaster must already be running for the regression tests to succeed."
@@ -72,7 +75,7 @@ fi
7275

7376
echo "=============== running regression queries... ================="
7477
echo "" > regression.diffs
75-
for i in `cat sql/tests` $mbtests
78+
for i in `cat sql/tests` $mbtests $*
7679
do
7780
$ECHO_N "${i} .. " $ECHO_C
7881
$FRONTEND regression < sql/${i}.sql > results/${i}.out 2>&1

src/test/regress/sql/numeric.sql

+649
Large diffs are not rendered by default.

src/test/regress/sql/numeric_big.sql

+636
Large diffs are not rendered by default.

src/test/regress/sql/tests

+1
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,4 @@ rules
6868
limit
6969
plpgsql
7070
temp
71+
numeric

0 commit comments

Comments
 (0)