Brian Vincent
37611550d3
tail: fix tailing /dev/zero
...
This fixes a bug where tail would run forever when tailing
/dev/zero. This behavior matches GNU tail.
2025-07-06 14:27:13 -07:00
Dorian Peron
6e23d4e979
tests: patch tests to simplify imports
2025-07-01 03:36:46 +02:00
Luv-Ray
fb2399f56b
fix clippy ( #8275 )
...
* fix clippy
* update
* update
2025-06-27 09:15:24 +02:00
Will Shuttleworth
e5bde07591
tail: fix test that disables output in bash shell ( #8157 )
...
* tail: fix test that disables output in bash shell
* tail: fix platform related issues after test change
* tail: use new imports on same platforms as test they are needed for
2025-06-13 09:44:18 +02:00
hz2
6d29b7b3c1
Tail macos stdin ran from script fix ( #7844 )
...
* fixes #7763
- introduce macOS-specific config guard
- added test for testing tail stdin when redirected (`>`) from file and
when through a pipe (`|`)
* created test to mock behavior in #7763 , with comments
added drop line
* re-enabled test_stdin_redirect_dir_when_target_os_is_macos, and added a check to handle error message
* added location of current directory so test env can find script
* adjusting to try to have FreeBSD find the file in CI test
* putting in /env instead of assuming bash
* removed ignore macro
* added comments explaining the need for specific macOS cases, including reference to rust-lang issue: https://github.com/rust-lang/rust/issues/95239
2025-05-04 18:33:09 +02:00
Jeremy Smart
044b33d8cb
Merge pull request #7760 from Qelxiros/7670-tail-hex-formatting
...
tail hex parsing, remove fundu dependency
2025-04-23 18:34:00 +02:00
Karl McDowall
e35ef16030
tail: fix issue with -v flag and stdin
...
Fixes issue #7613
Tail now correctly handles the -v flag when only 1 input file is given.
2025-04-19 09:49:06 -06:00
Sylvestre Ledru
a289e9f0fb
fix declaration
2025-04-14 10:29:11 +02:00
Sylvestre Ledru
bbbc7b5147
Remove extra space
2025-04-14 10:25:30 +02:00
Sylvestre Ledru
7d86f0b5f2
tail: test_follow_name_truncate4 is also flaky on selinux
2025-04-14 10:04:14 +02:00
Sylvestre Ledru
554c0ad593
tail: Ignore a test on selinux
...
test_follow_when_files_are_pointing_to_same_relative_file_and_file_stays_same_size is flaky
2025-04-14 09:46:05 +02:00
Terts Diepraam
8040305715
Merge pull request #7622 from blyxxyz/flush-bufwriters
...
Flush `BufWriter`s, clean up error reporting
2025-04-08 20:52:51 +02:00
Yuri Astrakhan
982805d3cd
chore: manual inline formatting
...
Minor manual cleanup - inlined many format args. This makes the code a bit more readable, and helps spot a few inefficiencies and possible bugs. Note that `&foo` in a `format!` parameter results in a 6% extra performance cost, and does not get inlined by the compiler (yet).
2025-04-08 00:23:21 -04:00
Jan Verbeek
cf50952325
tail: Flush BufWriter
2025-03-31 13:46:33 +02:00
Sylvestre Ledru
a0179ea239
uutests: adjust the tests to use them
2025-03-28 21:40:31 +01:00
Sylvestre Ledru
a85539f530
Run cargo fmt on the tree
2025-03-24 21:33:12 +01:00
Daniel Hofstetter
df4dfea852
tests: replace run() with succeeds() or fails()
2025-03-09 16:53:56 +01:00
Sylvestre Ledru
3e1adf40ee
Use the new function 'fails_with_code' v2
2025-03-04 09:27:47 +01:00
Sylvestre Ledru
18cb7dcf9e
Use the new function fails_with_code
...
Done with
```
$ perl -0777 -i -pe 's/([ \t]+)\.fails\(\)[ \t]*\n[ \t]+\.no_stdout\(\)[ \t]*\n[ \t]+\.code_is\(([0-9]+)\);/\1.fails_with_code(\2)\n\1.no_stdout();/gs' *rs
$ sed -i -e "s|.fails()(.*).code_is(|.fails_with_code(|g" *rs
$ perl -0777 -i -pe 's/([ \t]+)\.fails\(\)[ \t]*\n[ \t]+\.code_is\(([0-9]+)\);/\1.fails_with_code(\2);/gs' *rs
$ perl -0777 -i -pe 's/([ \t]+)\.fails\(\)(.*?)[ \t]+\.code_is\(([0-9]+)\);/\1.fails_with_code(\3)\2;/gs' *rs
...
```
2025-03-01 17:26:20 +01:00
Daniel Hofstetter
14ce43fe52
tail: adapt tests to API change of rand
2025-01-30 08:52:42 +01:00
Julian
2799b288e3
tail: fix issue #6543 (--pid when reading from stdin) ( #6582 )
...
---------
Co-authored-by: just-an-engineer <Julian.Beltz@zetier.com>
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2024-12-02 19:04:36 +01:00
David Campbell
353eb53367
Fix clippy::uninlined_format_args .
2024-09-19 17:56:27 -04:00
Ben Wiederhake
42b3baf32f
clippy: simplify code according to nightly 'needless_borrows_for_generic_args' lint
...
https://rust-lang.github.io/rust-clippy/master/index.html#/needless_borrows_for_generic_args
2024-07-18 15:59:36 +02:00
Laurent Cheylus
de742e905b
tests: disable failed tests for tail on OpenBSD
...
Signed-off-by: Laurent Cheylus <foxy@free.fr>
2024-07-06 22:29:19 +02:00
n4n5
ab67947321
fix clippy tests
2024-06-30 16:27:08 +02:00
Sylvestre Ledru
09e53f3d2d
tests: fix some clippy warnings
2024-05-25 09:06:16 +02:00
Daniel Hofstetter
a816960c33
tests: remove 'target_pointer_width = "128"'
2024-05-20 23:27:53 +02:00
Daniel Hofstetter
320bdcf29e
tail: remove useless use of vec! in test
2024-05-12 15:32:24 +02:00
Daniel Hofstetter
692cdfac34
cp/tail: use #[ignore] to disable tests
...
instead of a cfg attribute
2024-05-12 15:15:44 +02:00
Daniel Hofstetter
0ad7389b61
tail: remove #[cfg(not(windows))] from const
2024-05-09 15:28:34 +02:00
Daniel Hofstetter
aef7933d96
tail: use #[ignore] to disable tests
...
instead of a cfg attribute
2024-05-09 15:07:10 +02:00
Sylvestre Ledru
13cfe2d8e5
test: replace at.write by at.touch
2024-04-21 13:23:24 +02:00
Sylvestre Ledru
3a72d5c5cb
test tail: replace fixtures by at for consistency
2024-04-21 13:20:38 +02:00
Ben Wiederhake
88a2ea4f3b
tail: accept shortcuts for stringly-enum arguments
2024-04-14 15:39:46 +02:00
Sylvestre Ledru
f0286eb77d
tail: allow multiple usage of --pid to match upstream (regression of 9.5)
...
tested by tests/tail/pid
2024-03-30 07:28:31 +01:00
Daniel Hofstetter
91b19b7c56
cp,tail: fix warnings in tests on Android
2023-11-05 13:56:39 +01:00
Terts Diepraam
c3f9e19a3b
all: normalize license notice in all *.rs files
2023-08-24 12:21:09 +02:00
Daniel Hofstetter
5d03d2d9d4
clippy: fix warnings introduced by Rust 1.71.0
2023-07-13 17:35:33 +02:00
Sylvestre Ledru
7a7842b5b8
Merge pull request #4756 from Joining7943/tail-refactor-and-fix-input
...
`tail`: Refactor `paths::Input::from` and `Settings::inputs`
2023-07-03 14:09:57 +02:00
Daniel Hofstetter
b248b9d34c
tail: disable some tests on Android
2023-05-27 08:02:03 +02:00
Joining7943
c6f6c87780
tests/tail: Change static global variables to const
2023-04-23 23:11:40 +02:00
Joining7943
ae60045f3f
tail: Fix printed header for stdin should be the same on all platforms
2023-04-21 21:55:28 +02:00
Joining7943
20e32971dd
tail/args: Fix parsing when -F is used together with --retry or --follow
2023-04-18 21:47:20 +02:00
Daniel Hofstetter
7a888da409
tests: remove all "extern crate" statements
2023-04-10 08:31:31 +02:00
Daniel Hofstetter
0140f4f7d0
tests: fix "unresolved import" warnings on Windows
2023-03-20 16:26:31 +01:00
Daniel Hofstetter
94aeba9854
tests: fix unused imports warnings on Windows
2023-03-20 16:06:56 +01:00
Daniel Hofstetter
6988eb7ec6
tests: expand wildcard imports
2023-03-20 15:32:35 +01:00
Joining7943
946aab37ed
Cargo: Bump fundu version v0.3.0 -> v0.4.2. Adjust test in test_tail.
2023-03-12 15:37:44 +01:00
Benjamin Bara
9b49f368c7
tail: parse default before obsolete
2023-02-28 18:58:12 +01:00
Benjamin Bara
f6edea2d05
tail: enable non-utf8 paths
2023-02-28 18:58:12 +01:00