aboutsummaryrefslogtreecommitdiff
path: root/tests/tail.test
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2016-03-02 15:20:04 -0600
committerRob Landley <rob@landley.net>2016-03-02 15:20:04 -0600
commit336c44adca1768ada1e1e2f4d7dbbc33e994e582 (patch)
tree9780ee9602ffbca6b04e472d3ac0d158f92ac49c /tests/tail.test
parenteb830728b12152702c3852d079ad5c8a7f6e709b (diff)
downloadtoybox-336c44adca1768ada1e1e2f4d7dbbc33e994e582.tar.gz
Factor out command name at the start of test name, have runtest.sh print it.
Diffstat (limited to 'tests/tail.test')
-rwxr-xr-xtests/tail.test42
1 files changed, 21 insertions, 21 deletions
diff --git a/tests/tail.test b/tests/tail.test
index f4b86673..b3d744aa 100755
--- a/tests/tail.test
+++ b/tests/tail.test
@@ -7,38 +7,38 @@
BIGTEST="one\ntwo\nthree\nfour\nfive\nsix\nseven\neight\nnine\nten\neleven\n"
echo -ne "$BIGTEST" > file1
testing "tail" "tail && echo yes" "oneyes\n" "" "one"
-testing "tail file" "tail file1" \
+testing "file" "tail file1" \
"two\nthree\nfour\nfive\nsix\nseven\neight\nnine\nten\neleven\n" "" ""
-testing "tail -n in bounds" "tail -n 3 file1" "nine\nten\neleven\n" "" ""
-testing "tail -n out of bounds" "tail -n 999 file1" "$BIGTEST" "" ""
-testing "tail -n+ in bounds" "tail -n +3 file1" \
+testing "-n in bounds" "tail -n 3 file1" "nine\nten\neleven\n" "" ""
+testing "-n out of bounds" "tail -n 999 file1" "$BIGTEST" "" ""
+testing "-n+ in bounds" "tail -n +3 file1" \
"three\nfour\nfive\nsix\nseven\neight\nnine\nten\neleven\n" "" ""
-testing "tail -n+ outof bounds" "tail -n +999 file1" "" "" ""
-testing "tail -c in bounds" "tail -c 27 file1" \
+testing "-n+ outof bounds" "tail -n +999 file1" "" "" ""
+testing "-c in bounds" "tail -c 27 file1" \
"even\neight\nnine\nten\neleven\n" "" ""
-testing "tail -c out of bounds" "tail -c 999 file1" "$BIGTEST" "" ""
-testing "tail -c+ in bounds" "tail -c +27 file1" \
+testing "-c out of bounds" "tail -c 999 file1" "$BIGTEST" "" ""
+testing "-c+ in bounds" "tail -c +27 file1" \
"x\nseven\neight\nnine\nten\neleven\n" "" ""
-testing "tail -c+ out of bonds" "tail -c +999 file1" "" "" ""
+testing "-c+ out of bonds" "tail -c +999 file1" "" "" ""
rm file1
-testing "tail stdin no trailing newline" "tail -n 1 - " "c" "" "a\nb\nc"
-testing "tail file no trailing newline" "tail -n 1 input" "c" "a\nb\nc" ""
+testing "stdin no trailing newline" "tail -n 1 - " "c" "" "a\nb\nc"
+testing "file no trailing newline" "tail -n 1 input" "c" "a\nb\nc" ""
optional TAIL_SEEK
-testing "tail noseek -n in bounds" "tail -n 3" "nine\nten\neleven\n" \
+testing "noseek -n in bounds" "tail -n 3" "nine\nten\neleven\n" \
"" "$BIGTEST"
-testing "tail noseek -n out of bounds" "tail -n 999" "$BIGTEST" "" "$BIGTEST"
-testing "tail noseek -n+ in bounds" "tail -n +3" \
+testing "noseek -n out of bounds" "tail -n 999" "$BIGTEST" "" "$BIGTEST"
+testing "noseek -n+ in bounds" "tail -n +3" \
"three\nfour\nfive\nsix\nseven\neight\nnine\nten\neleven\n" "" \
"$BIGTEST"
-testing "tail noseek -n+ outof bounds" "tail -n +999" "" "" "$BIGTEST"
-testing "tail noseek -c in bounds" "tail -c 27" \
+testing "noseek -n+ outof bounds" "tail -n +999" "" "" "$BIGTEST"
+testing "noseek -c in bounds" "tail -c 27" \
"even\neight\nnine\nten\neleven\n" "" "$BIGTEST"
-testing "tail noseek -c out of bounds" "tail -c 999" "$BIGTEST" "" "$BIGTEST"
-testing "tail noseek -c+ in bounds" "tail -c +27" \
+testing "noseek -c out of bounds" "tail -c 999" "$BIGTEST" "" "$BIGTEST"
+testing "noseek -c+ in bounds" "tail -c +27" \
"x\nseven\neight\nnine\nten\neleven\n" "" "$BIGTEST"
-testing "tail noseek -c+ out of bonds" "tail -c +999" "" "" "$BIGTEST"
+testing "noseek -c+ out of bonds" "tail -c +999" "" "" "$BIGTEST"
makebigfile()
{
@@ -55,7 +55,7 @@ makebigfile()
}
makebigfile > bigfile
-testing "tail -c 12345 -n 3 bigfile" "tail -c 12345 -n 3 bigfile | md5sum" \
+testing "-c 12345 -n 3 bigfile" "tail -c 12345 -n 3 bigfile | md5sum" \
"347bbdcbad8a313f4dc7bd558c5bfcb8 -\n" "" ""
-testing "tail -n 3 -c 12345 bigfile" "tail -n 3 -c 12345 bigfile | md5sum" \
+testing "-n 3 -c 12345 bigfile" "tail -n 3 -c 12345 bigfile | md5sum" \
"1698825a750288284ec3ba7d8a59f302 -\n" "" ""