mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 11:07:44 +00:00
Add test to ensure arch output is not empty (#7523)
* Add test to ensure arch output is not empty This test ensures that the output of the arch command is non-empty, which is a minimal expectation across all supported architectures. This helps avoid regressions or edge cases where the command might unexpectedly return an empty string on unsupported or misconfigured platforms. * Update tests/by-util/test_arch.rs Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com> * Apply cargo fmt formatting --------- Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
This commit is contained in:
parent
a64fce8286
commit
6658a0e610
1 changed files with 9 additions and 0 deletions
|
@ -21,3 +21,12 @@ fn test_arch_help() {
|
|||
fn test_invalid_arg() {
|
||||
new_ucmd!().arg("--definitely-invalid").fails_with_code(1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_arch_output_is_not_empty() {
|
||||
let result = new_ucmd!().succeeds();
|
||||
assert!(
|
||||
!result.stdout_str().trim().is_empty(),
|
||||
"arch output was empty"
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue