chore: add test for the new token captures

This commit is contained in:
rvcas 2023-01-26 10:07:11 -05:00 committed by Lucas
parent 703fcb451d
commit 4976ea4164
1 changed files with 16 additions and 0 deletions

View File

@ -22,6 +22,22 @@ fn assert_definitions(code: &str, definitions: Vec<ast::UntypedDefinition>) {
) )
} }
#[test]
fn windows_newline() {
let code = "use aiken/list\r\n";
assert_definitions(
code,
vec![ast::UntypedDefinition::Use(Use {
location: Span::new((), 0..14),
module: vec!["aiken".to_string(), "list".to_string()],
as_name: None,
unqualified: vec![],
package: (),
})],
)
}
#[test] #[test]
fn import() { fn import() {
let code = indoc! {r#" let code = indoc! {r#"