summaryrefslogtreecommitdiff
path: root/flags
diff options
context:
space:
mode:
authorAxetroy <troy450409405@gmail.com>2019-03-20 01:24:11 +0800
committerRyan Dahl <ry@tinyclouds.org>2019-03-19 13:24:11 -0400
commitaae6ea51a496301011c41a874a25b77596d5c560 (patch)
treeedfcefbbbae67a1e59baa6a8d5d1fd5b6009dfec /flags
parentadb19cbae366288a152dd3ab8293e5aea2edc80b (diff)
move test file out of tests dir in flags module (denoland/deno_std#293)
Original: https://github.com/denoland/deno_std/commit/e80f14489084d748bb52c4311519f5d0c7696f47
Diffstat (limited to 'flags')
-rwxr-xr-xflags/all_bool_test.ts (renamed from flags/tests/all_bool.ts)6
-rwxr-xr-xflags/bool_test.ts (renamed from flags/tests/bool.ts)6
-rwxr-xr-xflags/dash_test.ts (renamed from flags/tests/dash.ts)6
-rwxr-xr-xflags/default_bool_test.ts (renamed from flags/tests/default_bool.ts)6
-rwxr-xr-xflags/dotted_test.ts (renamed from flags/tests/dotted.ts)6
-rwxr-xr-xflags/kv_short_test.ts (renamed from flags/tests/kv_short.ts)6
-rwxr-xr-xflags/long_test.ts (renamed from flags/tests/long.ts)6
-rwxr-xr-xflags/num_test.ts (renamed from flags/tests/num.ts)6
-rwxr-xr-xflags/parse_test.ts (renamed from flags/tests/parse.ts)6
-rwxr-xr-xflags/short_test.ts (renamed from flags/tests/short.ts)6
-rwxr-xr-xflags/stop_early_test.ts (renamed from flags/tests/stop_early.ts)6
-rw-r--r--flags/test.ts26
-rwxr-xr-xflags/unknown_test.ts (renamed from flags/tests/unknown.ts)6
-rwxr-xr-xflags/whitespace_test.ts (renamed from flags/tests/whitespace.ts)6
14 files changed, 52 insertions, 52 deletions
diff --git a/flags/tests/all_bool.ts b/flags/all_bool_test.ts
index e88919378..59779c779 100755
--- a/flags/tests/all_bool.ts
+++ b/flags/all_bool_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";
// flag boolean true (default all --args to boolean)
test(function flagBooleanTrue() {
diff --git a/flags/tests/bool.ts b/flags/bool_test.ts
index bffb1fd34..820393543 100755
--- a/flags/tests/bool.ts
+++ b/flags/bool_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 flagBooleanDefaultFalse() {
const argv = parse(["moo"], {
diff --git a/flags/tests/dash.ts b/flags/dash_test.ts
index f70108124..7d52e4905 100755
--- a/flags/tests/dash.ts
+++ b/flags/dash_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 hyphen() {
assertEquals(parse(["-n", "-"]), { n: "-", _: [] });
diff --git a/flags/tests/default_bool.ts b/flags/default_bool_test.ts
index 43e91c8c0..a1a329074 100755
--- a/flags/tests/default_bool.ts
+++ b/flags/default_bool_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 booleanDefaultTrue() {
const argv = parse([], {
diff --git a/flags/tests/dotted.ts b/flags/dotted_test.ts
index c2179a3a8..d5a491815 100755
--- a/flags/tests/dotted.ts
+++ b/flags/dotted_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 dottedAlias() {
const argv = parse(["--a.b", "22"], {
diff --git a/flags/tests/kv_short.ts b/flags/kv_short_test.ts
index b5a216b75..0cd93df02 100755
--- a/flags/tests/kv_short.ts
+++ b/flags/kv_short_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 short() {
const argv = parse(["-b=123"]);
diff --git a/flags/tests/long.ts b/flags/long_test.ts
index 04f563d42..fb26a4c07 100755
--- a/flags/tests/long.ts
+++ b/flags/long_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 longOpts() {
assertEquals(parse(["--bool"]), { bool: true, _: [] });
diff --git a/flags/tests/num.ts b/flags/num_test.ts
index b140ea18a..752e1752f 100755
--- a/flags/tests/num.ts
+++ b/flags/num_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 nums() {
const argv = parse([
diff --git a/flags/tests/parse.ts b/flags/parse_test.ts
index a37cd4c63..dbcdb4a86 100755
--- a/flags/tests/parse.ts
+++ b/flags/parse_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 _arseArgs() {
assertEquals(parse(["--no-moo"]), { moo: false, _: [] });
diff --git a/flags/tests/short.ts b/flags/short_test.ts
index 8c0d06d3a..700902dd7 100755
--- a/flags/tests/short.ts
+++ b/flags/short_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 numbericShortArgs() {
assertEquals(parse(["-n123"]), { n: 123, _: [] });
diff --git a/flags/tests/stop_early.ts b/flags/stop_early_test.ts
index 799b16b78..70194adfe 100755
--- a/flags/tests/stop_early.ts
+++ b/flags/stop_early_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";
// stops parsing on the first non-option when stopEarly is set
test(function stopParsing() {
diff --git a/flags/test.ts b/flags/test.ts
index 66aa8d2cd..f8e928555 100644
--- a/flags/test.ts
+++ b/flags/test.ts
@@ -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";
diff --git a/flags/tests/unknown.ts b/flags/unknown_test.ts
index cd944746f..fcb47e36b 100755
--- a/flags/tests/unknown.ts
+++ b/flags/unknown_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 = [];
diff --git a/flags/tests/whitespace.ts b/flags/whitespace_test.ts
index 54ff067c7..f0f24703c 100755
--- a/flags/tests/whitespace.ts
+++ b/flags/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 whitespaceShouldBeWhitespace() {
assertEquals(parse(["-x", "\t"]).x, "\t");