lib: migrate every test file to the canonical *_test.ww name
25 renames (git mv, content untouched). _test.ww is what the package coordinator's test detection and the sep loader's canonical exclusion key on; the old *test.ww spellings survived only through the line-leading-@test compatibility scan. Consumers updated in place: LIBRARY_TESTS, the libbyteid roster, the 901/974/975/976 carriers that copy or invoke these files, and the check.c/check.ww + path/ftos comments that cite them. Closes the open-driver-work migration bullet.
This commit is contained in:
@@ -104,12 +104,12 @@ fn corpus() []ent = {
|
||||
for (z < es.len) { zeroent(&es[z]); z += 1; };
|
||||
let n: i32 = 0;
|
||||
let k: *i32 = &n;
|
||||
fx(es, k, "lib/bytes/bytestest.ww");
|
||||
fx(es, k, "lib/dirs/dirstest.ww");
|
||||
fx(es, k, "lib/bytes/bytes_test.ww");
|
||||
fx(es, k, "lib/dirs/dirs_test.ww");
|
||||
fx(es, k, "lib/encoding/base32/base32_test.ww");
|
||||
fx(es, k, "lib/encoding/hex/hextest.ww");
|
||||
fx(es, k, "lib/encoding/utf8/utf8test.ww");
|
||||
fx(es, k, "lib/getopt/getopttest.ww");
|
||||
fx(es, k, "lib/encoding/hex/hex_test.ww");
|
||||
fx(es, k, "lib/encoding/utf8/utf8_test.ww");
|
||||
fx(es, k, "lib/getopt/getopt_test.ww");
|
||||
fx(es, k, "lib/hash/adler32/adler32_test.ww");
|
||||
fx(es, k, "lib/hash/crc16/crc16_test.ww");
|
||||
fx(es, k, "lib/hash/crc32/crc32_test.ww");
|
||||
@@ -117,19 +117,19 @@ fn corpus() []ent = {
|
||||
fx(es, k, "lib/hash/siphash/siphash_test.ww");
|
||||
fx(es, k, "lib/math/checked/checked_test.ww");
|
||||
fx(es, k, "lib/math/random/random_test.ww");
|
||||
fx(es, k, "lib/memio/memiotest.ww");
|
||||
fx(es, k, "lib/os/ostest.ww");
|
||||
fx(es, k, "lib/memio/memio_test.ww");
|
||||
fx(es, k, "lib/os/os_test.ww");
|
||||
pr(es, k, "package main;\nimport os.exec;\nfn main() i32 = { return 0; };\n",
|
||||
"package exec;", "lib/os/exec");
|
||||
fx(es, k, "lib/regex/regex_test.ww");
|
||||
fx(es, k, "lib/strconv/test/ftostest.ww");
|
||||
fx(es, k, "lib/strconv/test/stoftest.ww");
|
||||
fx(es, k, "lib/strconv/test/inttest.ww");
|
||||
fx(es, k, "lib/strings/stringstest.ww");
|
||||
fx(es, k, "lib/temp/temptest.ww");
|
||||
fx(es, k, "lib/time/timetest.ww");
|
||||
fx(es, k, "lib/bufio/bufiotest.ww");
|
||||
fx(es, k, "lib/fmt/fmttest.ww");
|
||||
fx(es, k, "lib/strconv/test/ftos_test.ww");
|
||||
fx(es, k, "lib/strconv/test/stof_test.ww");
|
||||
fx(es, k, "lib/strconv/test/int_test.ww");
|
||||
fx(es, k, "lib/strings/strings_test.ww");
|
||||
fx(es, k, "lib/temp/temp_test.ww");
|
||||
fx(es, k, "lib/time/time_test.ww");
|
||||
fx(es, k, "lib/bufio/bufio_test.ww");
|
||||
fx(es, k, "lib/fmt/fmt_test.ww");
|
||||
pr(es, k, "package main;\nimport sort;\nfn main() i32 = { return 0; };\n",
|
||||
"package sort;", "lib/sort");
|
||||
pr(es, k, "package main;\nimport path;\nfn main() i32 = { return 0; };\n",
|
||||
@@ -154,17 +154,17 @@ fn corpus() []ent = {
|
||||
// from the retired 815/940/951 driver-parity carriers. No
|
||||
// sentinel: there is no dep unit to prove.
|
||||
pr(es, k, "package main;\nfn main() i32 = { return 0; };\n", "", "");
|
||||
fx(es, k, "lib/ascii/asciitest.ww");
|
||||
fx(es, k, "lib/ascii/ascii_test.ww");
|
||||
fx(es, k, "lib/encoding/base64/base64_test.ww");
|
||||
fx(es, k, "lib/errors/errnotest.ww");
|
||||
fx(es, k, "lib/log/logtest.ww");
|
||||
fx(es, k, "lib/os/stattest.ww");
|
||||
fx(es, k, "lib/errors/errno_test.ww");
|
||||
fx(es, k, "lib/log/log_test.ww");
|
||||
fx(es, k, "lib/os/stat_test.ww");
|
||||
// toktest/asttest resolve `import syntax` via -I lib/ww, cf 905
|
||||
fxi(es, k, "lib/ww/syntax/toktest.ww", "lib/ww");
|
||||
fxi(es, k, "lib/ww/syntax/asttest.ww", "lib/ww");
|
||||
fxi(es, k, "lib/ww/syntax/tok_test.ww", "lib/ww");
|
||||
fxi(es, k, "lib/ww/syntax/ast_test.ww", "lib/ww");
|
||||
fx(es, k, "lib/crypto/sha256/sha256_test.ww");
|
||||
fx(es, k, "lib/fnmatch/fnmatchtest.ww");
|
||||
fx(es, k, "lib/shlex/shlextest.ww");
|
||||
fx(es, k, "lib/fnmatch/fnmatch_test.ww");
|
||||
fx(es, k, "lib/shlex/shlex_test.ww");
|
||||
assert(n == NENTEXPECT);
|
||||
return es;
|
||||
};
|
||||
|
||||
@@ -151,7 +151,7 @@ main(void)
|
||||
"B fn-ptr struct-field call", 0, 1 },
|
||||
{ "lib/encoding/utf8/utf8.ww",
|
||||
"C abort intrinsic callee", 0, 1 },
|
||||
{ "lib/fnmatch/fnmatchtest.ww",
|
||||
{ "lib/fnmatch/fnmatch_test.ww",
|
||||
"D module-leaf == type/fn name", 0, 1 },
|
||||
{ "lib/math/random/random_test.ww",
|
||||
"D module-leaf == type/fn name", 0, 1 },
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
* 974_getenv_run — execute the lib/os getenv smoke fixture under the
|
||||
* C-side `ww run` driver and assert exit 0.
|
||||
*
|
||||
* Pre-arranges the environment that lib/os/ostest.ww asserts against:
|
||||
* Pre-arranges the environment that lib/os/os_test.ww asserts against:
|
||||
*
|
||||
* WW_TEST_GETENV = "hello-world" (set, non-empty)
|
||||
* WW_TEST_EMPTY = "" (set, empty value)
|
||||
* WW_TEST_NOT_SET unset (unsetenv-cleared)
|
||||
*
|
||||
* The child `ww run` process inherits this env, so ostest.ww's
|
||||
* The child `ww run` process inherits this env, so os_test.ww's
|
||||
* `os.getenv` calls see exactly the state we configured here. This
|
||||
* is the "C-side env arrangement" pattern (parent sets, child reads)
|
||||
* — proper POSIX shape for stdlib testing without a `setenv` ww
|
||||
@@ -46,12 +46,12 @@ main(void)
|
||||
char cwd[1024];
|
||||
if (getcwd(cwd, sizeof cwd) == NULL) return 1;
|
||||
|
||||
/* Pre-arrange the env state ostest.ww asserts against. */
|
||||
/* Pre-arrange the env state os_test.ww asserts against. */
|
||||
setenv("WW_TEST_GETENV", "hello-world", 1);
|
||||
setenv("WW_TEST_EMPTY", "", 1);
|
||||
unsetenv("WW_TEST_NOT_SET");
|
||||
|
||||
const char *src = "lib/os/ostest.ww";
|
||||
const char *src = "lib/os/os_test.ww";
|
||||
char path[1024], cmd[2048];
|
||||
snprintf(path, sizeof path, "%s/%s", cwd, src);
|
||||
snprintf(cmd, sizeof cmd, "%s/ww test %s", bin, path);
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
* Workflow:
|
||||
* 1. mkdtemp /tmp/wwdirs-XXXXXX — fresh per run, no cross-run
|
||||
* stale state, no parallel-test conflicts.
|
||||
* 2. setenv the four cohort env states (see lib/dirs/dirstest.ww
|
||||
* 2. setenv the four cohort env states (see lib/dirs/dirs_test.ww
|
||||
* file header for the contract).
|
||||
* 3. exec `ww test lib/dirs/dirstest.ww`. The fixture reads
|
||||
* 3. exec `ww test lib/dirs/dirs_test.ww`. The fixture reads
|
||||
* WW_TEST_TMPDIR + the XDG_/HOME envs and asserts.
|
||||
* 4. Remove the exact auto-created child dirs bottom-up, then the
|
||||
* mkdtemp-owned root.
|
||||
@@ -63,7 +63,7 @@ main(void)
|
||||
unsetenv("XDG_STATE_HOME");
|
||||
setenv("WW_TEST_TMPDIR", tmpl, 1);
|
||||
|
||||
const char *src = "lib/dirs/dirstest.ww";
|
||||
const char *src = "lib/dirs/dirs_test.ww";
|
||||
char path[1024], cmd[2048];
|
||||
snprintf(path, sizeof path, "%s/%s", cwd, src);
|
||||
snprintf(cmd, sizeof cmd, "%s/ww test %s", bin, path);
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
* <tmp>/symlink → ./regfile (relative symlink)
|
||||
* <tmp>/subdir directory, mode 0700
|
||||
* 3. setenv WW_TEST_STAT_REGFILE / SYMLINK / SUBDIR / NOENT with
|
||||
* the absolute paths; lib/os/stattest.ww reads them via
|
||||
* the absolute paths; lib/os/stat_test.ww reads them via
|
||||
* os.getenv and exercises stat/lstat/fstat/exists.
|
||||
* 4. exec `ww test lib/os/stattest.ww`.
|
||||
* 4. exec `ww test lib/os/stat_test.ww`.
|
||||
* 5. Remove the exact children and then the mkdtemp-owned root.
|
||||
*
|
||||
* Same wrapper shape as 970-975; cleanup runs on success and failure.
|
||||
@@ -62,7 +62,7 @@ main(void)
|
||||
snprintf(symlink_path, sizeof symlink_path, "%s/symlink", tmpl);
|
||||
snprintf(subdir, sizeof subdir, "%s/subdir", tmpl);
|
||||
snprintf(noent, sizeof noent, "%s/does-not-exist", tmpl);
|
||||
const char *src = "lib/os/stattest.ww";
|
||||
const char *src = "lib/os/stat_test.ww";
|
||||
int fail = 0, subdir_owned = 0;
|
||||
|
||||
/* Populate. */
|
||||
|
||||
Reference in New Issue
Block a user