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 Add combi test 2015-12-31 23:27:06 +01:00
run_dmenu_custom_test.sh Update test to change multi-select and return codes. 2016-07-22 16:25:49 +02:00
run_dmenu_empty.sh Fix test for empty dmenu list 2016-01-25 09:07:39 +01:00
run_dmenu_issue_292.sh Update tests 2016-07-19 00:16:49 +02:00
run_dmenu_normal_window_test.sh Test something 2016-08-19 19:40:39 +02:00
run_dmenu_test.sh Update tests 2016-07-19 00:16:49 +02:00
run_drun_test.sh Add simple drun test 2015-12-31 23:14:38 +01:00
run_errormsg_test.sh Play with adding some more test, bug fixes 2014-08-30 20:45:08 +02:00
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 Fix: 256 Do not accept custom entry when not applicable. 2015-10-31 18:04:55 +01:00
run_issue_275.sh Fix issue #275: don't try to do move cursor when nothing is shown. 2015-11-20 11:43:22 +01:00
run_regex_test.sh Add fuzzy matching, make a -matching option. 2016-08-25 21:17:58 +02:00
run_run_test.sh Fix travis test. 2015-02-15 21:34:13 +01:00
run_screenshot_test.sh Add screenshot test 2015-12-31 21:55:15 +01:00
run_script_test.sh Fixing path. 2015-11-28 12:59:10 +01:00
run_switchdialog_test.sh More splitting and abstracting. 2016-01-07 21:27:20 +01:00
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 Add small script test. 2014-08-31 10:37:12 +02:00
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