mirror of
https://github.com/curl/curl.git
synced 2026-08-26 15:53:38 +03:00
tidy-up: miscellaneous
- drop more uses of the word "just". (not enforced here) - drop some uses of the "will" word. - "then" -> "than". - tests/http/testenv/curl.py: fix copy-paste typo in error message. - pytest: replace `shutdownh` with `shutdown` in test names. Spotted by GitHub Code Quality. - comment typos. - whitespace and newlines fixes. Closes #21830
This commit is contained in:
parent
032b15c434
commit
d229055549
116 changed files with 184 additions and 185 deletions
|
|
@ -44,7 +44,7 @@ static void t1303_stop(struct Curl_easy *easy)
|
|||
curl_global_cleanup();
|
||||
}
|
||||
|
||||
/* BASE is just a define to make us fool around with decently large number so
|
||||
/* BASE is a define to make us fool around with decently large number so
|
||||
that we are not zero-based */
|
||||
#define BASE 1000000
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ static CURLcode t1609_setup(void)
|
|||
we set address using CURLOPT_RESOLVE,
|
||||
it usually marks as permanent (by setting timestamp to zero). However,
|
||||
if address already exists
|
||||
in the cache, then it does not mark it, but just leaves it as it is.
|
||||
in the cache, then it does not mark it, but leaves it as it is.
|
||||
So we fixing this by timestamp to zero if address already exists too.
|
||||
|
||||
Test:
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ static CURLcode test_unit1615(const char *arg)
|
|||
};
|
||||
|
||||
unsigned char output_buf[CURL_SHA512_256_DIGEST_LENGTH];
|
||||
const unsigned char *computed_hash; /* Just to mute compiler warning */
|
||||
const unsigned char *computed_hash; /* to mute compiler warning */
|
||||
|
||||
/* Mute compiler warnings in 'verify_memory' macros below */
|
||||
computed_hash = output_buf;
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ static CURLcode test_unit1625(const char *arg)
|
|||
{ "Encoding: a, chunked, ninja", "Encoding:", "chunked", TRUE },
|
||||
/* empty incoming header */
|
||||
{ "Encoding:", "Encoding:", "chunked", FALSE },
|
||||
/* just spaces in header */
|
||||
/* spaces in header */
|
||||
{ "Encoding: ", "Encoding:", "chunked", FALSE },
|
||||
/* last among several with no spaces */
|
||||
{ "Encoding: ab,cd,ef,gh,ig,kl", "Encoding:", "kl", TRUE },
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ static CURLcode test_unit1652(const char *arg)
|
|||
* Any input that long or longer will truncated, ending in '...\n'.
|
||||
*/
|
||||
|
||||
/* A string just long enough to not be truncated */
|
||||
/* A string long enough to not be truncated */
|
||||
memset(input, '\0', sizeof(input));
|
||||
memset(input, 'A', 2045);
|
||||
Curl_infof(easy, "%s", input);
|
||||
|
|
@ -130,7 +130,7 @@ static CURLcode test_unit1652(const char *arg)
|
|||
fail_unless(output[sizeof(output) - 1] == '\0',
|
||||
"No truncation of infof input");
|
||||
|
||||
/* Just over the limit without newline for truncation via '...' */
|
||||
/* Over the limit without newline for truncation via '...' */
|
||||
memset(input + 2045, 'A', 4);
|
||||
Curl_infof(easy, "%s", input);
|
||||
curl_mfprintf(stderr, "output len %zu: %s", strlen(output), output);
|
||||
|
|
@ -138,7 +138,7 @@ static CURLcode test_unit1652(const char *arg)
|
|||
fail_unless(output[sizeof(output) - 1] == '\0',
|
||||
"Truncation of infof input 1");
|
||||
|
||||
/* Just over the limit with newline for truncation via '...' */
|
||||
/* Over the limit with newline for truncation via '...' */
|
||||
memset(input + 2045, 'A', 4);
|
||||
memset(input + 2045 + 4, '\n', 1);
|
||||
Curl_infof(easy, "%s", input);
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ static CURLcode test_unit1655(const char *arg)
|
|||
static const char toolong[] =
|
||||
/* ..|....1.........2.........3.........4.........5.........6... */
|
||||
/* 3456789012345678901234567890123456789012345678901234567890123 */
|
||||
"here.is.a.hostname.which.is.just.barely.too.long." /* 49: 49 */
|
||||
"here.is.a.hostname.which.is.only.barely.too.long." /* 49: 49 */
|
||||
"to.be.encoded.as.a.QNAME.of.the.maximum.allowed.length."
|
||||
/* 55: 104 */
|
||||
"which.is.256.including.a.final.zero-length.label." /* 49: 153 */
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ static CURLcode test_unit1660(const char *arg)
|
|||
struct testit {
|
||||
const char *host;
|
||||
const char *chost; /* if non-NULL, use to lookup with */
|
||||
const char *hdr; /* if NULL, just do the lookup */
|
||||
const char *hdr; /* if NULL, do the lookup */
|
||||
const CURLcode result; /* parse result */
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ static CURLcode test_unit1666(const char *arg)
|
|||
"\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01"
|
||||
"\x01\x01\x01\x01\x01\x01\x01\x01"),
|
||||
"", CURLE_TOO_LARGE },
|
||||
/* one byte shorter than the previous is just below the limit: */
|
||||
/* one byte shorter than the previous is below the limit: */
|
||||
{ OID("\x2b\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01"
|
||||
"\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01"
|
||||
"\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01"
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ static CURLcode cf_test_adjust_pollset(struct Curl_cfilter *cf,
|
|||
struct easy_pollset *ps)
|
||||
{
|
||||
struct cf_test_ctx *ctx = cf->ctx;
|
||||
/* just for testing, give one socket with events back */
|
||||
/* for testing, give one socket with events back */
|
||||
return Curl_pollset_set(data, ps, ctx->idx, TRUE, TRUE);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue