Skip to content

Commit 35567d3

Browse files
authored
Merge pull request #341 from Kobzol/jobs-glob-test-escape
Add yet another test for MarkDown asterisk parsing
2 parents a575776 + 3a34636 commit 35567d3

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/bors/command/parser.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,6 +1049,21 @@ line two
10491049
);
10501050
}
10511051

1052+
// Make sure that foo\\* gets parsed as foo*, so that people can escape * to avoid weird
1053+
// rendering on GitHub.
1054+
#[test]
1055+
fn parse_try_jobs_glob_3() {
1056+
let cmds = parse_commands("@bors try jobs=\\*x86_64-msvc\\*,foo\\*");
1057+
assert_eq!(cmds.len(), 1);
1058+
assert_eq!(
1059+
cmds[0],
1060+
Ok(BorsCommand::Try {
1061+
parent: None,
1062+
jobs: vec!["*x86_64-msvc*".to_string(), "foo*".to_string()]
1063+
})
1064+
);
1065+
}
1066+
10521067
#[test]
10531068
fn parse_try_jobs_empty() {
10541069
let cmds = parse_commands("@bors try jobs=");

0 commit comments

Comments
 (0)