summaryrefslogtreecommitdiff
path: root/flags/tests/kv_short.ts
blob: f2440919b3d3f5d7ff3121b8af70ddc833686463 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import { test, assertEqual } from "../../testing/mod.ts";
import { parse } from "../mod.ts";

test(function short() {
  const argv = parse(["-b=123"]);
  assertEqual(argv, { b: 123, _: [] });
});

test(function multiShort() {
  const argv = parse(["-a=whatever", "-b=robots"]);
  assertEqual(argv, { a: "whatever", b: "robots", _: [] });
});