badwords: fix issues found in tests

There remain some false positives, hits in test data, and `dir` use,
around 100 issues in total.

There is no plan to enforce badwords on tests.

Also:
- badwords.txt: let a few `manpage[s]` occurrences through
  (in Perl code).

Closes #19541
This commit is contained in:
Viktor Szakats 2025-11-15 00:27:38 +01:00
parent f0de14168a
commit a87383828e
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
247 changed files with 594 additions and 595 deletions

View file

@ -47,7 +47,7 @@ For the actual C file, here's a simple example:
~~~c
#include "unitcheck.h"
#include "a libcurl header.h" /* from the lib dir */
#include "a libcurl header.h" /* from the lib directory */
static CURLcode test_unit9998(const char *arg)
{
@ -68,7 +68,7 @@ Here's an example using optional initialization and cleanup:
~~~c
#include "unitcheck.h"
#include "a libcurl header.h" /* from the lib dir */
#include "a libcurl header.h" /* from the lib directory */
static CURLcode t9999_setup(void)
{

View file

@ -127,7 +127,7 @@ static CURLcode test_unit1300(const char *arg)
fail_unless(Curl_node_elem(Curl_node_next(Curl_llist_head(&llist))) ==
&unusedData_case2,
"the node next to head is not getting set correctly");
/* better safe than sorry, check that the tail isn't corrupted */
/* better safe than sorry, check that the tail is not corrupted */
fail_unless(Curl_node_elem(Curl_llist_tail(&llist)) != &unusedData_case2,
"the list tail is not getting set correctly");

View file

@ -47,7 +47,7 @@ static void t1303_stop(struct Curl_easy *easy)
}
/* BASE is just a define to make us fool around with decently large number so
that we aren't zero-based */
that we are not zero-based */
#define BASE 1000000
/* macro to set the pretended current time */

View file

@ -186,13 +186,13 @@ static CURLcode test_unit1307(const char *arg)
{ "[[:foo:]]", "bar", NOMATCH|MAC_FAIL},
{ "[[:foo:]]", "f]", MATCH|LINUX_NOMATCH|MAC_FAIL},
{ "Curl[[:blank:]];-)", "Curl ;-)", MATCH },
{ "curl[[:blank:]];-)", "curl ;-)", MATCH },
{ "*[[:blank:]]*", " ", MATCH },
{ "*[[:blank:]]*", "", NOMATCH },
{ "*[[:blank:]]*", "hi, im_Pavel", MATCH },
/* common using */
{ "filename.dat", "filename.dat", MATCH },
{ "Filename.dat", "Filename.dat", MATCH },
{ "*curl*", "lets use curl!!", MATCH },
{ "filename.txt", "filename.dat", NOMATCH },
{ "*.txt", "text.txt", MATCH },

View file

@ -54,10 +54,10 @@ static CURLcode test_unit1605(const char *arg)
char *esc;
esc = curl_easy_escape(easy, "", -1);
fail_unless(esc == NULL, "negative string length can't work");
fail_unless(esc == NULL, "negative string length cannot work");
esc = curl_easy_unescape(easy, "%41%41%41%41", -1, &len);
fail_unless(esc == NULL, "negative string length can't work");
fail_unless(esc == NULL, "negative string length cannot work");
UNITTEST_END(t1605_stop(easy))
}

View file

@ -66,7 +66,7 @@ static CURLcode test_unit1607(const char *arg)
/* CURLOPT_RESOLVE address parsing tests */
static const struct testcase tests[] = {
/* spaces aren't allowed, for now */
/* spaces are not allowed, for now */
{ "test.com:80:127.0.0.1, 127.0.0.2",
"test.com", 80, TRUE, { NULL, }
},

View file

@ -85,7 +85,7 @@ static CURLcode test_unit1609(const char *arg)
};
static const struct testcase tests[] = {
/* spaces aren't allowed, for now */
/* spaces are not allowed, for now */
{ "test.com:80:127.0.0.1",
"test.com", 80, { "127.0.0.1", }
},

View file

@ -37,7 +37,7 @@ static char output[4096];
/*
* This debugf callback is simply dumping the string into the static buffer
* for the unit test to inspect. Since we know that we're only dealing with
* for the unit test to inspect. Since we know that we are only dealing with
* text we can afford the luxury of skipping the type check here.
*/
static int debugf_cb(CURL *handle, curl_infotype type, char *buf, size_t size,

View file

@ -173,7 +173,7 @@ static CURLcode test_unit1653(const char *arg)
free_and_clear(ipv6port);
curl_url_cleanup(u);
/* Incorrect zone index syntax, but the port extractor doesn't care */
/* Incorrect zone index syntax, but the port extractor does not care */
u = curl_url();
if(!u)
goto fail;

View file

@ -119,13 +119,13 @@ static CURLcode test_unit1654(const char *arg)
ALPN_h2, "6.example.net", 80);
fail_if(res, "Curl_altsvc_parse(9) failed!");
/* missing port in host name */
/* missing port in hostname */
res = Curl_altsvc_parse(curl, asi,
"h2=\"example.net\"; ma=\"180\";\r\n",
ALPN_h2, "7.example.net", 80);
fail_if(res, "Curl_altsvc_parse(10) failed!");
/* illegal port in host name */
/* illegal port in hostname */
res = Curl_altsvc_parse(curl, asi,
"h2=\"example.net:70000\"; ma=\"180\";\r\n",
ALPN_h2, "8.example.net", 80);

View file

@ -23,7 +23,7 @@
***************************************************************************/
#include "unitcheck.h"
#include "doh.h" /* from the lib dir */
#include "doh.h"
static CURLcode test_unit1655(const char *arg)
{

View file

@ -23,7 +23,7 @@
***************************************************************************/
#include "unitcheck.h"
#include "doh.h" /* from the lib dir */
#include "doh.h"
/* DoH + HTTPSRR are required */
#if !defined(CURL_DISABLE_DOH) && defined(USE_HTTPSRR)