From 0f3703e641f0f995a8abb40056cb5430b6c228c4 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 14 Apr 2023 14:37:47 +0000 Subject: Fix a lot of typos reported by codespell --- lib/tests/test_cmd.c | 14 +++++++------- lib/tests/test_disk.c | 4 ++-- lib/tests/test_ini3.t | 2 +- lib/tests/test_opts3.t | 2 +- lib/tests/test_utils.c | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) (limited to 'lib/tests') diff --git a/lib/tests/test_cmd.c b/lib/tests/test_cmd.c index 29ca42ac..4bb60aac 100644 --- a/lib/tests/test_cmd.c +++ b/lib/tests/test_cmd.c @@ -176,14 +176,14 @@ main (int argc, char **argv) ok (result == UNSET, "(initialised) Checking exit code is reset"); command = (char *)malloc(COMMAND_LINE); - strcpy(command, "/bin/echo3456 non-existant command"); + strcpy(command, "/bin/echo3456 non-existent command"); result = cmd_run (command, &chld_out, &chld_err, 0); ok (chld_out.lines == 0, - "Non existant command, so no output"); + "Non existent command, so no output"); ok (chld_err.lines == 0, "No stderr either"); - ok (result == 3, "Get return code 3 (?) for non-existant command"); + ok (result == 3, "Get return code 3 (?) for non-existent command"); /* ensure everything is empty again */ @@ -192,14 +192,14 @@ main (int argc, char **argv) result = UNSET; command = (char *)malloc(COMMAND_LINE); - strcpy(command, "/bin/sh non-existant-file"); + strcpy(command, "/bin/sh non-existent-file"); result = cmd_run (command, &chld_out, &chld_err, 0); ok (chld_out.lines == 0, "/bin/sh returns no stdout when file is missing..."); ok (chld_err.lines == 1, "...but does give an error line"); - ok (strstr(chld_err.line[0],"non-existant-file") != NULL, "And missing filename is in error message"); + ok (strstr(chld_err.line[0],"non-existent-file") != NULL, "And missing filename is in error message"); ok (result != 0, "Get non-zero return code from /bin/sh"); @@ -219,11 +219,11 @@ main (int argc, char **argv) result = UNSET; command = (char *)malloc(COMMAND_LINE); - strcpy(command, "/bin/non-existant-command"); + strcpy(command, "/bin/non-existent-command"); result = cmd_run (command, &chld_out, &chld_err, 0); ok (chld_out.lines == 0, - "/bin/non-existant-command returns no stdout..."); + "/bin/non-existent-command returns no stdout..."); ok (chld_err.lines == 0, "...and no stderr output either"); ok (result == 3, "Get return code 3 = UNKNOWN when command does not exist"); diff --git a/lib/tests/test_disk.c b/lib/tests/test_disk.c index f6477ac4..9bd68c7a 100644 --- a/lib/tests/test_disk.c +++ b/lib/tests/test_disk.c @@ -88,10 +88,10 @@ main (int argc, char **argv) cflags, 3,strdup("regex on dev names:")); np_test_mount_entry_regex(dummy_mount_list, strdup("/foo"), cflags, 0, - strdup("regex on non existant dev/path:")); + strdup("regex on non existent dev/path:")); np_test_mount_entry_regex(dummy_mount_list, strdup("/Foo"), cflags | REG_ICASE,0, - strdup("regi on non existant dev/path:")); + strdup("regi on non existent dev/path:")); np_test_mount_entry_regex(dummy_mount_list, strdup("/c.t0"), cflags, 3, strdup("partial devname regex match:")); diff --git a/lib/tests/test_ini3.t b/lib/tests/test_ini3.t index a2ca94a4..41169dbc 100755 --- a/lib/tests/test_ini3.t +++ b/lib/tests/test_ini3.t @@ -10,7 +10,7 @@ if (! -e "./test_ini3") { # array of argument arrays # - First value is the expected return code # - 2nd value is the NAGIOS_CONFIG_PATH -# TODO: looks like we look in default path after looking trough this variable - shall we? +# TODO: looks like we look in default path after looking through this variable - shall we? # - 3rd value is the plugin name # - 4th is the ini locator my @TESTS = ( diff --git a/lib/tests/test_opts3.t b/lib/tests/test_opts3.t index 8d974ca0..d77a35ce 100755 --- a/lib/tests/test_opts3.t +++ b/lib/tests/test_opts3.t @@ -10,7 +10,7 @@ if (! -e "./test_opts3") { # array of argument arrays # - First value is the expected return code # - 2nd value is the NAGIOS_CONFIG_PATH -# TODO: looks like we look in default path after looking trough this variable - shall we? +# TODO: looks like we look in default path after looking through this variable - shall we? # - 3rd value is the plugin name # - 4th and up are arguments my @TESTS = ( diff --git a/lib/tests/test_utils.c b/lib/tests/test_utils.c index bc00fac1..7b10494c 100644 --- a/lib/tests/test_utils.c +++ b/lib/tests/test_utils.c @@ -395,7 +395,7 @@ main (int argc, char **argv) ok( temp_state_data==NULL, "Older data version gives NULL" ); temp_state_key->data_version=54; - temp_state_key->_filename="var/nonexistant"; + temp_state_key->_filename="var/nonexistent"; temp_state_data = np_state_read(); ok( temp_state_data==NULL, "Missing file gives NULL" ); ok( this_monitoring_plugin->state->state_data==NULL, "No state information" ); -- cgit v1.2.3-74-g34f1