Files

33 lines
690 B
Rust
Raw Permalink Normal View History

2023-08-21 10:49:27 +02:00
// This file is part of the uutils coreutils package.
//
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code.
2025-03-28 09:51:51 +01:00
use uutests::new_ucmd;
2020-05-05 23:08:58 +02:00
#[test]
fn test_arch() {
2021-04-05 23:03:43 +03:00
new_ucmd!().succeeds();
2020-05-05 23:08:58 +02:00
}
#[test]
fn test_arch_help() {
2021-04-05 23:03:43 +03:00
new_ucmd!()
.arg("--help")
.succeeds()
.stdout_contains("architecture name");
2020-05-05 23:08:58 +02:00
}
2022-09-10 18:38:14 +02:00
#[test]
fn test_invalid_arg() {
2025-03-01 15:29:11 +01:00
new_ucmd!().arg("--definitely-invalid").fails_with_code(1);
2022-09-10 18:38:14 +02:00
}
#[test]
fn test_arch_output_is_not_empty() {
let result = new_ucmd!().succeeds();
assert!(
!result.stdout_str().trim().is_empty(),
"arch output was empty"
);
}