summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorMartijn van Duren <martijn@cvs.openbsd.org>2018-10-23 08:45:50 +0000
committerMartijn van Duren <martijn@cvs.openbsd.org>2018-10-23 08:45:50 +0000
commita7da4833959f34a6c2c9e791890ff6f9a249a1e0 (patch)
treed99a1f20c52fa5e7b40baf3157c94c2d580f46bf /regress
parent1fbd0b1e1bd4c05bac2d41ff89e83a58cd10b2e6 (diff)
Add regression test for joining on NULL columns.
Diffstat (limited to 'regress')
-rw-r--r--regress/usr.bin/join/Makefile9
-rw-r--r--regress/usr.bin/join/t8.out2
-rw-r--r--regress/usr.bin/join/t8a.in2
-rw-r--r--regress/usr.bin/join/t8b.in2
4 files changed, 13 insertions, 2 deletions
diff --git a/regress/usr.bin/join/Makefile b/regress/usr.bin/join/Makefile
index 949c21cffde..d268d384b0f 100644
--- a/regress/usr.bin/join/Makefile
+++ b/regress/usr.bin/join/Makefile
@@ -1,8 +1,8 @@
-# $OpenBSD: Makefile,v 1.2 2018/10/18 09:40:14 otto Exp $
+# $OpenBSD: Makefile,v 1.3 2018/10/23 08:45:49 martijn Exp $
JION=join
-REGRESS_TARGETS=t1 t2 t3 t4 t5 t6 t7
+REGRESS_TARGETS=t1 t2 t3 t4 t5 t6 t7 t8
t1:
join -t " " -a 1 -a 2 -e '(unknown)' -o 0,1.2,2.2 ${.CURDIR}/phone ${.CURDIR}/fax > ${*}.log
@@ -39,6 +39,11 @@ t7:
@cmp -s ${.CURDIR}/${*}.out ${*}.log || \
(echo "XXX ${*} failed" && false)
+t8:
+ join -j 2 -e empty ${.CURDIR}/t8a.in ${.CURDIR}/t8b.in > ${*}.log
+ @cmp -s ${.CURDIR}/${*}.out ${*}.log || \
+ (echo "XXX ${*} failed" && false)
+
clean:
rm -f *.log
diff --git a/regress/usr.bin/join/t8.out b/regress/usr.bin/join/t8.out
new file mode 100644
index 00000000000..7821f210c27
--- /dev/null
+++ b/regress/usr.bin/join/t8.out
@@ -0,0 +1,2 @@
+empty a a
+d b c
diff --git a/regress/usr.bin/join/t8a.in b/regress/usr.bin/join/t8a.in
new file mode 100644
index 00000000000..a2afabdc014
--- /dev/null
+++ b/regress/usr.bin/join/t8a.in
@@ -0,0 +1,2 @@
+a
+b d
diff --git a/regress/usr.bin/join/t8b.in b/regress/usr.bin/join/t8b.in
new file mode 100644
index 00000000000..00028f4531f
--- /dev/null
+++ b/regress/usr.bin/join/t8b.in
@@ -0,0 +1,2 @@
+a
+c d