We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
hex
lscpu
1 parent ffe2ba6 commit 1681794Copy full SHA for 1681794
2 files changed
src/uu/lscpu/src/lscpu.rs
@@ -16,7 +16,7 @@ const USAGE: &str = help_usage!("lscpu.md");
16
pub fn uumain(args: impl uucore::Args) -> UResult<()> {
17
let _matches: clap::ArgMatches = uu_app().try_get_matches_from(args)?;
18
let system = System::new_all();
19
- let hex= _matches.get_flag(options::HEX);
+ let hex = _matches.get_flag(options::HEX);
20
21
println!("Architecture: {}", get_architecture());
22
if hex {
tests/by-util/test_lscpu.rs
@@ -9,3 +9,8 @@ use crate::common::util::TestScenario;
9
fn test_invalid_arg() {
10
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
11
}
12
+
13
+#[test]
14
+fn test_lscpt_with_arg() {
15
+ new_ucmd!().arg("--hex").succeeds().stdout_contains("0x");
+}
0 commit comments