Commit graph

16 commits

Author SHA1 Message Date
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)