Skip to content

Commit

Permalink
fix(Automattic#230): remove improper test case
Browse files Browse the repository at this point in the history
  • Loading branch information
grantlemons committed Dec 20, 2024
1 parent 7cd135f commit 54418ff
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions harper-core/src/parsers/typst.rs
Original file line number Diff line number Diff line change
Expand Up @@ -500,23 +500,12 @@ mod tests {

#[test]
fn str_parsing() {
let source_with_quotes = r#"#let ident = "This is a string""#;
let source_no_quotes = r#"#let ident = This is a string"#;
let source = r#"#let ident = "This is a string""#;

let with_quotes_token_kinds = Typst
.parse_str(source_with_quotes)
.iter()
.map(|t| t.kind)
.collect_vec();
let no_quotes_token_kinds = Typst
.parse_str(source_no_quotes)
.iter()
.map(|t| t.kind)
.collect_vec();
let token_kinds = Typst.parse_str(source).iter().map(|t| t.kind).collect_vec();

assert_eq!(with_quotes_token_kinds, no_quotes_token_kinds);
assert!(matches!(
&with_quotes_token_kinds.as_slice(),
&token_kinds.as_slice(),
&[
TokenKind::Word(_), // identifier
TokenKind::Word(_), // This
Expand Down

0 comments on commit 54418ff

Please sign in to comment.