mirror of
https://github.com/curl/curl.git
synced 2026-08-26 23:04:24 +03:00
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:
parent
f0de14168a
commit
a87383828e
247 changed files with 594 additions and 595 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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, }
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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", }
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
***************************************************************************/
|
||||
#include "unitcheck.h"
|
||||
|
||||
#include "doh.h" /* from the lib dir */
|
||||
#include "doh.h"
|
||||
|
||||
static CURLcode test_unit1655(const char *arg)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue