diff --git a/test/patch-guards-sec3.test.ts b/test/patch-guards-sec3.test.ts index 1370b4c33..c587ed814 100644 --- a/test/patch-guards-sec3.test.ts +++ b/test/patch-guards-sec3.test.ts @@ -20,7 +20,7 @@ test("the CI-fix guard judges the lines where git applies the patch, and attribu writeFileSync(join(dir, "r", "src", "price.rs"), LIB); const g = (...a: string[]) => execFileSync("git", ["-C", join(dir, "r"), ...a], { encoding: "utf8" }).trim(); g("add", "."); g("-c", "user.name=t", "-c", "user.email=t@t", "commit", "-qm", "m"); - const git = new Git(exec, dir, "r"); + const git = new Git(exec, dir, "r/.git"); const guard = (patch: string) => guardApplied(git, dir, "HEAD", patch, []); const testEdit = " fn price_is_four() {\n- let expected = 4;\n+ let expected = 6;\n assert_eq!(price(), expected);\n"; // The header claims line 5, outside the test module; git places the hunk by its context, inside it. diff --git a/test/regression-name.test.ts b/test/regression-name.test.ts index eae24cf18..7eec1f4b1 100644 --- a/test/regression-name.test.ts +++ b/test/regression-name.test.ts @@ -29,7 +29,7 @@ test("a refused patch reports the error lines of git apply, not its progress lin writeFileSync(join(dir, "r", "a.rs"), "x\n"); g("add", "."); g("-c", "user.name=t", "-c", "user.email=t@t", "commit", "-qm", "m"); const patch = patchFor(".", "autocraft_regression_1", "y").replace("tests/autocraft_regression_1.rs", "a.rs").replaceAll("tests/autocraft_regression_1.rs", "a.rs"); - const r = await new Git(exec, dir, "r").applyToTree("HEAD", patch, join(dir, "idx")); + const r = await new Git(exec, dir, "r/.git").applyToTree("HEAD", patch, join(dir, "idx")); assert.ok(!r.ok); if (!r.ok) assert.match(r.reason, /^git apply --check: a\.rs: already exists in index/); } finally { rmSync(dir, { recursive: true, force: true }); }