mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07: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:
co-authored by
Daniel Hofstetter
parent
a64fce8286
commit
6658a0e610
@@ -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"
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user