mirror of
https://github.com/uutils/coreutils.git
synced 2025-07-07 21:45:01 +00:00
32 lines
690 B
Rust
32 lines
690 B
Rust
// 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.
|
|
use uutests::new_ucmd;
|
|
|
|
#[test]
|
|
fn test_arch() {
|
|
new_ucmd!().succeeds();
|
|
}
|
|
|
|
#[test]
|
|
fn test_arch_help() {
|
|
new_ucmd!()
|
|
.arg("--help")
|
|
.succeeds()
|
|
.stdout_contains("architecture name");
|
|
}
|
|
|
|
#[test]
|
|
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"
|
|
);
|
|
}
|