blob: 1feecf990c269e02267e707978c1af06d4c1a773 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#!/bin/sh
# Copyright 2018 Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
# Licensed under GPLv2 or later, see file LICENSE in this source tree.
. ./testing.sh
# testing "test name" "command" "expected result" "file input" "stdin"
cat <<EOF > head.input
line 1
line 2
line 3
line 4
line 5
line 6
line 7
line 8
line 9
line 10
line 11
line 12
EOF
testing "head -n <negative number>" \
"head -n -9 head.input" \
"line 1\nline 2\nline 3\n" \
"" ""
rm head.input
exit $FAILCOUNT
|