We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 20e0983 commit 92910e6Copy full SHA for 92910e6
1 file changed
test.sh
@@ -1,5 +1,21 @@
1
#!/bin/bash
2
-lua tests/init.lua
3
-if [ $? -ne 0 ]; then
4
- exit 1
5
-fi
+
+# Define the versions of Lua and LuaJIT you want to test
+lua_versions=("lua5.1" "lua5.2" "lua5.3" "lua5.4" "luajit")
6
+# Loop through each version and run the tests
7
+for version in "${lua_versions[@]}"; do
8
+ # Check if the version is installed
9
+ if command -v $version > /dev/null 2>&1; then
10
+ echo "Running tests with $version..."
11
+ $version tests/init.lua
12
+ if [ $? -ne 0 ]; then
13
+ echo "Tests failed with $version"
14
+ exit 1
15
+ fi
16
+ else
17
+ echo "$version is not installed"
18
19
+done
20
21
+echo "All tests passed for all installed Lua versions"
0 commit comments