summaryrefslogtreecommitdiff
path: root/tests/unit/core/test-core-util.cpp
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2020-04-21 22:31:12 +0200
committerSébastien Helleu <flashcode@flashtux.org>2020-04-21 22:34:42 +0200
commit100440c8a1ff15dd7d9d42cbdf591647a2ee6bf7 (patch)
tree8c6e467ff6595293af9eeb68a362c50090118147 /tests/unit/core/test-core-util.cpp
parentde1e61f7cd50cbd1a99777fe6611642a51abf5f6 (diff)
downloadweechat-100440c8a1ff15dd7d9d42cbdf591647a2ee6bf7.zip
core: restore signal "signal_sighup", and if eaten do not reload configuration
Diffstat (limited to 'tests/unit/core/test-core-util.cpp')
-rw-r--r--tests/unit/core/test-core-util.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/unit/core/test-core-util.cpp b/tests/unit/core/test-core-util.cpp
index eb83096e4..fc5624293 100644
--- a/tests/unit/core/test-core-util.cpp
+++ b/tests/unit/core/test-core-util.cpp
@@ -261,6 +261,25 @@ TEST(CoreUtil, SignalSearch)
/*
* Tests functions:
+ * util_signal_search_number
+ */
+
+TEST(CoreUtil, SignalSearchNumber)
+{
+ POINTERS_EQUAL(NULL, util_signal_search_number (-1));
+ POINTERS_EQUAL(NULL, util_signal_search_number (999999999));
+
+ STRCMP_EQUAL("hup", util_signal_search_number (SIGHUP));
+ STRCMP_EQUAL("int", util_signal_search_number (SIGINT));
+ STRCMP_EQUAL("quit", util_signal_search_number (SIGQUIT));
+ STRCMP_EQUAL("kill", util_signal_search_number (SIGKILL));
+ STRCMP_EQUAL("term", util_signal_search_number (SIGTERM));
+ STRCMP_EQUAL("usr1", util_signal_search_number (SIGUSR1));
+ STRCMP_EQUAL("usr2", util_signal_search_number (SIGUSR2));
+}
+
+/*
+ * Tests functions:
* util_catch_signal
*/