mirror of
https://github.com/ClementTsang/bottom
synced 2024-11-10 14:44:18 +00:00
Add two new tests; bit unrelated tbh.
This commit is contained in:
parent
a8d3593518
commit
effd494683
1 changed files with 29 additions and 1 deletions
|
@ -5,7 +5,7 @@ use predicates::prelude::*;
|
|||
|
||||
// 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======================//
|
||||
|
||||
|
@ -71,3 +71,31 @@ fn test_invalid_rate() -> Result<(), Box<dyn std::error::Error>> {
|
|||
|
||||
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…
Reference in a new issue