summaryrefslogtreecommitdiff
path: root/tests/run_tests.sh
diff options
context:
space:
mode:
authorBarrett Harber <barrett.harber@gmail.com>2026-01-11 19:20:45 -0500
committerBarrett Harber <barrett.harber@gmail.com>2026-01-11 19:20:45 -0500
commit19fa2f2d880a693af2dd6346b120bb88e615f4e5 (patch)
tree95f8dbbdbeb8da48bbd0243006a17a8faaccb027 /tests/run_tests.sh
parentea9534610663a1a52fe248a08eeefa4bf8e5591e (diff)
feat: add zig compiler support
Diffstat (limited to 'tests/run_tests.sh')
-rwxr-xr-xtests/run_tests.sh21
1 files changed, 20 insertions, 1 deletions
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."