Added tests for "cpu-mode", short opt --colour

Also fixed (properly) ad83d9b
This commit is contained in:
Josh Davies 2016-06-26 14:47:02 +01:00
parent ad83d9b3a9
commit 4a2c4efb9a
2 changed files with 21 additions and 1 deletions

@ -111,6 +111,10 @@ if(BUILD_TESTING)
COMMAND tmux-mem-cpu-load --colors COMMAND tmux-mem-cpu-load --colors
) )
add_test(NAME colors_short
COMMAND tmux-mem-cpu-load -c
)
add_test(NAME powerline add_test(NAME powerline
COMMAND tmux-mem-cpu-load --powerline COMMAND tmux-mem-cpu-load --powerline
) )
@ -151,6 +155,22 @@ if(BUILD_TESTING)
COMMAND tmux-mem-cpu-load -a 3 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 set_tests_properties(usage
invalid_status_interval invalid_status_interval
invalid_graph_lines invalid_graph_lines

@ -141,7 +141,7 @@ int main( int argc, char** argv )
int c; int c;
// while c != -1 // 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 ) switch( c )
{ {