From 24f13e9ab383f73b0dd16e948b4d2b5c050dbe54 Mon Sep 17 00:00:00 2001 From: jmallett Date: Sat, 20 Apr 2002 19:41:30 +0000 Subject: [PATCH] Add a test for jot(1). --- tools/regression/usr.bin/Makefile | 2 +- tools/regression/usr.bin/jot/Makefile | 4 ++++ tools/regression/usr.bin/jot/regress.out | 1 + tools/regression/usr.bin/jot/regress.sh | 16 ++++++++++++++++ 4 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 tools/regression/usr.bin/jot/Makefile create mode 100644 tools/regression/usr.bin/jot/regress.out create mode 100644 tools/regression/usr.bin/jot/regress.sh diff --git a/tools/regression/usr.bin/Makefile b/tools/regression/usr.bin/Makefile index 64d6d45ab898..c01682dab84c 100644 --- a/tools/regression/usr.bin/Makefile +++ b/tools/regression/usr.bin/Makefile @@ -1,5 +1,5 @@ # $FreeBSD$ -SUBDIR= file2c join uudecode uuencode xargs +SUBDIR= file2c join jot uudecode uuencode xargs .include diff --git a/tools/regression/usr.bin/jot/Makefile b/tools/regression/usr.bin/jot/Makefile new file mode 100644 index 000000000000..99036706a818 --- /dev/null +++ b/tools/regression/usr.bin/jot/Makefile @@ -0,0 +1,4 @@ +# $FreeBSD$ + +all: + @sh ${.CURDIR}/regress.sh ${.CURDIR} diff --git a/tools/regression/usr.bin/jot/regress.out b/tools/regression/usr.bin/jot/regress.out new file mode 100644 index 000000000000..b10979320b73 --- /dev/null +++ b/tools/regression/usr.bin/jot/regress.out @@ -0,0 +1 @@ +1,3,5,7,9,B,D,F,11,13,15,17,19,1B,1D,1F,21,23,25,27,29,2B,2D,2F,31,33,35,37,39,3B,3D,3F,41,43,45,47,49,4B,4D,4F,51,53,55,57,59,5B,5D,5F,61,63,65,67,69,6B,6D,6F,71,73,75,77,79,7B,7D,7F,81,83,85,87,89,8B,8D,8F,91,93,95,97,99,9B,9D,9F,A1,A3,A5,A7,A9,AB,AD,AF,B1,B3,B5,B7,B9,BB,BD,BF,C1,C3,C5,C8 diff --git a/tools/regression/usr.bin/jot/regress.sh b/tools/regression/usr.bin/jot/regress.sh new file mode 100644 index 000000000000..f013e82c2813 --- /dev/null +++ b/tools/regression/usr.bin/jot/regress.sh @@ -0,0 +1,16 @@ +# $FreeBSD$ + +# Go into the regression test directory, handed to us by make(1) +TESTDIR=$1 +if [ -z "$TESTDIR" ]; then + TESTDIR=. +fi +cd $TESTDIR + +jot -w '%X' -s ',' 100 1 200 | diff -u regress.out - +if [ $? -eq 0 ]; then + echo "Test detected no regression, output matches." +else + echo "Test failed: regression detected. See above." + exit 1 +fi