move test file out of tests dir in flags module (denoland/deno_std#293)

Original: e80f144890
This commit is contained in:
Axetroy 2019-03-20 01:24:11 +08:00 committed by Ryan Dahl
parent adb19cbae3
commit aae6ea51a4
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. // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import { test } from "../../testing/mod.ts"; import { test } from "../testing/mod.ts";
import { assertEquals } from "../../testing/asserts.ts"; import { assertEquals } from "../testing/asserts.ts";
import { parse } from "../mod.ts"; import { parse } from "./mod.ts";
// flag boolean true (default all --args to boolean) // flag boolean true (default all --args to boolean)
test(function flagBooleanTrue() { test(function flagBooleanTrue() {

View file

@ -1,7 +1,7 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import { test } from "../../testing/mod.ts"; import { test } from "../testing/mod.ts";
import { assertEquals } from "../../testing/asserts.ts"; import { assertEquals } from "../testing/asserts.ts";
import { parse } from "../mod.ts"; import { parse } from "./mod.ts";
test(function flagBooleanDefaultFalse() { test(function flagBooleanDefaultFalse() {
const argv = parse(["moo"], { const argv = parse(["moo"], {

View file

@ -1,7 +1,7 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import { test } from "../../testing/mod.ts"; import { test } from "../testing/mod.ts";
import { assertEquals } from "../../testing/asserts.ts"; import { assertEquals } from "../testing/asserts.ts";
import { parse } from "../mod.ts"; import { parse } from "./mod.ts";
test(function hyphen() { test(function hyphen() {
assertEquals(parse(["-n", "-"]), { n: "-", _: [] }); assertEquals(parse(["-n", "-"]), { n: "-", _: [] });

View file

@ -1,7 +1,7 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import { test } from "../../testing/mod.ts"; import { test } from "../testing/mod.ts";
import { assertEquals } from "../../testing/asserts.ts"; import { assertEquals } from "../testing/asserts.ts";
import { parse } from "../mod.ts"; import { parse } from "./mod.ts";
test(function booleanDefaultTrue() { test(function booleanDefaultTrue() {
const argv = parse([], { const argv = parse([], {

View file

@ -1,7 +1,7 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import { test } from "../../testing/mod.ts"; import { test } from "../testing/mod.ts";
import { assertEquals } from "../../testing/asserts.ts"; import { assertEquals } from "../testing/asserts.ts";
import { parse } from "../mod.ts"; import { parse } from "./mod.ts";
test(function dottedAlias() { test(function dottedAlias() {
const argv = parse(["--a.b", "22"], { const argv = parse(["--a.b", "22"], {

View file

@ -1,7 +1,7 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import { test } from "../../testing/mod.ts"; import { test } from "../testing/mod.ts";
import { assertEquals } from "../../testing/asserts.ts"; import { assertEquals } from "../testing/asserts.ts";
import { parse } from "../mod.ts"; import { parse } from "./mod.ts";
test(function short() { test(function short() {
const argv = parse(["-b=123"]); const argv = parse(["-b=123"]);

View file

@ -1,7 +1,7 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import { test } from "../../testing/mod.ts"; import { test } from "../testing/mod.ts";
import { assertEquals } from "../../testing/asserts.ts"; import { assertEquals } from "../testing/asserts.ts";
import { parse } from "../mod.ts"; import { parse } from "./mod.ts";
test(function longOpts() { test(function longOpts() {
assertEquals(parse(["--bool"]), { bool: true, _: [] }); assertEquals(parse(["--bool"]), { bool: true, _: [] });

View file

@ -1,7 +1,7 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import { test } from "../../testing/mod.ts"; import { test } from "../testing/mod.ts";
import { assertEquals } from "../../testing/asserts.ts"; import { assertEquals } from "../testing/asserts.ts";
import { parse } from "../mod.ts"; import { parse } from "./mod.ts";
test(function nums() { test(function nums() {
const argv = parse([ const argv = parse([

View file

@ -1,7 +1,7 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import { test } from "../../testing/mod.ts"; import { test } from "../testing/mod.ts";
import { assertEquals } from "../../testing/asserts.ts"; import { assertEquals } from "../testing/asserts.ts";
import { parse } from "../mod.ts"; import { parse } from "./mod.ts";
test(function _arseArgs() { test(function _arseArgs() {
assertEquals(parse(["--no-moo"]), { moo: false, _: [] }); assertEquals(parse(["--no-moo"]), { moo: false, _: [] });

View file

@ -1,7 +1,7 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import { test } from "../../testing/mod.ts"; import { test } from "../testing/mod.ts";
import { assertEquals } from "../../testing/asserts.ts"; import { assertEquals } from "../testing/asserts.ts";
import { parse } from "../mod.ts"; import { parse } from "./mod.ts";
test(function numbericShortArgs() { test(function numbericShortArgs() {
assertEquals(parse(["-n123"]), { n: 123, _: [] }); assertEquals(parse(["-n123"]), { n: 123, _: [] });

View file

@ -1,7 +1,7 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import { test } from "../../testing/mod.ts"; import { test } from "../testing/mod.ts";
import { assertEquals } from "../../testing/asserts.ts"; import { assertEquals } from "../testing/asserts.ts";
import { parse } from "../mod.ts"; import { parse } from "./mod.ts";
// stops parsing on the first non-option when stopEarly is set // stops parsing on the first non-option when stopEarly is set
test(function stopParsing() { test(function stopParsing() {

View file

@ -1,14 +1,14 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import "./tests/all_bool.ts"; import "./all_bool_test.ts";
import "./tests/bool.ts"; import "./bool_test.ts";
import "./tests/dash.ts"; import "./dash_test.ts";
import "./tests/default_bool.ts"; import "./default_bool_test.ts";
import "./tests/dotted.ts"; import "./dotted_test.ts";
import "./tests/kv_short.ts"; import "./kv_short_test.ts";
import "./tests/long.ts"; import "./long_test.ts";
import "./tests/num.ts"; import "./num_test.ts";
import "./tests/parse.ts"; import "./parse_test.ts";
import "./tests/short.ts"; import "./short_test.ts";
import "./tests/stop_early.ts"; import "./stop_early_test.ts";
import "./tests/unknown.ts"; import "./unknown_test.ts";
import "./tests/whitespace.ts"; import "./whitespace_test.ts";

View file

@ -1,7 +1,7 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import { test } from "../../testing/mod.ts"; import { test } from "../testing/mod.ts";
import { assertEquals } from "../../testing/asserts.ts"; import { assertEquals } from "../testing/asserts.ts";
import { parse } from "../mod.ts"; import { parse } from "./mod.ts";
test(function booleanAndAliasIsNotUnknown() { test(function booleanAndAliasIsNotUnknown() {
const unknown = []; const unknown = [];

View file

@ -1,7 +1,7 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import { test } from "../../testing/mod.ts"; import { test } from "../testing/mod.ts";
import { assertEquals } from "../../testing/asserts.ts"; import { assertEquals } from "../testing/asserts.ts";
import { parse } from "../mod.ts"; import { parse } from "./mod.ts";
test(function whitespaceShouldBeWhitespace() { test(function whitespaceShouldBeWhitespace() {
assertEquals(parse(["-x", "\t"]).x, "\t"); assertEquals(parse(["-x", "\t"]).x, "\t");