Commit graph

39 commits

Author SHA1 Message Date
Jan Scheer
1d2940b159
test_tail: add test_follow_name_truncate1-3 2021-10-24 22:31:14 +02:00
Jan Scheer
3f4b0146a1
test_tail: add test_follow_descriptor_vs_rename1-2 2021-10-24 22:28:30 +02:00
Jan Scheer
07eb50248b
test_tail: add test_retry8-9 2021-10-24 22:21:36 +02:00
Jan Scheer
016291b92e
test_tail: add test_retr7 2021-10-24 22:19:10 +02:00
Jan Scheer
c7c5deb3d8
test_tail: add test_retry6 2021-10-24 22:17:54 +02:00
Jan Scheer
4bfb462387
test_tail: add test_retry5 2021-10-24 22:15:14 +02:00
Jan Scheer
5770921f52
test_tail: add test_retry4 2021-10-24 22:13:58 +02:00
Jan Scheer
8c5c52801d
test_tail: add test_retry3 2021-10-24 22:12:40 +02:00
Jan Scheer
9338b3fd77
test_tail: add test_retry1-2 2021-10-24 22:03:00 +02:00
Jan Scheer
e3b35867a5
test_tail: clean up tests for --follow=name 2021-10-10 00:07:59 +02:00
Jan Scheer
a1206154b1
tail: fix the behavior for -f and rename events
This makes uu_tail pass the "gnu/tests/tail-2/descriptor-vs-rename" test.

* add tests for descriptor-vs-rename (with/without verbose)
* fix some minor error messages
2021-10-08 23:36:41 +02:00
Jan Scheer
23d3e58f33
tail: improve file handling for --follow=name
* Change data structure from Vec to HashMap in order to better
keep track of files while watching them with `--follow=name`.
E.g. file paths that were removed while watching them and exit
if no files are remaining, etc.

* Move all logic related to file handling into a FileHandling trait

* Simplify handling of the verbose flag.
2021-10-07 14:37:02 +02:00
Jan Scheer
94cc966535
tail: change notify backend on macOS from FSEvents to kqueue
On macOS only `kqueue` is suitable for our use case because `FSEvents`
waits until file close to delivers modify events.
2021-10-01 21:33:30 +02:00
Jan Scheer
e935d40480
tail: implement handling of truncate event for --follow=name 2021-09-28 20:05:09 +02:00
Jan Scheer
d9cd28fab6
test_tail: add tests for --follow=name --disable-inotify (polling) 2021-09-28 00:16:23 +02:00
Jan Scheer
5615ba9fe1
test_tail: add tests for --follow=name 2021-09-27 23:18:00 +02:00
Jan Scheer
a727b2e666
tail: handle file NotFound error correctly 2021-09-16 21:40:15 +02:00
Jan Scheer
1f24b1f59c
tail: implement sub-second sleep interval e.g. -s.1 2021-09-16 17:14:23 +02:00
Jan Scheer
cd0d23752a
tail: add fixes to pass "gnu/tests/tail-2/tail-c.sh" from GNU's test suite 2021-09-08 13:10:19 +02:00
Thomas Queiroz
6127ea9642 tests/tail: add test for as an alias for stdin 2021-08-01 17:20:30 -04:00
Jan Scheer
c0be979611 fix some issues with locale (replace "LANGUAGE" with "LC_ALL")
`LANGUAGE=C` is not enough, `LC_ALL=C` is needed as the environment
variable that overrides all the other localization settings.

e.g.
```bash
$ LANGUAGE=C id foobar
id: ‘foobar’: no such user

$ LC_ALL=C id foobar
id: 'foobar': no such user
```

* replace `LANGUAGE` with `LC_ALL` as environment variable in the tests
* fix the the date string of affected uutils
* replace `‘` and `’` with `'`
2021-06-23 11:30:28 +02:00
Jan Scheer
f8e96150f8 fix clippy warnings and spelling
* add some missing LICENSE headers
2021-06-04 15:39:34 +02:00
Jan Scheer
ad26b7a042 head/tail/split: make error handling of NUM/SIZE arguments more
consistent

* add tests for each flag that takes NUM/SIZE arguments
* fix bug in tail where 'quiet' and 'verbose' flags did not override each other POSIX style
2021-06-03 20:37:29 +02:00
Jan Scheer
cc659c8572 Merge branch 'master' of github.com:uutils/coreutils into refactoring_parse_size 2021-06-01 12:35:48 +02:00
Jan Scheer
3c7175f00d head/tail: add fixes and tests for bytes/lines NUM arg (undocumented sign)
* change tail bytes/lines clap parsing to fix posix override behavior
* change tail bytes/lines NUM parsing logic to be consistent with head
2021-06-01 12:17:11 +02:00
Jan Scheer
8bf1e33b5d Merge branch 'master' of github.com:uutils/coreutils into refactoring_parse_size
* truncate: use "parse_size" from uucore
* workaround fix for "test_reference"
2021-05-31 19:11:06 +02:00
Roy Ivy III
3f35e0a421 refactor ~ cargo make format 2021-05-31 08:23:58 -05:00
Roy Ivy III
4e20dedf58 tests ~ refactor/polish spelling (comments, names, and exceptions) 2021-05-31 08:23:57 -05:00
Jan Scheer
3aeccfd802 fix a lot of clippy warnings 2021-05-29 15:11:22 +02:00
Jan Scheer
0bf14da490 tail: use "parse_size" from uucore 2021-05-28 22:21:03 +02:00
Sylvestre Ledru
4aaeede3d8 rustfmt the recent change 2021-05-23 00:13:53 +02:00
Jeffrey Finkelstein
bc29645531 tail: fix off-by-one issue for +NUM args
Fix an off-by-one issue for `tail -c +NUM` and `tail -n +NUM` command
line options.
2021-05-17 19:45:42 -04:00
Sylvestre Ledru
3ac481e4d3 rustfmt the recent change 2021-04-24 12:46:06 +02:00
James Robson
3678777539 tail --sleep-interval takes a value 2021-04-22 16:10:08 +01:00
Gilad Naaman
600bab52ff shred, stat, tail: Remove direct usage of CmdResult fields in test 2021-04-17 18:50:41 +03:00
Yagiz Degirmenci
27b7552ef4
fix(tail): add support for negative indexing (#1865)
closes: https://github.com/uutils/coreutils/issues/1860
2021-03-22 10:01:54 +01:00
Chad Brewbaker
bb54669a5d
Fix macOS aarch64 compile errors (#1724) 2021-02-23 10:25:06 +01:00
Roy Ivy III
c6274b4003 tests ~ disable failing tail test under windows code coverage (with future FixME)
* FixME/note: test_mktemp::test_mktemp_make_temp_dir, test_mktemp::test_mktemp_mktemp, and test_mktemp::test_mktemp_suffix are also failing locally though not for CICD coverage builds
2020-08-16 17:02:19 -05:00
Roy Ivy III
de0375f909 tests ~ reorganize tests 2020-06-01 18:30:04 -05:00
Renamed from tests/test_tail.rs (Browse further)