diff --git a/CMakeLists.txt b/CMakeLists.txt index c6c334a..8c80538 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,6 +111,10 @@ if(BUILD_TESTING) COMMAND tmux-mem-cpu-load --colors ) + add_test(NAME colors_short + COMMAND tmux-mem-cpu-load -c + ) + add_test(NAME powerline COMMAND tmux-mem-cpu-load --powerline ) @@ -151,6 +155,22 @@ if(BUILD_TESTING) COMMAND tmux-mem-cpu-load -a 3 ) + add_test(NAME cpu_mode_0 + COMMAND tmux-mem-cpu-load --cpu-mode 0 + ) + + add_test(NAME cpu_mode_1 + COMMAND tmux-mem-cpu-load --cpu-mode 1 + ) + + add_test(NAME cpu_mode_short_0 + COMMAND tmux-mem-cpu-load -t 0 + ) + + add_test(NAME cpu_mode_short_1 + COMMAND tmux-mem-cpu-load -t 1 + ) + set_tests_properties(usage invalid_status_interval invalid_graph_lines diff --git a/common/main.cc b/common/main.cc index dbd9bb2..211c4be 100644 --- a/common/main.cc +++ b/common/main.cc @@ -141,7 +141,7 @@ int main( int argc, char** argv ) int c; // while c != -1 - while( (c = getopt_long( argc, argv, "hi:c:g:m:a:t:", long_options, NULL) ) != -1 ) + while( (c = getopt_long( argc, argv, "hi:cg:m:a:t:", long_options, NULL) ) != -1 ) { switch( c ) {