test: golden for Data.String.CodePoints over UTF-8#52
Merged
Conversation
Add Golden.StringCodePoints exercising the implemented CodePoints (Unisay/purescript-lua-strings v6.2.0) end to end: decode, length vs byte length, take/drop on code-point boundaries, codePointAt including an astral code point, uncons, encode round-trip and singleton. Output is all Ints/Bools so the eval golden stays ASCII. Bump test/ps to package set psc-0.15.15-20260613-2 (strings v6.2.0 and prelude v7.2.1). The prelude bump reflows the version paths embedded in every golden.ir and updates Show.lua in CharLiterals golden.lua (the Lua 5.1 fixes); no eval golden changed. luacheck on generated goldens now also passes --no-redefined: linked library fallbacks reuse a parameter name and shadow, which is harmless in generated code (same rationale as the existing --no-unused).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #36.
The final link in the chain that implements
Data.String.CodePointsfor the Lua backend.Golden.StringCodePointsexercises the now-implemented CodePoints (Unisay/purescript-lua-stringsv6.2.0) end to end on a real program: decode (toCodePointArray), code-point length vs byte length,take/dropon code-point boundaries,codePointAtincluding an astral code point and an out-of-range index,uncons, the encode round-trip (fromCodePointArray <<< toCodePointArray == id), andsingletonof an astral code point. The test string mixes UTF-8 widths 1–4 (a,é,Я,𝐀,z); all output isInt/BoolviafromEnum, so the eval golden stays ASCII and does not depend on how strings are shown.This is the semantic check for the whole release chain (pslua Char-literal escaping → prelude v7.2.1 Lua 5.1 fixes → strings v6.2.0 CodePoints), run through the actual compiler and Lua interpreter rather than just
luacheck.test/psmoves to package setpsc-0.15.15-20260613-2(strings v6.2.0, prelude v7.2.1). The prelude bump reflows the.spago/.../vXversion paths embedded in everygolden.ir, and updatesShow.luainsideGolden.CharLiteralsgolden.lua(the Lua 5.1\a/tostringfixes). No eval golden changed, so existing runtime behaviour is unaffected.luacheckover generated goldens now also passes--no-redefined: linked library fallbacks reuse a parameter name and shadow an upvalue, which is harmless in generated code — the same rationale as the existing--no-unused.