summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2014-05-06 20:40:26 +0000
committermiod <miod@openbsd.org>2014-05-06 20:40:26 +0000
commitb59a987b9ccde502a28cfe6bb27636419fdd6d34 (patch)
treebc7c05c751dbf7e8e6186a4d620755dced139cc9
parentAssorted cleanups: (diff)
downloadwireguard-openbsd-b59a987b9ccde502a28cfe6bb27636419fdd6d34.tar.xz
wireguard-openbsd-b59a987b9ccde502a28cfe6bb27636419fdd6d34.zip
Make sure the stdout output is check, to confirm proper sorting.
-rw-r--r--regress/lib/libcrypto/pqueue/Makefile7
-rw-r--r--regress/lib/libcrypto/pqueue/expected.txt3
-rw-r--r--regress/lib/libcrypto/pqueue/pq_test.c1
3 files changed, 10 insertions, 1 deletions
diff --git a/regress/lib/libcrypto/pqueue/Makefile b/regress/lib/libcrypto/pqueue/Makefile
index 02a1816b0a4..b817169a7fa 100644
--- a/regress/lib/libcrypto/pqueue/Makefile
+++ b/regress/lib/libcrypto/pqueue/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.1 2014/05/06 20:27:19 miod Exp $
+# $OpenBSD: Makefile,v 1.2 2014/05/06 20:40:26 miod Exp $
PROG= pq_test
CRYPTO= ${.CURDIR}/../../../../lib/libssl/src/crypto
@@ -7,4 +7,9 @@ CFLAGS+= -I${CRYPTO}/pqueue
LDADD= -lcrypto
DPADD= ${LIBCRYPTO}
+REGRESS_TARGETS= regress-pq_test
+
+regress-pq_test: ${PROG}
+ ${.OBJDIR}/pq_test | cmp -s ${.CURDIR}/expected.txt /dev/stdin
+
.include <bsd.regress.mk>
diff --git a/regress/lib/libcrypto/pqueue/expected.txt b/regress/lib/libcrypto/pqueue/expected.txt
new file mode 100644
index 00000000000..c59d6cd8381
--- /dev/null
+++ b/regress/lib/libcrypto/pqueue/expected.txt
@@ -0,0 +1,3 @@
+item 6966726167696c69
+item 7374696365787069
+item 737570657263616c
diff --git a/regress/lib/libcrypto/pqueue/pq_test.c b/regress/lib/libcrypto/pqueue/pq_test.c
index 22e3beae421..32c39cd5074 100644
--- a/regress/lib/libcrypto/pqueue/pq_test.c
+++ b/regress/lib/libcrypto/pqueue/pq_test.c
@@ -59,6 +59,7 @@
#include "pqueue.h"
+/* remember to change expected.txt if you change these values */
unsigned char prio1[8] = "supercal";
unsigned char prio2[8] = "ifragili";
unsigned char prio3[8] = "sticexpi";