diff options
author | Casper Beyer <caspervonb@pm.me> | 2021-08-13 02:10:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-12 20:10:14 +0200 |
commit | 3dff757927852aff3110e72934f891f029bb8a8d (patch) | |
tree | 9a6979333573941a842a736ffee71109d2313e2d /cli/tests | |
parent | eae9d5b647b89e547b4229b8b794d91753c9ec95 (diff) |
fix(cli): allow specifiers of unknown media types with test command (#11652)
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/integration/test_tests.rs | 12 | ||||
-rw-r--r-- | cli/tests/testdata/test/doc_markdown.out | 7 | ||||
-rw-r--r-- | cli/tests/testdata/test/markdown.md (renamed from cli/tests/testdata/test/doc_markdown/doc.md) | 0 | ||||
-rw-r--r-- | cli/tests/testdata/test/markdown.out | 7 | ||||
-rw-r--r-- | cli/tests/testdata/test/text.md | 1 | ||||
-rw-r--r-- | cli/tests/testdata/test/text.out | 4 |
6 files changed, 21 insertions, 10 deletions
diff --git a/cli/tests/integration/test_tests.rs b/cli/tests/integration/test_tests.rs index 1cb38562f..b9b2d41ff 100644 --- a/cli/tests/integration/test_tests.rs +++ b/cli/tests/integration/test_tests.rs @@ -55,10 +55,16 @@ itest!(doc { output: "test/doc.out", }); -itest!(doc_markdown { - args: "test --doc --allow-all test/doc_markdown", +itest!(markdown { + args: "test --doc --allow-all test/markdown.md", exit_code: 1, - output: "test/doc_markdown.out", + output: "test/markdown.out", +}); + +itest!(text { + args: "test --doc --allow-all test/text.md", + exit_code: 0, + output: "test/text.out", }); itest!(quiet { diff --git a/cli/tests/testdata/test/doc_markdown.out b/cli/tests/testdata/test/doc_markdown.out deleted file mode 100644 index 9d2c35974..000000000 --- a/cli/tests/testdata/test/doc_markdown.out +++ /dev/null @@ -1,7 +0,0 @@ -Check [WILDCARD]/test/doc_markdown/doc.md$11-14.js -Check [WILDCARD]/test/doc_markdown/doc.md$17-20.ts -Check [WILDCARD]/test/doc_markdown/doc.md$23-26.ts -error: TS2322 [ERROR]: Type 'number' is not assignable to type 'string'. -const a: string = 42; - ^ - at [WILDCARD]/test/doc_markdown/doc.md$23-26.ts:1:7 diff --git a/cli/tests/testdata/test/doc_markdown/doc.md b/cli/tests/testdata/test/markdown.md index e5afb841b..e5afb841b 100644 --- a/cli/tests/testdata/test/doc_markdown/doc.md +++ b/cli/tests/testdata/test/markdown.md diff --git a/cli/tests/testdata/test/markdown.out b/cli/tests/testdata/test/markdown.out new file mode 100644 index 000000000..3f7bc7366 --- /dev/null +++ b/cli/tests/testdata/test/markdown.out @@ -0,0 +1,7 @@ +Check [WILDCARD]/test/markdown.md$11-14.js +Check [WILDCARD]/test/markdown.md$17-20.ts +Check [WILDCARD]/test/markdown.md$23-26.ts +error: TS2322 [ERROR]: Type 'number' is not assignable to type 'string'. +const a: string = 42; + ^ + at [WILDCARD]/test/markdown.md$23-26.ts:1:7 diff --git a/cli/tests/testdata/test/text.md b/cli/tests/testdata/test/text.md new file mode 100644 index 000000000..be89d24bf --- /dev/null +++ b/cli/tests/testdata/test/text.md @@ -0,0 +1 @@ +This fixture contains no actual tests. diff --git a/cli/tests/testdata/test/text.out b/cli/tests/testdata/test/text.out new file mode 100644 index 000000000..b09b04c05 --- /dev/null +++ b/cli/tests/testdata/test/text.out @@ -0,0 +1,4 @@ +running 0 tests from [WILDCARD]/test/text.md + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD]) + |