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

-m/--lpath doesn't work? #53

Closed
karlp opened this issue Oct 22, 2012 · 5 comments
Closed

-m/--lpath doesn't work? #53

karlp opened this issue Oct 22, 2012 · 5 comments

Comments

@karlp
Copy link
Contributor

karlp commented Oct 22, 2012

I have my lua files in "lualib" rather than "src" (for mathching some other tools) and have tried the following...

busted --lpath="./lualib/?.lua;./lualib/?/?.lua"
and
busted -m "./lualib/?.lua;./lualib/?/?.lua"

but in both cases, the tests are found, but is not set properly, it still looks in src/.

An error occurred while loading a test::spec/remake.utils_spec.lua:3: module 'remake.utils' not found:
no field package.preload['remake.utils']
no file 'src/remake/utils.lua'
no file 'src/remake/utils/remake/utils.lua'
no file 'src/remake/utils/init.lua'
no file './remake/utils.lua'
no file '/usr/share/lua/5.1/remake/utils.lua'
no file '/usr/share/lua/5.1/remake/utils/init.lua'
no file '/usr/lib64/lua/5.1/remake/utils.lua'
no file '/usr/lib64/lua/5.1/remake/utils/init.lua'
no file './remake/utils.so'
no file '/usr/lib64/lua/5.1/remake/utils.so'
no file '/usr/lib64/lua/5.1/loadall.so'
no file './remake.so'
no file '/usr/lib64/lua/5.1/remake.so'
no file '/usr/lib64/lua/5.1/loadall.so'

The file it's trying to find is in lualib/remake/utils.lua. Adding a symlink "src" for lualib works fine, but isn't really something I want to do.
Busted version 1.4, installed via luarocks.

@Tieske Tieske mentioned this issue Oct 22, 2012
@DorianGray
Copy link
Contributor

Tieske's pull request should have fixed that, try running luarocks make on latest source and see if that fixes it!

@karlp
Copy link
Contributor Author

karlp commented Oct 23, 2012

$ busted -m lualib
lua: error loading module 'busted.output.utf_terminal' from file 'lualib':
cannot read lualib: Is a directory
stack traceback:
[C]: ?
[C]: in function 'require'
/usr/bin/busted_bootstrap:131: in main chunk
[C]: ?

Doesn't seem to have fixed it for me. I've got a latest git pull, and I can see Tieske's fix, and I've rerun "luarocks make" in my checkout.

@karlp
Copy link
Contributor Author

karlp commented Oct 23, 2012

busted -m lualib/?.lua

●●●●●●●

7 successes / 0 failures / 0 pending : 0 seconds.

Never mind. I'm not used to lua's idea of having to specify file patterns as well as paths

@Tieske
Copy link
Member

Tieske commented Oct 23, 2012

thatᷰs because Lua is ansi C and that does not have the notion of filepaths.

@ajacksified
Copy link
Contributor

I'll make another issue to add doc examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants