lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> it would be really helpful to have an easy way to test my package against
> different versions of Lua. As I do not have a lua virtual environment tool
> of choice, docker was the best option option for the task.

A script like the one below is simple enough.
Run it inside an empty directory.
If you call the script "mytest" and the test program in "mylib.lua", do
	./mytest mylib.lua

You may want to run Lua in the last line of the loop with a suitable
environment, for instance, an empty one:
	env - lua-$v/install/bin/lua $*

Also, change posix to your platform if needed.

#!/bin/sh

for v in 5.1.5 5.2.4 5.3.5
do
	echo Lua $v
	wget -N http://www.lua.org/ftp/lua-$v.tar.gz
	tar xf lua-$v.tar.gz
	make -C lua-$v posix test install INSTALL_TOP=../install
	lua-$v/install/bin/lua $*
done