From ba242e08ee83910596420f42830fd3d6fc1868d0 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 4 Jul 2021 11:57:40 -0500 Subject: Teach tail -F to work on file that doesn't initially exist (needed new lib/ flag), allow -s to be fraction of a second, inline (anonymous) struct so globals.h isn't using an incomplete type, blank line in GLOBALS() between option args and other variables, collate tail_continue() to one function, add test. --- tests/tail.test | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/tail.test') diff --git a/tests/tail.test b/tests/tail.test index 036f433c..94644c8f 100755 --- a/tests/tail.test +++ b/tests/tail.test @@ -73,3 +73,9 @@ 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 + +testing "-F" "tail -s .1 -F walrus 2>/dev/null & sleep .2; echo hello > walrus; +sleep .2; truncate -s 0 walrus; sleep .2; echo potato >> walrus; sleep .2; +echo hello >> walrus; sleep .2; rm walrus; sleep .2; echo done > walrus; + sleep .5; kill %1" "hello\npotato\nhello\ndone\n" "" "" +rm -f walrus -- cgit v1.2.3