Skip to content

Commit d85a9b0

Browse files
committed
test(frontmatter): Include too many dashes
1 parent 2661616 commit d85a9b0

File tree

3 files changed

+58
-0
lines changed

3 files changed

+58
-0
lines changed

tests/testsuite/script/rustc.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,14 @@ fn fence_mismatch_2() {
270270
assert_failure(fixture_path, assertion_path);
271271
}
272272

273+
#[cargo_test(nightly, reason = "-Zscript is unstable")]
274+
#[rustfmt::skip] // code-generated
275+
fn fence_too_many_dashes() {
276+
let fixture_path = "tests/testsuite/script/rustc_fixtures/fence-too-many-dashes.rs";
277+
let assertion_path = "tests/testsuite/script/rustc_fixtures/fence-too-many-dashes.stdout";
278+
assert_success(fixture_path, assertion_path);
279+
}
280+
273281
#[cargo_test(nightly, reason = "-Zscript is unstable")]
274282
#[rustfmt::skip] // code-generated
275283
fn fence_unclosed_1() {
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2+
[dependencies]
3+
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
4+
5+
#![feature(frontmatter)]
6+
7+
// check that we limit fence lengths
8+
9+
fn main() {}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"authors": [],
3+
"categories": [],
4+
"default_run": null,
5+
"dependencies": [],
6+
"description": null,
7+
"documentation": null,
8+
"edition": "2024",
9+
"features": {},
10+
"homepage": null,
11+
"id": "path+[ROOTURL]/foo/script#0.0.0",
12+
"keywords": [],
13+
"license": null,
14+
"license_file": null,
15+
"links": null,
16+
"manifest_path": "[ROOT]/foo/script",
17+
"metadata": null,
18+
"name": "script",
19+
"publish": [],
20+
"readme": null,
21+
"repository": null,
22+
"rust_version": null,
23+
"source": null,
24+
"targets": [
25+
{
26+
"crate_types": [
27+
"bin"
28+
],
29+
"doc": true,
30+
"doctest": false,
31+
"edition": "2024",
32+
"kind": [
33+
"bin"
34+
],
35+
"name": "script",
36+
"src_path": "[ROOT]/foo/script",
37+
"test": true
38+
}
39+
],
40+
"version": "0.0.0"
41+
}

0 commit comments

Comments
 (0)