diff options
author | ClementTsang <cjhtsang@uwaterloo.ca> | 2021-11-20 22:45:49 -0500 |
---|---|---|
committer | ClementTsang <cjhtsang@uwaterloo.ca> | 2021-11-20 22:45:49 -0500 |
commit | cc66f1fcaea6d31581efea7dfc1b0029e4754f49 (patch) | |
tree | 4d9c2f0a6d9ddaefd73e95caddfa9d356e173e89 /tests | |
parent | 5833cb8ad1f30d42efd9dc7f5f27bed35882bc95 (diff) |
refactor: mostly add back tree mode for process
Mouse control on collapse is not working yet, need to do some work
internally first.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/arg_tests.rs | 42 | ||||
-rw-r--r-- | tests/invalid_config_tests.rs | 22 | ||||
-rw-r--r-- | tests/invalid_configs/invalid_default_widget_count.toml | 3 | ||||
-rw-r--r-- | tests/invalid_configs/lone_default_widget_count.toml | 2 |
4 files changed, 1 insertions, 68 deletions
diff --git a/tests/arg_tests.rs b/tests/arg_tests.rs index 34db7cf4..9473e7ac 100644 --- a/tests/arg_tests.rs +++ b/tests/arg_tests.rs @@ -134,45 +134,3 @@ fn test_conflicting_temps() { "cannot be used with one or more of the other specified arguments", )); } - -#[test] -fn test_invalid_default_widget_1() { - Command::new(get_binary_location()) - .arg("-C") - .arg("./tests/empty_config.toml") - .arg("--default_widget_type") - .arg("fake_widget") - .assert() - .failure() - .stderr(predicate::str::contains("invalid widget name")); -} - -#[test] -fn test_invalid_default_widget_2() { - Command::new(get_binary_location()) - .arg("-C") - .arg("./tests/empty_config.toml") - .arg("--default_widget_type") - .arg("cpu") - .arg("--default_widget_count") - .arg("18446744073709551616") - .assert() - .failure() - .stderr(predicate::str::contains( - "set your widget count to be at most unsigned INT_MAX", - )); -} - -#[test] -fn test_missing_default_widget_type() { - Command::new(get_binary_location()) - .arg("-C") - .arg("./tests/empty_config.toml") - .arg("--default_widget_count") - .arg("3") - .assert() - .failure() - .stderr(predicate::str::contains( - "The following required arguments were not provided", - )); -} diff --git a/tests/invalid_config_tests.rs b/tests/invalid_config_tests.rs index ca3f7e24..f8908b5c 100644 --- a/tests/invalid_config_tests.rs +++ b/tests/invalid_config_tests.rs @@ -25,7 +25,7 @@ fn test_empty_layout() { .arg("./tests/invalid_configs/empty_layout.toml") .assert() .failure() - .stderr(predicate::str::contains("at least one widget")); + .stderr(predicate::str::contains("Configuration file error")); // FIXME: [Urgent] Use a const for the error pattern } #[test] @@ -123,23 +123,3 @@ fn test_invalid_colour_string() { .failure() .stderr(predicate::str::contains("invalid named colour")); } - -#[test] -fn test_lone_default_widget_count() { - Command::new(get_binary_location()) - .arg("-C") - .arg("./tests/invalid_configs/lone_default_widget_count.toml") - .assert() - .failure() - .stderr(predicate::str::contains("it must be used with")); -} - -#[test] -fn test_invalid_default_widget_count() { - Command::new(get_binary_location()) - .arg("-C") - .arg("./tests/invalid_configs/invalid_default_widget_count.toml") - .assert() - .failure() - .stderr(predicate::str::contains("invalid number")); -} diff --git a/tests/invalid_configs/invalid_default_widget_count.toml b/tests/invalid_configs/invalid_default_widget_count.toml deleted file mode 100644 index 968d6fb8..00000000 --- a/tests/invalid_configs/invalid_default_widget_count.toml +++ /dev/null @@ -1,3 +0,0 @@ -[flags] -default_widget_type="CPU" -default_widget_count=18446744073709551616 diff --git a/tests/invalid_configs/lone_default_widget_count.toml b/tests/invalid_configs/lone_default_widget_count.toml deleted file mode 100644 index 6b508631..00000000 --- a/tests/invalid_configs/lone_default_widget_count.toml +++ /dev/null @@ -1,2 +0,0 @@ -[flags] -default_widget_count = 3 |