Add two new tests; bit unrelated tbh.

This commit is contained in:
ClementTsang 2020-03-03 01:02:54 -05:00
parent a8d3593518
commit effd494683

View file

@ -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(())
}