mirror of
https://github.com/ClementTsang/bottom
synced 2024-11-24 21:23:08 +00:00
other: add test for battery flag if battery feature is off
This commit is contained in:
parent
c44e860af8
commit
798683b81f
1 changed files with 13 additions and 0 deletions
|
@ -168,3 +168,16 @@ fn test_missing_default_widget_type() {
|
|||
"The following required arguments were not provided",
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_battery_flag() {
|
||||
if !cfg!(feature = "battery") {
|
||||
Command::new(get_binary_location())
|
||||
.arg("--battery")
|
||||
.assert()
|
||||
.failure()
|
||||
.stderr(predicate::str::contains(
|
||||
"'--battery' which wasn't expected",
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue