Add another test
This commit is contained in:
parent
841b38d5b1
commit
be98f8387e
@ -125,5 +125,11 @@ mod tests {
|
|||||||
let t1 = "let a = 3\n";
|
let t1 = "let a = 3\n";
|
||||||
assert_eq!(format!("{:?}", tokenize(t1)),
|
assert_eq!(format!("{:?}", tokenize(t1)),
|
||||||
"[Keyword(Let), Identifier(\"a\"), Keyword(Assign), NumLiteral(3), Separator, EOF]");
|
"[Keyword(Let), Identifier(\"a\"), Keyword(Assign), NumLiteral(3), Separator, EOF]");
|
||||||
|
|
||||||
|
// this is intentional
|
||||||
|
let t2 = "a + b*c\n";
|
||||||
|
assert_eq!(format!("{:?}", tokenize(t2)),
|
||||||
|
"[Identifier(\"a\"), Identifier(\"+\"), Identifier(\"b*c\"), Separator, EOF]");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user