1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 19:17:43 +00:00
Commit graph

29 commits

Author SHA1 Message Date
Dorian Peron
6e23d4e979 tests: patch tests to simplify imports 2025-07-01 03:36:46 +02:00
Daniel Hofstetter
3904d5b614 uptime: move imports into test function
to simplify the cfg handling
2025-06-03 16:12:52 +02:00
Daniel Hofstetter
b78f78bedf uptime: use clap to handle too many path args 2025-05-06 16:05:23 +02:00
Daniel Hofstetter
ed0492a046 uptime: fix "unused import" warnings with musl 2025-05-02 09:09:57 +02:00
Terts Diepraam
d99b7b31a6
Merge pull request #7740 from Ecordonnier/eco/enable-utmpx-for-musl
enable utmpx feature for musl
2025-04-17 22:46:23 +02:00
Daniel Hofstetter
8590f51f85 uptime: adapt test to API changes in bincode 2025-04-16 11:02:52 +02:00
Etienne Cordonnier
0354f1f84d disable failing uptime test for musl
musl libc only provides stub functions for utmpx, thus this test cannot pass with musl libc.

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
2025-04-15 12:51:55 +02:00
Daniel Hofstetter
7b6d05f81d uptime: fix "unused import" warning in test 2025-04-01 09:21:38 +02:00
Sylvestre Ledru
a0179ea239 uutests: adjust the tests to use them 2025-03-28 21:40:31 +01:00
Daniel Hofstetter
df4dfea852 tests: replace run() with succeeds() or fails() 2025-03-09 16:53:56 +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
90208096fd uptime: remove duplicate test 2025-02-04 09:24:32 +01:00
Sylvestre Ledru
d66932f593 issues: 7158, 7159 and 7174 - ignore linux arm64 specific test 2025-01-20 08:13:35 +01:00
Ben Wiederhake
6818bbe5d7 uptime: relax error message due to different errno on MacOS
Fixes #6569.
2024-07-15 21:49:42 +02:00
Sylvestre Ledru
96fa8e9480
Merge pull request #6514 from lcheylus/openbsd-uptime
uptime: add support for OpenBSD using utmp
2024-06-30 21:27:48 +02:00
n4n5
ab67947321
fix clippy tests 2024-06-30 16:27:08 +02:00
Laurent Cheylus
c0a3662b63
tests: enable tests for uptime on OpenBSD
Signed-off-by: Laurent Cheylus <foxy@free.fr>
2024-06-30 16:17:04 +02:00
Anirban Halder
2774274cc2
`uptime`: Support files in uptime (#6400) 2024-06-22 13:06:03 +02:00
Laurent Cheylus
4589f637ee tests: disable tests for tools unsupported on OpenBSD
pinky, uptime and who are not supported on OpenBSD (no support of utmpx feature) => disable tests
for these tools on OpenBSD with conditional compilation

Signed-off-by: Laurent Cheylus <foxy@free.fr>
2024-01-19 17:37:45 +01:00
Sylvestre Ledru
bfca6bf70f Add license headers on all files 2023-08-21 10:49:27 +02:00
Daniel Hofstetter
7a888da409 tests: remove all "extern crate" statements 2023-04-10 08:31:31 +02:00
Miles Liu
81a4e8fb7d
Remove keep_env from the test framework 2023-03-24 14:25:37 +08:00
Daniel Hofstetter
6988eb7ec6 tests: expand wildcard imports 2023-03-20 15:32:35 +01:00
Joining7943
1c230fd779 tests/util: Refactor UCommand and TestScenario.
Summary of changes in UCommand:
* Extend UCommand by builder methods and simplify methods in TestScenario
* Simplify code structures where possible. Add documentation.
* Store bin_path as PathBuf and util_name as String in all structs
* Remove UCommand::util and make bin_path, temp_dir private
* Rename UCommand::with_limit -> UCommand::limit

Summary of changes in TestScenario:
* Rename some parameters in TestScenario methods to be more descriptive
* Remove ucmd_keepenv, cmd_keepenv from TestScenario. Use UCommand::keep_env instead.
2023-02-18 23:38:20 +01:00
Terts Diepraam
9177cb7b24 all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
Roy Ivy III
4e20dedf58 tests ~ refactor/polish spelling (comments, names, and exceptions) 2021-05-31 08:23:57 -05:00
Gilad Naaman
b91fadd8f4 Refactored tests for more utilities 2021-04-18 02:32:43 +03:00
Sylvestre Ledru
8bd533ffe8 refactor(uptime): some minor improvements 2020-11-03 23:10:32 +01:00
Roy Ivy III
de0375f909 tests ~ reorganize tests 2020-06-01 18:30:04 -05:00
Renamed from tests/test_uptime.rs (Browse further)