diff options
author | Jan Wagner <waja@cyconet.org> | 2023-04-14 14:37:47 +0000 |
---|---|---|
committer | Jan Wagner <waja@cyconet.org> | 2023-04-14 18:35:00 +0000 |
commit | 0f3703e641f0f995a8abb40056cb5430b6c228c4 (patch) | |
tree | abfb970cab5f7bfed94fe0b70ddfc37ed24cc567 /lib/tests/test_cmd.c | |
parent | e44dcb80f1fdab2751cd460325391676e4f1a466 (diff) | |
download | monitoring-plugins-0f3703e641f0f995a8abb40056cb5430b6c228c4.tar.gz |
Fix a lot of typos reported by codespell
Diffstat (limited to 'lib/tests/test_cmd.c')
-rw-r--r-- | lib/tests/test_cmd.c | 14 |
1 files changed, 7 insertions, 7 deletions
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) | |||
176 | ok (result == UNSET, "(initialised) Checking exit code is reset"); | 176 | ok (result == UNSET, "(initialised) Checking exit code is reset"); |
177 | 177 | ||
178 | command = (char *)malloc(COMMAND_LINE); | 178 | command = (char *)malloc(COMMAND_LINE); |
179 | strcpy(command, "/bin/echo3456 non-existant command"); | 179 | strcpy(command, "/bin/echo3456 non-existent command"); |
180 | result = cmd_run (command, &chld_out, &chld_err, 0); | 180 | result = cmd_run (command, &chld_out, &chld_err, 0); |
181 | 181 | ||
182 | ok (chld_out.lines == 0, | 182 | ok (chld_out.lines == 0, |
183 | "Non existant command, so no output"); | 183 | "Non existent command, so no output"); |
184 | ok (chld_err.lines == 0, | 184 | ok (chld_err.lines == 0, |
185 | "No stderr either"); | 185 | "No stderr either"); |
186 | ok (result == 3, "Get return code 3 (?) for non-existant command"); | 186 | ok (result == 3, "Get return code 3 (?) for non-existent command"); |
187 | 187 | ||
188 | 188 | ||
189 | /* ensure everything is empty again */ | 189 | /* ensure everything is empty again */ |
@@ -192,14 +192,14 @@ main (int argc, char **argv) | |||
192 | result = UNSET; | 192 | result = UNSET; |
193 | 193 | ||
194 | command = (char *)malloc(COMMAND_LINE); | 194 | command = (char *)malloc(COMMAND_LINE); |
195 | strcpy(command, "/bin/sh non-existant-file"); | 195 | strcpy(command, "/bin/sh non-existent-file"); |
196 | result = cmd_run (command, &chld_out, &chld_err, 0); | 196 | result = cmd_run (command, &chld_out, &chld_err, 0); |
197 | 197 | ||
198 | ok (chld_out.lines == 0, | 198 | ok (chld_out.lines == 0, |
199 | "/bin/sh returns no stdout when file is missing..."); | 199 | "/bin/sh returns no stdout when file is missing..."); |
200 | ok (chld_err.lines == 1, | 200 | ok (chld_err.lines == 1, |
201 | "...but does give an error line"); | 201 | "...but does give an error line"); |
202 | ok (strstr(chld_err.line[0],"non-existant-file") != NULL, "And missing filename is in error message"); | 202 | ok (strstr(chld_err.line[0],"non-existent-file") != NULL, "And missing filename is in error message"); |
203 | ok (result != 0, "Get non-zero return code from /bin/sh"); | 203 | ok (result != 0, "Get non-zero return code from /bin/sh"); |
204 | 204 | ||
205 | 205 | ||
@@ -219,11 +219,11 @@ main (int argc, char **argv) | |||
219 | result = UNSET; | 219 | result = UNSET; |
220 | 220 | ||
221 | command = (char *)malloc(COMMAND_LINE); | 221 | command = (char *)malloc(COMMAND_LINE); |
222 | strcpy(command, "/bin/non-existant-command"); | 222 | strcpy(command, "/bin/non-existent-command"); |
223 | result = cmd_run (command, &chld_out, &chld_err, 0); | 223 | result = cmd_run (command, &chld_out, &chld_err, 0); |
224 | 224 | ||
225 | ok (chld_out.lines == 0, | 225 | ok (chld_out.lines == 0, |
226 | "/bin/non-existant-command returns no stdout..."); | 226 | "/bin/non-existent-command returns no stdout..."); |
227 | ok (chld_err.lines == 0, | 227 | ok (chld_err.lines == 0, |
228 | "...and no stderr output either"); | 228 | "...and no stderr output either"); |
229 | ok (result == 3, "Get return code 3 = UNKNOWN when command does not exist"); | 229 | ok (result == 3, "Get return code 3 = UNKNOWN when command does not exist"); |