summaryrefslogtreecommitdiff
path: root/tests/run_tests.sh
diff options
context:
space:
mode:
authorZuhaitz <zuhaitz.zechhub@gmail.com>2026-01-12 15:59:15 +0000
committerGitHub <noreply@github.com>2026-01-12 15:59:15 +0000
commit06381baa771238282d64c58aef9c3f7734799b6d (patch)
treecb489c22ae02c39da720836cb3588cf3edc21778 /tests/run_tests.sh
parent9a54f2f52fdaf9364b0f757f5cdcbf09de230919 (diff)
parent19fa2f2d880a693af2dd6346b120bb88e615f4e5 (diff)
Merge pull request #2 from binoculars/feat/zig
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."