blob: 4b7eac097f6b571ed09e80c3ce279015d858d8ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { assertEquals } from "../testing/asserts.ts";
import { parse } from "./mod.ts";
// stops parsing on the first non-option when stopEarly is set
Deno.test(function stopParsing(): void {
const argv = parse(["--aaa", "bbb", "ccc", "--ddd"], {
stopEarly: true,
});
assertEquals(argv, {
aaa: "bbb",
_: ["ccc", "--ddd"],
});
});
|