diff --git a/lalrpop/src/tok/test.rs b/lalrpop/src/tok/test.rs index 03daaed..f90d59e 100644 --- a/lalrpop/src/tok/test.rs +++ b/lalrpop/src/tok/test.rs @@ -63,3 +63,18 @@ fn code_forgot_comma() { // intentionally forget the comma token; this is more of a test of `test` ]); } + +#[test] +fn various_kinds_of_ids() { + test("foo>", vec![ + ("~~~ ", MacroId("foo")), + (" ~ ", LessThan), + (" ~ ", MacroId("T")), + (" ~ ", LessThan), + (" ~~ ", Lifetime("'a")), + (" ~ ", Comma), + (" ~ ", Id("U")), + (" ~ ", GreaterThan), + (" ~", GreaterThan), + ]); +}