head: convert existing tests to new-style

Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Thomas De Schampheleire 2018-09-13 15:01:46 +02:00 committed by Denys Vlasenko
parent e0f617699f
commit 6608879d34
3 changed files with 10 additions and 8 deletions

View File

@ -21,6 +21,16 @@ line 11
line 12
EOF
testing "head (without args)" \
"head head.input" \
"line 1\nline 2\nline 3\nline 4\nline 5\nline 6\nline 7\nline 8\nline 9\nline 10\n" \
"" ""
testing "head -n <positive number>" \
"head -n 2 head.input" \
"line 1\nline 2\n" \
"" ""
testing "head -n <negative number>" \
"head -n -9 head.input" \
"line 1\nline 2\nline 3\n" \

View File

@ -1,4 +0,0 @@
[ -n "$d" ] || d=..
head -n 2 "$d/README" > logfile.gnu
busybox head -n 2 "$d/README" > logfile.bb
cmp logfile.gnu logfile.bb

View File

@ -1,4 +0,0 @@
[ -n "$d" ] || d=..
head "$d/README" > logfile.gnu
busybox head "$d/README" > logfile.bb
cmp logfile.gnu logfile.bb