head: convert existing tests to new-style
authorThomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Thu, 13 Sep 2018 13:01:46 +0000 (15:01 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sat, 22 Sep 2018 17:40:35 +0000 (19:40 +0200)
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
testsuite/head.tests
testsuite/head/head-n-works [deleted file]
testsuite/head/head-works [deleted file]

index 1feecf990c269e02267e707978c1af06d4c1a773..50660d2674c805b45d297f840605b3ea0d06a745 100755 (executable)
@@ -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" \
diff --git a/testsuite/head/head-n-works b/testsuite/head/head-n-works
deleted file mode 100644 (file)
index db43255..0000000
+++ /dev/null
@@ -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
diff --git a/testsuite/head/head-works b/testsuite/head/head-works
deleted file mode 100644 (file)
index 56ad3e3..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-[ -n "$d" ] || d=..
-head "$d/README" > logfile.gnu
-busybox head "$d/README" > logfile.bb
-cmp logfile.gnu logfile.bb