Add GitHub Actions CI with automated build and test. Implement real terminal I/O with raw mode (enable_raw/disable_raw, proper INKEY$ polling via VMIN=0/VTIME=0, INPUT$ function). Add Sixel graphics engine with virtual framebuffer (SCREEN 1: 320x200, SCREEN 2: 640x200), Bresenham line drawing, midpoint circle, flood fill PAINT, DRAW mini-language parser, and Sixel encoder with RLE. Replace all graphics stubs with real implementations (PSET, LINE, CIRCLE, DRAW, PAINT, COLOR, SCREEN, POINT). Fix AND/OR/XOR operator precedence to be lower than relational operators. Add 13 classic test programs (39 total). Bump version to 0.5.0.
34 lines
875 B
Bash
Executable File
34 lines
875 B
Bash
Executable File
#!/bin/bash
|
|
# Run all .bas test programs and report results.
|
|
set -u
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
PROJECT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
GWBASIC="${PROJECT_DIR}/build/gwbasic"
|
|
|
|
if [ ! -x "$GWBASIC" ]; then
|
|
echo "ERROR: gwbasic not found at $GWBASIC (run cmake/make first)"
|
|
exit 1
|
|
fi
|
|
|
|
pass=0
|
|
fail=0
|
|
|
|
for bas in "$SCRIPT_DIR"/programs/*.bas; do
|
|
name="$(basename "$bas")"
|
|
# chain_target.bas is not standalone
|
|
[ "$name" = "chain_target.bas" ] && continue
|
|
# graphics_stubs.bas expects real graphics now; skip if SCREEN causes issues
|
|
if timeout 5 "$GWBASIC" "$bas" >/dev/null 2>&1; then
|
|
printf " PASS %s\n" "$name"
|
|
pass=$((pass + 1))
|
|
else
|
|
printf " FAIL %s\n" "$name"
|
|
fail=$((fail + 1))
|
|
fi
|
|
done
|
|
|
|
echo ""
|
|
echo "$((pass + fail)) tests: $pass passed, $fail failed"
|
|
[ "$fail" -eq 0 ] || exit 1
|