diff --git a/src/uu/arch/src/arch.rs b/src/uu/arch/src/arch.rs index d27b5d216..ced3d6e97 100644 --- a/src/uu/arch/src/arch.rs +++ b/src/uu/arch/src/arch.rs @@ -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 = ""; diff --git a/tests/test_arch.rs b/tests/test_arch.rs new file mode 100644 index 000000000..f5bc3b1e4 --- /dev/null +++ b/tests/test_arch.rs @@ -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")); +} diff --git a/tests/tests.rs b/tests/tests.rs index ead3b68f9..189cdb988 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -46,6 +46,7 @@ macro_rules! generic { }; } generic! { + "arch", test_arch; "base32", test_base32; "base64", test_base64; "basename", test_basename;