diff options
author | Ton Voon <ton.voon@opsera.com> | 2010-06-21 21:40:29 (GMT) |
---|---|---|
committer | Ton Voon <ton.voon@opsera.com> | 2010-06-21 21:40:29 (GMT) |
commit | 10364a6004616c2e52852d80b1e1817056aa7119 (patch) | |
tree | 24ee913df772bd0b14b6e4e9252adc331aad20bb /lib/tests | |
parent | 72074a8f2e99d3a36899f7c5533f2bbe8c5e18cd (diff) | |
download | monitoring-plugins-10364a6004616c2e52852d80b1e1817056aa7119.tar.gz |
Invalid chars in keyname now die()
Diffstat (limited to 'lib/tests')
-rw-r--r-- | lib/tests/test_utils.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/tests/test_utils.c b/lib/tests/test_utils.c index ce79fc6..4f761a6 100644 --- a/lib/tests/test_utils.c +++ b/lib/tests/test_utils.c | |||
@@ -308,11 +308,19 @@ main (int argc, char **argv) | |||
308 | ok( !strcmp(temp_state_key->name, "83d877b6cdfefb5d6f06101fd6fe76762f21792c"), "Got generated filename" ); | 308 | ok( !strcmp(temp_state_key->name, "83d877b6cdfefb5d6f06101fd6fe76762f21792c"), "Got generated filename" ); |
309 | 309 | ||
310 | 310 | ||
311 | np_enable_state("bad^chars$in@here", 77); | 311 | np_enable_state("allowedchars_in_keyname", 77); |
312 | temp_state_key = this_nagios_plugin->state; | 312 | temp_state_key = this_nagios_plugin->state; |
313 | ok( !strcmp(temp_state_key->plugin_name, "check_test"), "Got plugin name" ); | 313 | ok( !strcmp(temp_state_key->plugin_name, "check_test"), "Got plugin name" ); |
314 | ok( !strcmp(temp_state_key->name, "allowedchars_in_keyname"), "Got key name with valid chars" ); | ||
315 | ok( !strcmp(temp_state_key->_filename, "/usr/local/nagios/var/check_test/allowedchars_in_keyname"), "Got internal filename" ); | ||
316 | |||
317 | |||
318 | /* Don't do this test just yet. Will die */ | ||
319 | /* | ||
320 | np_enable_state("bad^chars$in@here", 77); | ||
321 | temp_state_key = this_nagios_plugin->state; | ||
314 | ok( !strcmp(temp_state_key->name, "bad_chars_in_here"), "Got key name with bad chars replaced" ); | 322 | ok( !strcmp(temp_state_key->name, "bad_chars_in_here"), "Got key name with bad chars replaced" ); |
315 | ok( !strcmp(temp_state_key->_filename, "/usr/local/nagios/var/check_test/bad_chars_in_here"), "Got internal filename" ); | 323 | */ |
316 | 324 | ||
317 | np_enable_state("funnykeyname", 54); | 325 | np_enable_state("funnykeyname", 54); |
318 | temp_state_key = this_nagios_plugin->state; | 326 | temp_state_key = this_nagios_plugin->state; |