diff options
author | Ton Voon <ton.voon@opsera.com> | 2010-06-21 13:31:21 +0100 |
---|---|---|
committer | Ton Voon <ton.voon@opsera.com> | 2010-06-21 13:31:21 +0100 |
commit | 29cf8ff2fea1a8f0e1f56b9f8a07fd7ee68c1770 (patch) | |
tree | 4ef9aeb91cbdad8b8e5623b50e94b0a98507ba2d /lib/tests | |
parent | 602896277c76298bcbc152312d915dec306eda27 (diff) | |
download | monitoring-plugins-29cf8ff2fea1a8f0e1f56b9f8a07fd7ee68c1770.tar.gz |
Convert bad chars to underscore
Diffstat (limited to 'lib/tests')
-rw-r--r-- | lib/tests/test_utils.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/tests/test_utils.c b/lib/tests/test_utils.c index e90d4fb5..ffab7486 100644 --- a/lib/tests/test_utils.c +++ b/lib/tests/test_utils.c | |||
@@ -298,6 +298,12 @@ main (int argc, char **argv) | |||
298 | ok( !strcmp(temp_state_key->name, "Ahash"), "Got key name" ); | 298 | ok( !strcmp(temp_state_key->name, "Ahash"), "Got key name" ); |
299 | 299 | ||
300 | 300 | ||
301 | np_enable_state("bad^chars$in@here", 77); | ||
302 | temp_state_key = temp_nagios_plugin->state; | ||
303 | ok( !strcmp(temp_state_key->plugin_name, "check_test"), "Got plugin name" ); | ||
304 | ok( !strcmp(temp_state_key->name, "bad_chars_in_here"), "Got key name with bad chars replaced" ); | ||
305 | ok( !strcmp(temp_state_key->_filename, "/usr/local/nagios/var/check_test/bad_chars_in_here"), "Got internal filename" ); | ||
306 | |||
301 | np_enable_state("funnykeyname", 54); | 307 | np_enable_state("funnykeyname", 54); |
302 | temp_state_key = temp_nagios_plugin->state; | 308 | temp_state_key = temp_nagios_plugin->state; |
303 | ok( !strcmp(temp_state_key->plugin_name, "check_test"), "Got plugin name" ); | 309 | ok( !strcmp(temp_state_key->plugin_name, "check_test"), "Got plugin name" ); |