From 0b1d84fdf590bf8cacc5d0f94b67f63daa9b768a Mon Sep 17 00:00:00 2001 From: Clement Tsang <34804052+ClementTsang@users.noreply.github.com> Date: Wed, 1 Apr 2020 20:31:43 -0400 Subject: Add modularity to widget placement and inclusion (#95) --- tests/arg_tests.rs | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'tests') 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> { } #[test] -fn test_conflicting_default_widget() -> Result<(), Box> { +fn test_invalid_default_widget_1() -> Result<(), Box> { 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> { + 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(()) -- cgit v1.2.3