diff options
author | Elie De Brauwer <eliedebrauwer@gmail.com> | 2012-07-05 22:58:28 +0200 |
---|---|---|
committer | Elie De Brauwer <eliedebrauwer@gmail.com> | 2012-07-05 22:58:28 +0200 |
commit | bf3d3a7a831418d60d832fac1ecf95f4b867a0d0 (patch) | |
tree | acb058251d28404a589b9f63265768894b0f1514 /toys/tail.c | |
parent | c2f62a97261dd471456b72ada279d3a14360a5cd (diff) | |
download | toybox-bf3d3a7a831418d60d832fac1ecf95f4b867a0d0.tar.gz |
- Do not abort testing after running the sort tests
- Add tail testcases for input not ending on a newline
- Fix condition where input coming from stdin does not have a trailing newline
Diffstat (limited to 'toys/tail.c')
-rw-r--r-- | toys/tail.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/tail.c b/toys/tail.c index 18369ccb..a029eca9 100644 --- a/toys/tail.c +++ b/toys/tail.c @@ -176,7 +176,7 @@ static void do_tail(int fd, char *name) } if (lines) { - if(try[count] != '\n') continue; + if(try[count] != '\n' && count != len-1) continue; if (lines<0) { if (!++lines) ++lines; continue; |