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:
@@ -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