rtfeldman / node-test-runner

Runs elm-test suites from Node.js. Get it with npm install -g elm-test
BSD 3-Clause "New" or "Revised" License
134 stars 79 forks source link

Fix parsing of char literals with unicode escapes #594

Closed lydell closed 2 years ago

lydell commented 2 years ago

Fixes https://github.com/rtfeldman/node-test-runner/issues/581

Note: I had a hard time deciding how “well” we should parse this. elm-test doesn’t care at all what’s inside strings and char literals – it just needs to “get past them” without being confused about later syntax. I think I ended up with a good trade-off in the end. See the code comments in the diff for more details.

fredcy commented 2 years ago

I tested this version of the test runner against the problematic code that I reported on Slack (test containing |> Fuzz.map (String.cons '\u{1F648}')) and it does fix the problem in that case. So it looks good to me. Nice work!