mirror of
https://github.com/denoland/deno.git
synced 2025-10-03 15:44:36 +00:00
parent
9533a030f3
commit
be9aaa664a
2 changed files with 12 additions and 1 deletions
|
@ -155,3 +155,14 @@ test(function booleanParsingFalse(): void {
|
|||
|
||||
assertEquals(parsed.boool, false);
|
||||
});
|
||||
|
||||
test(function booleanParsingTrueLike(): void {
|
||||
const parsed = parse(["-t", "true123"], { boolean: ["t"] });
|
||||
assertEquals(parsed.t, true);
|
||||
|
||||
const parsed2 = parse(["-t", "123"], { boolean: ["t"] });
|
||||
assertEquals(parsed2.t, true);
|
||||
|
||||
const parsed3 = parse(["-t", "false123"], { boolean: ["t"] });
|
||||
assertEquals(parsed3.t, true);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue