Skip to content

Commit

Permalink
test(parser): Show emoji bug
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Apr 18, 2024
1 parent 48f968b commit c30d31e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions crates/toml_edit/tests/testsuite/invalid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,3 +209,12 @@ dotted key `k1` attempted to extend non-table type (integer)
let err = toml_input.parse::<toml_edit::DocumentMut>().unwrap_err();
snapbox::assert_eq(expected_err, err.to_string());
}

#[test]
#[should_panic]
fn emoji_error_span() {
let input = "😀";
let err = input.parse::<toml_edit::DocumentMut>().unwrap_err();
dbg!(err.span());
let _ = &input[err.span().unwrap()];
}

0 comments on commit c30d31e

Please sign in to comment.