mirror of
https://github.com/denoland/deno.git
synced 2024-12-27 01:29:14 -05:00
move test file out of tests dir in flags module (#293)
This commit is contained in:
parent
a00c51b05b
commit
e80f144890
14 changed files with 52 additions and 52 deletions
|
@ -1,7 +1,7 @@
|
|||
// 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";
|
||||
import { test } from "../testing/mod.ts";
|
||||
import { assertEquals } from "../testing/asserts.ts";
|
||||
import { parse } from "./mod.ts";
|
||||
|
||||
// flag boolean true (default all --args to boolean)
|
||||
test(function flagBooleanTrue() {
|
|
@ -1,7 +1,7 @@
|
|||
// 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";
|
||||
import { test } from "../testing/mod.ts";
|
||||
import { assertEquals } from "../testing/asserts.ts";
|
||||
import { parse } from "./mod.ts";
|
||||
|
||||
test(function flagBooleanDefaultFalse() {
|
||||
const argv = parse(["moo"], {
|
|
@ -1,7 +1,7 @@
|
|||
// 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";
|
||||
import { test } from "../testing/mod.ts";
|
||||
import { assertEquals } from "../testing/asserts.ts";
|
||||
import { parse } from "./mod.ts";
|
||||
|
||||
test(function hyphen() {
|
||||
assertEquals(parse(["-n", "-"]), { n: "-", _: [] });
|
|
@ -1,7 +1,7 @@
|
|||
// 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";
|
||||
import { test } from "../testing/mod.ts";
|
||||
import { assertEquals } from "../testing/asserts.ts";
|
||||
import { parse } from "./mod.ts";
|
||||
|
||||
test(function booleanDefaultTrue() {
|
||||
const argv = parse([], {
|
|
@ -1,7 +1,7 @@
|
|||
// 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";
|
||||
import { test } from "../testing/mod.ts";
|
||||
import { assertEquals } from "../testing/asserts.ts";
|
||||
import { parse } from "./mod.ts";
|
||||
|
||||
test(function dottedAlias() {
|
||||
const argv = parse(["--a.b", "22"], {
|
|
@ -1,7 +1,7 @@
|
|||
// 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";
|
||||
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"]);
|
|
@ -1,7 +1,7 @@
|
|||
// 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";
|
||||
import { test } from "../testing/mod.ts";
|
||||
import { assertEquals } from "../testing/asserts.ts";
|
||||
import { parse } from "./mod.ts";
|
||||
|
||||
test(function longOpts() {
|
||||
assertEquals(parse(["--bool"]), { bool: true, _: [] });
|
|
@ -1,7 +1,7 @@
|
|||
// 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";
|
||||
import { test } from "../testing/mod.ts";
|
||||
import { assertEquals } from "../testing/asserts.ts";
|
||||
import { parse } from "./mod.ts";
|
||||
|
||||
test(function nums() {
|
||||
const argv = parse([
|
|
@ -1,7 +1,7 @@
|
|||
// 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";
|
||||
import { test } from "../testing/mod.ts";
|
||||
import { assertEquals } from "../testing/asserts.ts";
|
||||
import { parse } from "./mod.ts";
|
||||
|
||||
test(function _arseArgs() {
|
||||
assertEquals(parse(["--no-moo"]), { moo: false, _: [] });
|
|
@ -1,7 +1,7 @@
|
|||
// 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";
|
||||
import { test } from "../testing/mod.ts";
|
||||
import { assertEquals } from "../testing/asserts.ts";
|
||||
import { parse } from "./mod.ts";
|
||||
|
||||
test(function numbericShortArgs() {
|
||||
assertEquals(parse(["-n123"]), { n: 123, _: [] });
|
|
@ -1,7 +1,7 @@
|
|||
// 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";
|
||||
import { test } from "../testing/mod.ts";
|
||||
import { assertEquals } from "../testing/asserts.ts";
|
||||
import { parse } from "./mod.ts";
|
||||
|
||||
// stops parsing on the first non-option when stopEarly is set
|
||||
test(function stopParsing() {
|
|
@ -1,14 +1,14 @@
|
|||
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
||||
import "./tests/all_bool.ts";
|
||||
import "./tests/bool.ts";
|
||||
import "./tests/dash.ts";
|
||||
import "./tests/default_bool.ts";
|
||||
import "./tests/dotted.ts";
|
||||
import "./tests/kv_short.ts";
|
||||
import "./tests/long.ts";
|
||||
import "./tests/num.ts";
|
||||
import "./tests/parse.ts";
|
||||
import "./tests/short.ts";
|
||||
import "./tests/stop_early.ts";
|
||||
import "./tests/unknown.ts";
|
||||
import "./tests/whitespace.ts";
|
||||
import "./all_bool_test.ts";
|
||||
import "./bool_test.ts";
|
||||
import "./dash_test.ts";
|
||||
import "./default_bool_test.ts";
|
||||
import "./dotted_test.ts";
|
||||
import "./kv_short_test.ts";
|
||||
import "./long_test.ts";
|
||||
import "./num_test.ts";
|
||||
import "./parse_test.ts";
|
||||
import "./short_test.ts";
|
||||
import "./stop_early_test.ts";
|
||||
import "./unknown_test.ts";
|
||||
import "./whitespace_test.ts";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// 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";
|
||||
import { test } from "../testing/mod.ts";
|
||||
import { assertEquals } from "../testing/asserts.ts";
|
||||
import { parse } from "./mod.ts";
|
||||
|
||||
test(function booleanAndAliasIsNotUnknown() {
|
||||
const unknown = [];
|
|
@ -1,7 +1,7 @@
|
|||
// 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";
|
||||
import { test } from "../testing/mod.ts";
|
||||
import { assertEquals } from "../testing/asserts.ts";
|
||||
import { parse } from "./mod.ts";
|
||||
|
||||
test(function whitespaceShouldBeWhitespace() {
|
||||
assertEquals(parse(["-x", "\t"]).x, "\t");
|
Loading…
Reference in a new issue