diff options
Diffstat (limited to 'flags/kv_short_test.ts')
| -rwxr-xr-x | flags/kv_short_test.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/flags/kv_short_test.ts b/flags/kv_short_test.ts new file mode 100755 index 000000000..0cd93df02 --- /dev/null +++ b/flags/kv_short_test.ts @@ -0,0 +1,14 @@ +// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. +import { test } from "../testing/mod.ts"; +import { assertEquals } from "../testing/asserts.ts"; +import { parse } from "./mod.ts"; + +test(function short() { + const argv = parse(["-b=123"]); + assertEquals(argv, { b: 123, _: [] }); +}); + +test(function multiShort() { + const argv = parse(["-a=whatever", "-b=robots"]); + assertEquals(argv, { a: "whatever", b: "robots", _: [] }); +}); |
