mix lua.suite (Lua v1.0.0-rc.0)

View Source

Runs every .lua file in test/lua53_tests/ against this VM and prints a pass/fail summary.

Contributor-only task

This task is intended for development of the :lua library itself. It is not shipped to Hex: the suite files under test/lua53_tests/ are downloaded into this repo via mix lua.get_tests and are not part of the Hex package.

Unlike mix test --only lua53, this task does not consult the hand-curated @ready_tests / @deferred_permanent lists in test/lua53_suite_test.exs. It runs every file and reports whatever happens, which makes it useful for spotting newly-passing files (candidates to promote) and for sanity-checking the suite set during development.

Usage

mix lua.suite
mix lua.suite --filter math
mix lua.suite --dir test/lua53_tests
mix lua.suite --verbose

Options

  • --dir DIR — Directory containing the suite .lua files (default: test/lua53_tests).
  • --filter PATTERN — Run only files whose basename contains PATTERN (case-sensitive substring).
  • --timeout MS — Per-file timeout in milliseconds. Files that exceed it are reported as timeout (default: 30000).
  • --verbose — Print the full error message for each failing file, not just the first line.

Output

A summary like:

passing: 6
failing: 23
skipped: 0

passing files: api, bitwise, code, simple_test, tpack, vararg
failing files (top reason):
  attrib.lua          'require' is sandboxed
  big.lua             attempt to compare a string with a number
  ...

Exit codes

  • 0 — at least one file passed and --filter matched something.
  • 1 — directory missing, filter matched no files, or no files passed at all.