diff options
author | Clement Tsang <34804052+ClementTsang@users.noreply.github.com> | 2020-04-01 20:31:43 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-01 20:31:43 -0400 |
commit | 0b1d84fdf590bf8cacc5d0f94b67f63daa9b768a (patch) | |
tree | d2ff261148f9ef21f2e860af43f795df911c5c79 /tests | |
parent | c1a19f960fc1b348dd4465fe9a4d698bed229c77 (diff) |
Add modularity to widget placement and inclusion (#95)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/arg_tests.rs | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/tests/arg_tests.rs b/tests/arg_tests.rs index 627b1cbe..0cf0cd45 100644 --- a/tests/arg_tests.rs +++ b/tests/arg_tests.rs @@ -141,14 +141,28 @@ fn test_conflicting_temps() -> Result<(), Box<dyn std::error::Error>> { } #[test] -fn test_conflicting_default_widget() -> Result<(), Box<dyn std::error::Error>> { +fn test_invalid_default_widget_1() -> Result<(), Box<dyn std::error::Error>> { Command::new(get_os_binary_loc()) - .arg("--cpu_default") - .arg("--disk_default") + .arg("--default_widget_type") + .arg("fake_widget") + .assert() + .failure() + .stderr(predicate::str::contains("Invalid widget type")); + + Ok(()) +} + +#[test] +fn test_invalid_default_widget_2() -> Result<(), Box<dyn std::error::Error>> { + Command::new(get_os_binary_loc()) + .arg("--default_widget_type") + .arg("cpu") + .arg("--default_widget_count") + .arg("18446744073709551616") .assert() .failure() .stderr(predicate::str::contains( - "cannot be used with one or more of the other specified arguments", + "Please set your widget count to be at most unsigned INT_MAX", )); Ok(()) |