Skip to content

Commit

Permalink
chore: update for CLI canary (denoland#2992)
Browse files Browse the repository at this point in the history
  • Loading branch information
kt3k committed Dec 8, 2022
1 parent d90ca8d commit 40fdfde
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ jobs:

- name: Set up Deno
uses: denoland/setup-deno@v1
with:
deno-version: canary

- name: Format
run: deno fmt --check
Expand Down
5 changes: 4 additions & 1 deletion encoding/_toml/parser_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ Deno.test({
name: "[TOML parser] basic string",
fn() {
const parse = ParserFactory(BasicString);
assertEquals(parse('"a\\"\\n\\t\\b\\\\\\u3042\\U01F995"'), 'a"\n\t\b\\\あ🦕');
assertEquals(
parse('"a\\"\\n\\t\\b\\\\\\u3042\\U01F995"'),
'a"\n\t\b\\\あ🦕',
);
assertEquals(parse('""'), "");
assertThrows(() => parse(""));
assertThrows(() => parse('"a'));
Expand Down
6 changes: 5 additions & 1 deletion media_types/_util_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ Deno.test({
[`"My \\" value"end`, 'My " value', "end"],
[`"\\" rest`, "", `"\\" rest`],
[`"C:\\dev\\go\\robots.txt"`, `C:\\dev\\go\\robots.txt`, ""],
[`"C:\\新建文件夹\\中文第二次测试.mp4"`, `C:\\新建文件夹\\中文第二次测试.mp4`, ""],
[
`"C:\\新建文件夹\\中文第二次测试.mp4"`,
`C:\\新建文件夹\\中文第二次测试.mp4`,
"",
],
] as const;
for (const [fixture, value, rest] of fixtures) {
assertEquals(consumeValue(fixture), [value, rest]);
Expand Down
3 changes: 2 additions & 1 deletion node/_crypto/crypto_browserify/browserify_aes/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,8 @@ Deno.test("handle long uft8 plaintexts", function () {
return decipher.update(enc, "base64", "utf8") + decipher.final("utf8");
}

const input = "ふっかつ あきる すぶり はやい つける まゆげ たんさん みんぞく ねほりはほり せまい たいまつばな ひはん";
const input =
"ふっかつ あきる すぶり はやい つける まゆげ たんさん みんぞく ねほりはほり せまい たいまつばな ひはん";
const enc = encrypt(input, "a");

const dec = decrypt(enc, "a");
Expand Down
3 changes: 2 additions & 1 deletion node/_crypto/crypto_browserify/cipher_base_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ Deno.test("encodings", async function (t) {
cipher.final("base64");
});
await t.step("handle long uft8 plaintexts", function () {
var txt = "ふっかつ あきる すぶり はやい つける まゆげ たんさん みんぞく ねほりはほり せまい たいまつばな ひはん";
var txt =
"ふっかつ あきる すぶり はやい つける まゆげ たんさん みんぞく ねほりはほり せまい たいまつばな ひはん";

var cipher = new Cipher();
var decipher = new Cipher();
Expand Down
8 changes: 6 additions & 2 deletions node/_fs/_fs_rmdir.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,14 @@ export function rmdirSync(path: string | Buffer | URL, options?: rmdirOptions) {
path = getValidatedPath(path);
if (options?.recursive) {
emitRecursiveRmdirWarning();
options = validateRmOptionsSync(path, { ...options, force: false }, true);
if (options === false) {
const optionsOrFalse: rmdirOptions | false = validateRmOptionsSync(path, {
...options,
force: false,
}, true);
if (optionsOrFalse === false) {
throw new ERR_FS_RMDIR_ENOTDIR(path.toString());
}
options = optionsOrFalse;
} else {
validateRmdirOptions(options);
}
Expand Down

0 comments on commit 40fdfde

Please sign in to comment.