1
Fork 0
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:
Roy Ivy III 2020-05-10 20:11:10 -05:00 committed by GitHub
commit 9052bc4de7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 1 deletions

View file

@ -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
View 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"));
}

View file

@ -46,6 +46,7 @@ macro_rules! generic {
};
}
generic! {
"arch", test_arch;
"base32", test_base32;
"base64", test_base64;
"basename", test_basename;