jgm / djot

A light markup language
https://djot.net
MIT License
1.71k stars 43 forks source link

./djot/filter.lua:141: bad argument #1 to 'load' (function expected, got string) with Lua 5.1 #144

Closed omasanori closed 1 year ago

omasanori commented 1 year ago

In Lua 5.1, now-deprecated loadstring was used instead of load. Due to this incompatibility, make test emits errors:

$ make test
luarocks test

djot 0.2.0-1 depends on lua >= 5.1 (5.1-1 provided by VM)
Error running test filters.test line 3:
./djot/filter.lua:141: bad argument #1 to 'load' (function expected, got string)
Error running test filters.test line 17:
./djot/filter.lua:141: bad argument #1 to 'load' (function expected, got string)
Error running test filters.test line 42:
./djot/filter.lua:141: bad argument #1 to 'load' (function expected, got string)
250 tests completed in 0.020 s
PASSED:  247
FAILED:    0
ERRORS:    3
jgm commented 1 year ago

Interesting. I thought we were testing with 5.1 in CI, but obviously that isn't working properly, because the tests are passing in CI.

omasanori commented 1 year ago

Thanks for your prompt response!