Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

luaunit conflicts with strict #152

Open
jjvbsag opened this issue Nov 27, 2022 · 2 comments
Open

luaunit conflicts with strict #152

jjvbsag opened this issue Nov 27, 2022 · 2 comments

Comments

@jjvbsag
Copy link

jjvbsag commented Nov 27, 2022

Luaunit does not run with strict

Simple test with plain lua5.1

require"strict"
local lu=require"luaunit.luaunit"

returns
lua5.1: ./luaunit.luaunit.lua:21: variable 'jit' is not declared

Test with luajit (same simple test) returns
./luaunit/luaunit.lua:2069: variable 'EXPORT_ASSERT_TO_GLOBALS' is not declared

@badiku
Copy link

badiku commented Jan 30, 2024

I changed line 21 like this:

M._LUAVERSION = rawget(_ENV, 'jit') and jit.version or _VERSION

and line 66:

-- EXPORT_ASSERT_TO_GLOBALS = true
local EXPORT_ASSERT_TO_GLOBALS =  rawget(_ENV, 'EXPORT_ASSERT_TO_GLOBALS') and EXPORT_ASSERT_TO_GLOBALS

@bluebird75
Copy link
Owner

Thanks.

Can you provide a Pull Request and I'll merge it.

badiku added a commit to badiku/luaunit that referenced this issue Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants