Make sure the stdout output is check, to confirm proper sorting.
authormiod <miod@openbsd.org>
Tue, 6 May 2014 20:40:26 +0000 (20:40 +0000)
committermiod <miod@openbsd.org>
Tue, 6 May 2014 20:40:26 +0000 (20:40 +0000)
regress/lib/libcrypto/pqueue/Makefile
regress/lib/libcrypto/pqueue/expected.txt [new file with mode: 0644]
regress/lib/libcrypto/pqueue/pq_test.c

index 02a1816..b817169 100644 (file)
@@ -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 (file)
index 0000000..c59d6cd
--- /dev/null
@@ -0,0 +1,3 @@
+item   6966726167696c69
+item   7374696365787069
+item   737570657263616c
index 22e3bea..32c39cd 100644 (file)
@@ -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";