test: add headless test framework

This commit is contained in:
2026-05-07 02:07:35 +02:00
parent 55effc0a67
commit e9d13627c8
10 changed files with 398 additions and 257 deletions
Executable
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -uo pipefail
cd "$(dirname "$0")/.." || exit 1
emmylua_check --output-format=json . 2> >(grep -v '^Check finished$' >&2) \
| jq -r '
.[]
| .file as $f
| .diagnostics[]
| "\($f):\(.range.start.line + 1):\(.range.start.character + 1)"
+ ": \(["error","warning","info","hint"][.severity-1])"
+ ": \(.message | rtrimstr(" ")) [\(.code)]"
' \
| sed "s|^$PWD/||"
exit "${PIPESTATUS[0]}"