Skip to content

Commit

Permalink
chore: test for cat with absolute path (#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret authored Feb 21, 2024
1 parent ea24874 commit ed9fbd1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mod.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1905,12 +1905,17 @@ Deno.test("cd", () => {
});

Deno.test("cat", async () => {
await withTempDir(async () => {
await withTempDir(async (tempDir) => {
await Deno.writeTextFile("hello", "hello world");
assertEquals(
await $`cat hello`.text(),
"hello world",
);
assertEquals(
// absolute path
await $`cat ${tempDir.join("hello")}`.text(),
"hello world",
);
await Deno.writeTextFile("hello2", "hello world2");
assertEquals(
await $`cat hello hello2`.text(),
Expand Down

0 comments on commit ed9fbd1

Please sign in to comment.