diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2015-10-24 15:16:54 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2015-10-24 15:16:54 +0000 |
commit | 617c99b6029163f8f768654d6160eefae9536dc5 (patch) | |
tree | cc5b519c54821a01324b4c4eabad792670ccfe86 /regress/usr.bin/sort | |
parent | 87d829a8534a90dd3f820516b6564aeddcb894aa (diff) |
Add test for -b and -r when -k is specified.
Diffstat (limited to 'regress/usr.bin/sort')
-rw-r--r-- | regress/usr.bin/sort/stests | 19 |
1 files changed, 18 insertions, 1 deletions
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 |