1
0
Fork 0
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:
Axetroy 2019-03-20 01:24:11 +08:00 committed by Ryan Dahl
parent a00c51b05b
commit e80f144890
14 changed files with 52 additions and 52 deletions

View file

@ -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() {

View file

@ -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"], {

View file

@ -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: "-", _: [] });

View file

@ -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([], {

View file

@ -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"], {

View file

@ -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"]);

View file

@ -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, _: [] });

View file

@ -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([

View file

@ -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, _: [] });

View file

@ -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, _: [] });

View file

@ -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() {

View file

@ -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";

View file

@ -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 = [];

View file

@ -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");