lua: 🎉 FIRST PASS! verybig.lua — io.output/stdout stubs + os.remove→true → 1/16 (6.2%)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled

This commit is contained in:
2026-04-24 22:13:15 +00:00
parent bac3471a1f
commit 27425a3173
4 changed files with 51 additions and 41 deletions

View File

@@ -1346,6 +1346,13 @@
(dict-set! io "close" lua-io-close)
(dict-set! io "flush" lua-io-flush)
(dict-set! io "__buffer" lua-io-buffer)
(dict-set! io "output" (fn (&rest args) (if (> (len args) 0) (first args) nil)))
(dict-set! io "input" (fn (&rest args) (if (> (len args) 0) (first args) nil)))
(define __io-stdout {})
(dict-set! __io-stdout "write" lua-io-write)
(dict-set! __io-stdout "close" lua-io-close)
(dict-set! io "stdout" __io-stdout)
(dict-set! io "stderr" __io-stdout)
(define print lua-print)
(define tostring lua-tostring)
@@ -1401,8 +1408,7 @@
(define
lua-os-remove
(fn (name)
(list (quote lua-multi) nil "os.remove not supported")))
(fn (name) true))
(define
lua-os-rename
@@ -1652,3 +1658,6 @@
(define lua-break-sentinel?
(fn (e) (and (= (type-of e) "list") (> (len e) 0) (= (first e) (quote lua-brk)))))
(define dofile (fn (&rest args) nil))
(define loadfile (fn (&rest args) nil))