mirror of
https://github.com/ClementTsang/bottom.git
synced 2025-07-23 13:45:12 +02:00
Add two new tests; bit unrelated tbh.
This commit is contained in:
parent
a8d3593518
commit
effd494683
@ -5,7 +5,7 @@ use predicates::prelude::*;
|
|||||||
|
|
||||||
// These tests are mostly here just to ensure that invalid results will be caught when passing arguments...
|
// These tests are mostly here just to ensure that invalid results will be caught when passing arguments...
|
||||||
|
|
||||||
// TODO: [TEST] Allow for release testing.
|
// TODO: [TEST] Allow for release testing. Do this with paths.
|
||||||
|
|
||||||
//======================RATES======================//
|
//======================RATES======================//
|
||||||
|
|
||||||
@ -71,3 +71,31 @@ fn test_invalid_rate() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_conflicting_temps() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
|
Command::new(get_os_binary_loc())
|
||||||
|
.arg("-c")
|
||||||
|
.arg("-f")
|
||||||
|
.assert()
|
||||||
|
.failure()
|
||||||
|
.stderr(predicate::str::contains(
|
||||||
|
"cannot be used with one or more of the other specified arguments",
|
||||||
|
));
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_conflicting_default_widget() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
|
Command::new(get_os_binary_loc())
|
||||||
|
.arg("--cpu_default")
|
||||||
|
.arg("--disk_default")
|
||||||
|
.assert()
|
||||||
|
.failure()
|
||||||
|
.stderr(predicate::str::contains(
|
||||||
|
"cannot be used with one or more of the other specified arguments",
|
||||||
|
));
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user