mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 11:07:44 +00:00
Merge pull request #1503 from sylvestre/arch
test(arch): add tests and description text
This commit is contained in:
commit
9052bc4de7
3 changed files with 20 additions and 1 deletions
|
@ -15,7 +15,7 @@ extern crate uucore;
|
|||
|
||||
use platform_info::*;
|
||||
|
||||
static SYNTAX: &str = "";
|
||||
static SYNTAX: &str = "Display machine architecture";
|
||||
static SUMMARY: &str = "Determine architecture name for current machine.";
|
||||
static LONG_HELP: &str = "";
|
||||
|
||||
|
|
18
tests/test_arch.rs
Normal file
18
tests/test_arch.rs
Normal file
|
@ -0,0 +1,18 @@
|
|||
use common::util::*;
|
||||
|
||||
#[test]
|
||||
fn test_arch() {
|
||||
let (_, mut ucmd) = at_and_ucmd!();
|
||||
|
||||
let result = ucmd.run();
|
||||
assert!(result.success);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_arch_help() {
|
||||
let (_, mut ucmd) = at_and_ucmd!();
|
||||
|
||||
let result = ucmd.arg("--help").run();
|
||||
assert!(result.success);
|
||||
assert!(result.stdout.contains("architecture name"));
|
||||
}
|
|
@ -46,6 +46,7 @@ macro_rules! generic {
|
|||
};
|
||||
}
|
||||
generic! {
|
||||
"arch", test_arch;
|
||||
"base32", test_base32;
|
||||
"base64", test_base64;
|
||||
"basename", test_basename;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue