Add a regression test that (at least on some archs) catches the problem
fixed in usr.bin/sort/fields.c rev. 1.18.
This commit is contained in:
parent
5e6e0e1b39
commit
31644c5596
@ -1,5 +1,5 @@
|
||||
# $NetBSD: Makefile,v 1.6 2003/09/14 13:51:16 cjep Exp $
|
||||
# $NetBSD: Makefile,v 1.7 2004/03/14 23:01:33 martin Exp $
|
||||
|
||||
SUBDIR+= bzip2 grep m4 make rtld sort
|
||||
SUBDIR+= bzip2 grep m4 make rtld sort sort2
|
||||
|
||||
.include <bsd.subdir.mk>
|
||||
|
8
regress/usr.bin/sort2/Makefile
Normal file
8
regress/usr.bin/sort2/Makefile
Normal file
@ -0,0 +1,8 @@
|
||||
# $NetBSD: Makefile,v 1.1 2004/03/14 23:01:33 martin Exp $
|
||||
|
||||
NOMAN= # defined
|
||||
|
||||
regress:
|
||||
@${HOST_SH} ${.CURDIR}/sort2regress
|
||||
|
||||
.include <bsd.prog.mk>
|
18
regress/usr.bin/sort2/sort2regress
Normal file
18
regress/usr.bin/sort2/sort2regress
Normal file
@ -0,0 +1,18 @@
|
||||
#! /bin/sh
|
||||
|
||||
INFILE=/tmp/sort-input.$$
|
||||
OUTFILE=/tmp/sort-output.$$
|
||||
|
||||
trap "rm -f $INFFILE $OUTFILE; echo FAILED; exit 0" 1 ILL TRAP ABRT BUS SEGV
|
||||
|
||||
printf "a b \na b\n" > $INFILE
|
||||
sort +3 $INFILE > $OUTFILE || { echo "FAILED"; rm -f $INFILE $OUTFILE; exit 0; }
|
||||
|
||||
if cmp $INFILE $OUTFILE
|
||||
then
|
||||
echo PASSED
|
||||
else
|
||||
echo FAILED
|
||||
fi
|
||||
|
||||
rm -f $INFILE $OUTFILE
|
Loading…
Reference in New Issue
Block a user