Add a test for #2214

This commit is contained in:
topecongiro 2017-11-30 22:12:55 +09:00
parent b8106eb2aa
commit 5aaa00a929
2 changed files with 29 additions and 0 deletions

View File

@ -204,3 +204,15 @@ macro_rules! try_opt {
None => { return None; } None => { return None; }
}) })
} }
// #2214
// macro call whose argument is an array with trailing comma.
fn issue2214() {
make_test!(str_searcher_ascii_haystack, "bb", "abbcbbd", [
Reject(0, 1),
Match (1, 3),
Reject(3, 4),
Match (4, 6),
Reject(6, 7),
]);
}

View File

@ -253,3 +253,20 @@ macro_rules! try_opt {
None => { return None; } None => { return None; }
}) })
} }
// #2214
// macro call whose argument is an array with trailing comma.
fn issue2214() {
make_test!(
str_searcher_ascii_haystack,
"bb",
"abbcbbd",
[
Reject(0, 1),
Match(1, 3),
Reject(3, 4),
Match(4, 6),
Reject(6, 7),
]
);
}