summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormartijn <martijn@openbsd.org>2018-11-06 13:59:09 +0000
committermartijn <martijn@openbsd.org>2018-11-06 13:59:09 +0000
commit34fb2a4270cac60fc325686634b0cf694cc0a4ff (patch)
tree2cd48a5cb789c9a32b20b79c28923a6829eab7d5
parentAllow join(1) to join on a multibyte separator. (diff)
downloadwireguard-openbsd-34fb2a4270cac60fc325686634b0cf694cc0a4ff.tar.xz
wireguard-openbsd-34fb2a4270cac60fc325686634b0cf694cc0a4ff.zip
Regression test for UTF-8 separator for join(1).
-rw-r--r--regress/usr.bin/join/Makefile9
-rw-r--r--regress/usr.bin/join/t9.out1
-rw-r--r--regress/usr.bin/join/t9a.in1
-rw-r--r--regress/usr.bin/join/t9b.in1
4 files changed, 10 insertions, 2 deletions
diff --git a/regress/usr.bin/join/Makefile b/regress/usr.bin/join/Makefile
index d268d384b0f..fc775606b49 100644
--- a/regress/usr.bin/join/Makefile
+++ b/regress/usr.bin/join/Makefile
@@ -1,8 +1,8 @@
-# $OpenBSD: Makefile,v 1.3 2018/10/23 08:45:49 martijn Exp $
+# $OpenBSD: Makefile,v 1.4 2018/11/06 13:59:09 martijn Exp $
JION=join
-REGRESS_TARGETS=t1 t2 t3 t4 t5 t6 t7 t8
+REGRESS_TARGETS=t1 t2 t3 t4 t5 t6 t7 t8 t9
t1:
join -t " " -a 1 -a 2 -e '(unknown)' -o 0,1.2,2.2 ${.CURDIR}/phone ${.CURDIR}/fax > ${*}.log
@@ -44,6 +44,11 @@ t8:
@cmp -s ${.CURDIR}/${*}.out ${*}.log || \
(echo "XXX ${*} failed" && false)
+t9:
+ join -t‐ ${.CURDIR}/t9a.in ${.CURDIR}/t9b.in > ${*}.log
+ @cmp -s ${.CURDIR}/${*}.out ${*}.log || \
+ (echo "XXX ${*} failed" && false)
+
clean:
rm -f *.log
diff --git a/regress/usr.bin/join/t9.out b/regress/usr.bin/join/t9.out
new file mode 100644
index 00000000000..131ff7d3bf9
--- /dev/null
+++ b/regress/usr.bin/join/t9.out
@@ -0,0 +1 @@
+a‐b‐c‐d‐e
diff --git a/regress/usr.bin/join/t9a.in b/regress/usr.bin/join/t9a.in
new file mode 100644
index 00000000000..bef89262f28
--- /dev/null
+++ b/regress/usr.bin/join/t9a.in
@@ -0,0 +1 @@
+a‐b‐c
diff --git a/regress/usr.bin/join/t9b.in b/regress/usr.bin/join/t9b.in
new file mode 100644
index 00000000000..6967d5b0a79
--- /dev/null
+++ b/regress/usr.bin/join/t9b.in
@@ -0,0 +1 @@
+a‐d‐e