changeset 1770:ebc947f27ef3

Add head test for -123.
author Rob Landley <rob@landley.net>
date Sun, 29 Mar 2015 12:03:46 -0500
parents 28806689547b
children 22c10aa56cfb
files tests/head.test
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/head.test	Sun Mar 29 12:01:30 2015 -0500
+++ b/tests/head.test	Sun Mar 29 12:03:46 2015 -0500
@@ -7,6 +7,8 @@
 testing "head, stdin" "head -n 1 && echo yes" "one\nyes\n" "" "one\ntwo"
 testing "head, stdin via -" "head -n 1 - && echo yes" "one\nyes\n" "" "one\ntwo"
 testing "head, file" "head input -n 1 && echo yes" "one\nyes\n" "one\ntwo" ""
+testing "head -number" "head -2 input && echo yes" "one\ntwo\nyes\n" \
+	"one\ntwo\nthree\nfour" ""
 testing "head, default lines" "head" "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n" "" "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12"
 
 echo "foo