| 1 |
// This file is part of the uutils coreutils package. |
| 2 |
// |
| 3 |
// For the full copyright and license information, please view the LICENSE |
| 4 |
// file that was distributed with this source code. |
| 5 |
|
| 6 |
use uutests::new_ucmd; |
| 7 |
|
| 8 |
#[test] |
| 9 |
fn test_arch() { |
| 10 |
new_ucmd!().succeeds().stdout_contains("\n"); |
| 11 |
} |
| 12 |
|
| 13 |
#[test] |
| 14 |
fn test_arch_help() { |
| 15 |
new_ucmd!() |
| 16 |
.arg("--help") |
| 17 |
.succeeds() |
| 18 |
.stdout_contains("architecture name"); |
| 19 |
} |
| 20 |
|
| 21 |
#[test] |
| 22 |
fn test_invalid_arg() { |
| 23 |
new_ucmd!().arg("--definitely-invalid").fails_with_code(1); |
| 24 |
} |
| 25 |
|
| 26 |
#[test] |
| 27 |
fn test_arch_output_is_not_empty() { |
| 28 |
let result = new_ucmd!().succeeds(); |
| 29 |
assert!( |
| 30 |
!result.stdout_str().trim().is_empty(), |
| 31 |
"arch output was empty" |
| 32 |
); |
| 33 |
} |