diff options
author | ClementTsang <cjhtsang@uwaterloo.ca> | 2020-03-03 01:02:54 -0500 |
---|---|---|
committer | ClementTsang <cjhtsang@uwaterloo.ca> | 2020-03-03 01:02:54 -0500 |
commit | effd494683a68f98f19866c3c10fb4e3f083fb66 (patch) | |
tree | 0a2207e319af4044c937dda38af443df7de1819c /tests | |
parent | a8d3593518a994f91d56e8412cf8553e2ff674f6 (diff) |
Add two new tests; bit unrelated tbh.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/arg_rate_tests.rs | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/tests/arg_rate_tests.rs b/tests/arg_rate_tests.rs index af43f217..85b3da0f 100644 --- a/tests/arg_rate_tests.rs +++ b/tests/arg_rate_tests.rs @@ -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(()) +} |