rofi/test
Till Hofmann b77a48c628 tests: initialize char* in mode test (#875)
* tests: initialize char* in mode test

Currently, test_mode_result relies on undefined behavior.
The test calls mode_result, which checks whether the pointer is NULL.
However, the pointer was never initialized, so it may or may not be
NULL, depending on the compiler.

This caused a test failure on ppc64 and Fedora 28, apparently because in
this setting, gcc sets uninitialized pointers to NULL.

By initializing the pointer to the empty string, the behavior is defined
and the test passes on all architectures.

* mode: fix input pointer check in mode_result

Do not check whether *input (i.e., the char* the input points to) is
NULL, as this is valid. Instead, check whether the input itself is NULL.

* tests: make char* input arg in test_mode_result modifiable

The function mode_result expects a modifiable char*, initialize the
argument properly so it can be modified.
2018-12-14 17:05:07 +01:00
..
box-test.c Cleanup compiler warnings. 2017-09-17 18:17:26 +02:00
convert_old_theme_test.sh Remove leading # from dump theme and add mesg about rofi dumping it 2017-10-31 19:29:27 +01:00
default_theme_test.sh Remove leading # from dump theme and add mesg about rofi dumping it 2017-10-31 19:29:27 +01:00
help_output_test.sh Update tests 2017-03-11 14:55:58 +01:00
helper-config-cmdline-parser.c helper: Add API to support startup notification 2017-06-02 14:54:21 +02:00
helper-expand.c helper: Add API to support startup notification 2017-06-02 14:54:21 +02:00
helper-pidfile.c [Test] Helper:Pidfile generate tmp. pidfilename. 2018-05-16 22:07:53 +02:00
helper-test.c [Helper] Remove fixed key/values and accept keys with NULL as values. 2018-10-17 22:41:20 +02:00
helper-tokenize.c Rename tokenize to helper_tokenize 2017-10-01 10:51:02 +02:00
history-test.c Fix licenses headers 2017-04-15 12:32:05 +02:00
mode-test.c tests: initialize char* in mode test (#875) 2018-12-14 17:05:07 +01:00
run_all_tests.sh Added option -name-only to match only desktop entry name with drun (#690) 2017-10-21 11:18:52 +02:00
run_combi_test.sh
run_dmenu_custom_test.sh
run_dmenu_empty.sh
run_dmenu_issue_292.sh
run_dmenu_normal_window_test.sh
run_dmenu_test.sh
run_drun_test.sh
run_errormsg_test.sh
run_glob_test.sh Add fuzzy matching, make a -matching option. 2016-08-25 21:17:58 +02:00
run_issue333_test.sh test-x/issue333: Fix binding Control+a for the test 2017-05-30 15:08:46 +02:00
run_issue_256.sh
run_issue_275.sh
run_regex_test.sh Add fuzzy matching, make a -matching option. 2016-08-25 21:17:58 +02:00
run_run_test.sh
run_screenshot_test.sh
run_script_test.sh
run_switchdialog_test.sh
run_test.sh [Theme] Change window layout for error dialog 2018-06-14 11:16:32 +02:00
run_window_test.sh [Tests] Fix window test. 2018-07-10 13:53:40 +02:00
scrollbar-test.c Cleanup compiler warnings. 2017-09-17 18:17:26 +02:00
test_script.sh
textbox-test.c Cleanup compiler warnings. 2017-09-17 18:17:26 +02:00
theme-parser-test.c [Tests] Fix tests for theme-parser. 2017-10-22 13:20:29 +02:00
widget-test.c Cleanup compiler warnings. 2017-09-17 18:17:26 +02:00
xr_dump_test.sh Print out diff of failing match 2017-04-25 20:13:34 +02:00