diff options
author | Kevin (Kun) "Kassimo" Qian <kevinkassimo@gmail.com> | 2020-01-26 10:43:59 -0800 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2020-01-26 13:43:59 -0500 |
commit | ec44be0760d647b3d005387d2f44ad0336d01024 (patch) | |
tree | a23d962ba972a4c47646bf0facac4ec2e47846ef /cli/tests/lock_write_fetch.ts | |
parent | 9d98f0126c5e19704b273579acf40132a38ce43b (diff) |
lock: support lock-write for fetch command (#3787)
Diffstat (limited to 'cli/tests/lock_write_fetch.ts')
-rw-r--r-- | cli/tests/lock_write_fetch.ts | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/cli/tests/lock_write_fetch.ts b/cli/tests/lock_write_fetch.ts new file mode 100644 index 000000000..7d597724d --- /dev/null +++ b/cli/tests/lock_write_fetch.ts @@ -0,0 +1,44 @@ +try { + Deno.removeSync("./lock_write_fetch.json"); +} catch {} + +const fetchProc = Deno.run({ + stdout: "null", + stderr: "null", + args: [ + Deno.execPath(), + "fetch", + "--reload", + "--lock=lock_write_fetch.json", + "--lock-write", + "https_import.ts" + ] +}); + +const fetchCode = (await fetchProc.status()).code; +console.log(`fetch code: ${fetchCode}`); + +const fetchCheckProc = Deno.run({ + stdout: "null", + stderr: "null", + args: [ + Deno.execPath(), + "fetch", + "--lock=lock_write_fetch.json", + "https_import.ts" + ] +}); + +const fetchCheckProcCode = (await fetchCheckProc.status()).code; +console.log(`fetch check code: ${fetchCheckProcCode}`); + +const runProc = Deno.run({ + stdout: "null", + stderr: "null", + args: [Deno.execPath(), "--lock=lock_write_fetch.json", "https_import.ts"] +}); + +const runCode = (await runProc.status()).code; +console.log(`run code: ${runCode}`); + +Deno.removeSync("./lock_write_fetch.json"); |