diff options
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/unit/copy_file_test.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cli/tests/unit/copy_file_test.ts b/cli/tests/unit/copy_file_test.ts index 1c967b043..ad467f510 100644 --- a/cli/tests/unit/copy_file_test.ts +++ b/cli/tests/unit/copy_file_test.ts @@ -236,3 +236,14 @@ Deno.test( copyFileSyncMode("Hello world!".repeat(128 * 1024)); }, ); + +Deno.test( + { permissions: { read: true, write: true } }, + async function copyFileNulPath() { + const fromFilename = "from.txt\0"; + const toFilename = "to.txt\0"; + await assertRejects(async () => { + await Deno.copyFile(fromFilename, toFilename); + }, TypeError); + }, +); |