aboutsummaryrefslogtreecommitdiff
path: root/tests/tail.test
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2016-03-18 14:12:53 -0500
committerRob Landley <rob@landley.net>2016-03-18 14:12:53 -0500
commitada3c0876dc99b6b1ef457e06d271d3b933f9dd9 (patch)
treecad62be15bf0b6b33ec8cd16823515a80cc9b3c1 /tests/tail.test
parent426bc7fb4fcdd7e28544f8fb29854316a1784850 (diff)
downloadtoybox-ada3c0876dc99b6b1ef457e06d271d3b933f9dd9.tar.gz
Fix last commit (had newline before first ==> name <==) and add -f tests.
Diffstat (limited to 'tests/tail.test')
-rwxr-xr-xtests/tail.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/tail.test b/tests/tail.test
index b3d744aa..c1c44c6a 100755
--- a/tests/tail.test
+++ b/tests/tail.test
@@ -59,3 +59,18 @@ testing "-c 12345 -n 3 bigfile" "tail -c 12345 -n 3 bigfile | md5sum" \
"347bbdcbad8a313f4dc7bd558c5bfcb8 -\n" "" ""
testing "-n 3 -c 12345 bigfile" "tail -n 3 -c 12345 bigfile | md5sum" \
"1698825a750288284ec3ba7d8a59f302 -\n" "" ""
+rm bigfile
+
+echo 111 > one
+testing "-f one" \
+ 'tail -f one & sleep .25 ; echo two >> one; sleep .25; echo three >> one; sleep .25; kill $! >/dev/null' \
+ "111\ntwo\nthree\n" "" ""
+rm one
+
+echo uno > one
+echo dos > two
+echo tres > three
+testing "-f one two three" \
+ 'tail -f one two three & sleep .25 ; echo more >> three ; echo also >> one; sleep .25; kill $! >/dev/null' \
+ "==> one <==\nuno\n\n==> two <==\ndos\n\n==> three <==\ntres\nmore\n\n==> one <==\nalso\n" "" ""
+rm one two three