lua: decimal string escapes \\ddd + control escapes (\\a/\\b/\\f/\\v) +2 tests
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
This commit is contained in:
@@ -922,6 +922,12 @@ cat > "$TMPFILE" << 'EPOCHS'
|
||||
(epoch 1821)
|
||||
(eval "(lua-eval-ast \"function f(a, ...) return arg[1] + arg[2] + arg[3] end return f({}, 10, 20, 30)\")")
|
||||
|
||||
;; ── Decimal-escape strings ────────────────────────────────────
|
||||
(epoch 1830)
|
||||
(eval "(lua-eval-ast \"return \\\"\\\\65\\\"\")")
|
||||
(epoch 1831)
|
||||
(eval "(lua-eval-ast \"if \\\"\\\\09912\\\" == \\\"c12\\\" then return 1 else return 0 end\")")
|
||||
|
||||
EPOCHS
|
||||
|
||||
OUTPUT=$(timeout 60 "$SX_SERVER" < "$TMPFILE" 2>/dev/null)
|
||||
@@ -1391,6 +1397,10 @@ check 1812 "elseif local shadows" '10'
|
||||
check 1820 "arg.n in vararg fn" '3'
|
||||
check 1821 "arg[i] access" '60'
|
||||
|
||||
# ── Decimal-escape strings ───────────────────────────────────
|
||||
check 1830 "\\65 → A" '"A"'
|
||||
check 1831 "\\099 + 12 → c12" '1'
|
||||
|
||||
TOTAL=$((PASS + FAIL))
|
||||
if [ $FAIL -eq 0 ]; then
|
||||
echo "ok $PASS/$TOTAL Lua-on-SX tests passed"
|
||||
|
||||
Reference in New Issue
Block a user