From 19fa2f2d880a693af2dd6346b120bb88e615f4e5 Mon Sep 17 00:00:00 2001 From: Barrett Harber Date: Sun, 11 Jan 2026 19:20:45 -0500 Subject: feat: add zig compiler support --- tests/run_tests.sh | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'tests/run_tests.sh') diff --git a/tests/run_tests.sh b/tests/run_tests.sh index 8c3c7f7..8c2fbc7 100755 --- a/tests/run_tests.sh +++ b/tests/run_tests.sh @@ -1,5 +1,14 @@ #!/bin/bash +# Zen-C Test Suite Runner +# Usage: ./tests/run_tests.sh [zc options] +# +# Examples: +# ./tests/run_tests.sh # Test with default compiler (gcc) +# ./tests/run_tests.sh --cc clang # Test with clang +# ./tests/run_tests.sh --cc zig # Test with zig cc +# ./tests/run_tests.sh --cc tcc # Test with tcc + # Configuration ZC="./zc" TEST_DIR="tests" @@ -7,7 +16,17 @@ PASSED=0 FAILED=0 FAILED_TESTS="" -echo "** Running Zen C test suite **" +# Display which compiler is being used +CC_NAME="gcc (default)" +for arg in "$@"; do + if [ "$prev_arg" = "--cc" ]; then + CC_NAME="$arg" + break + fi + prev_arg="$arg" +done + +echo "** Running Zen C test suite (compiler: $CC_NAME) **" if [ ! -f "$ZC" ]; then echo "Error: zc binary not found. Please build it first." -- cgit v1.2.3