un-inception/test/qr.hs
russell@unturf.com 97fbd55e61 fix(ci): revert QR skip hack, add CLAUDE.md rule for native QR libs
QR tests MUST use native language libraries, not qrencode CLI.
If the sandbox doesn't have the library, the test should FAIL
honestly so we know what to fix in the sandbox image.

Also adds CLAUDE.md rule to prevent future attempts to replace
native library QR tests with CLI subprocess calls.
2026-01-29 16:15:07 -05:00

11 lines
365 B
Haskell

import Codec.QRCode
import Codec.QRCode.JuicyPixels
main :: IO ()
main = do
let mqr = encodeText defaultQRCodeOptions Iso8859_1OrUtf8WithoutECI "unsandbox-qr-ok"
case mqr of
Nothing -> putStrLn "QR encode failed"
Just img -> do
let matrix = toMatrix True False img :: [[Bool]]
putStrLn $ "QR:unsandbox-qr-ok:ROWS:" ++ show (length matrix)