- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unicode issues with inline snapshots #137
Comments
I can have a look at this. Do you have a minimal repro, with only |
Just checked in a fresh crate, this test is enough to reproduce a panic for me on its own: #[test]
fn unicode() {
insta::assert_debug_snapshot!(
"(∀ν : ℕ. (∀α : 🟊. ((α → (1 + 1)) → (Vec ν α → (∃κ : ℕ. Vec κ α)))))",
@"(∀ν : ℕ. (∀α : ⋆. ((α → (1 + 1)) → (Vec ν α → (∃κ : ℕ. Vec κ α)))))"
);
} Placing that in a project, and then using
|
Perhaps a missing reproduction step - happens when trying to accept the snapshot within The files involved are just the above (as [package]
name = "insta-repro"
version = "0.1.0"
edition = "2018"
[dev-dependencies]
insta = "1.1.0" Reproduced on both a MacOS machine and arch linux. Rust 1.47.0. I reproduced on MacOS (separate machine from initial occurence) just by copying from this issue. |
I think that's the screenshot above, no? I tried copying the Could you confirm that the copying the text back from GH still reproduces? I see one character that may be an unknown code point. Otherwise I think the best alternatives are to push a failing test to insta, or push a reproducing repo to GH. |
Reproduction repository: https://github.com/c-spencer/insta-unicode-repro Apologies, I'd like to dig into this myself but haven't time currently to orient myself on insta codebase. Extra content ( |
That works! I'll have a look in the next few days |
Seems to be a re-occurrence of #42
This is with
cargo-insta
andinsta
1.1.0Some snapshots are updating incorrectly as per the original issue (adding additional content past the end of the snapshot string), have also run into some panics as below where it's ending up trying to splice in the middle of a char.
Source code of the test causing segfault:
Snapshot file and log/backtrace when interacting with updating:
The text was updated successfully, but these errors were encountered: