aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtestsuite/head.tests31
1 files changed, 31 insertions, 0 deletions
diff --git a/testsuite/head.tests b/testsuite/head.tests
new file mode 100755
index 000000000..1feecf990
--- /dev/null
+++ b/testsuite/head.tests
@@ -0,0 +1,31 @@
1#!/bin/sh
2# Copyright 2018 Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
3# Licensed under GPLv2 or later, see file LICENSE in this source tree.
4
5. ./testing.sh
6
7# testing "test name" "command" "expected result" "file input" "stdin"
8
9cat <<EOF > head.input
10line 1
11line 2
12line 3
13line 4
14line 5
15line 6
16line 7
17line 8
18line 9
19line 10
20line 11
21line 12
22EOF
23
24testing "head -n <negative number>" \
25 "head -n -9 head.input" \
26 "line 1\nline 2\nline 3\n" \
27 "" ""
28
29rm head.input
30
31exit $FAILCOUNT