From 617c99b6029163f8f768654d6160eefae9536dc5 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sat, 24 Oct 2015 15:16:54 +0000 Subject: Add test for -b and -r when -k is specified. --- regress/usr.bin/sort/stests | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'regress/usr.bin') diff --git a/regress/usr.bin/sort/stests b/regress/usr.bin/sort/stests index 66d2386b720..897832fb032 100644 --- a/regress/usr.bin/sort/stests +++ b/regress/usr.bin/sort/stests @@ -1,5 +1,5 @@ #!/bin/sh - -# $OpenBSD: stests,v 1.16 2015/10/13 22:14:51 tim Exp $ +# $OpenBSD: stests,v 1.17 2015/10/24 15:16:53 millert Exp $ # from: @(#)stests 8.1 (Berkeley) 6/6/93 #Latest version. My sort passes all tests because I wrote it. @@ -1038,3 +1038,20 @@ $SORTPROG -c in out 2>/dev/null test $? -eq 2 || echo ${TEST}A failed $SORTPROG -C in out 2>/dev/null test $? -eq 2 || echo ${TEST}B failed + +#--------------------------------------------------------------- +TEST=45; echo $TEST # field limits with -b +cat <in + a 2 +a 1 + b 2 +b 1 +! +cat <out +b 1 + b 2 +a 1 + a 2 +! + +xsort "" -br -k1,1 -k2n -- cgit v1.2.3