Hello Alfredo,

Some libraries are part of the Awesome C language core. Those
currently cannot be loaded from a .so or .lua as they are built in the
/usr/bin/awesome executable. While creating a .so could be possible
and would even in some case be very, very cool, some code need to be
written with great care to make that happen. For now, unless you want
to extract the lua xcb "bindings" and the lua "libwm" from awesome
core, you can use

Xephyr :1 -screen 1024x768 &
DISPLAY=:1 awesome -c /path/to/yout/unittests.lua

to load the unit tests.

I hope this solve your problem,
Emmanuel


On 21 August 2014 14:19, Alfredo Palhares <[email protected]> wrote:
> Hello fellow AwesomeWM users,
>
> I am trying to write some test for my config, just for the heck of it.
> i am trying to use busted[1]
>
> But i am having troubles even loading awesome lua code.
>
> ```
> package.path = package.path .. 
> ';/usr/share/awesome/lib/?.lua;/usr/share/awesome/lib/?/init.lua'
> battery = require("cfg.widgets.battery")
> describe("a test", function()
>   it("runs a test", function() end)
> end)
> ```
>
> Basically it gives me this:
>
> /usr/lib/lua/5.2/busted/core.lua:67: 
> /usr/share/awesome/lib/awful/tag.lua:576: attempt to index field 'client' (a 
> nil value)
>
> So what do you recomend ? Is it to hard to make awesome load its code
> and run the tests to some parts of my config ? Or am I being a complete
> lunatic  if think I can pull this off?
>
> --
> Regards,
> Alfredo Palhares
>
> --
> To unsubscribe, send mail to [email protected].

-- 
To unsubscribe, send mail to [email protected].

Reply via email to