Copy-paste-y I was checking for the wrong result. Another unrelated
problem with the test runner caused me to miss this. Sorry!
Signed-off-by: Uli Schlachter <psychon@znc.in>
This removes a duplicate test and moves some "spawn with empty string as
argument" up to the long list of similar tests (and adds error
checking).
I do not see the point of the assert(#client.get() == 0) and so it was
just dropped.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Commit 5e6a893 broke error handling in awesome.spawn(): Instead of
returning an error message, it would just return its last argument.
This commit fixes that, removes some not-so-helpful warnings, and adds
lots of tests for this code.
Fixes: https://github.com/awesomeWM/awesome/issues/1281
Signed-off-by: Uli Schlachter <psychon@znc.in>
When e.g. test-leaks.lua fails, it will cause a Lua error before starting the
test runner. This means that the test will just hang, because nothing causes
awesome to quit.
Handle this by starting a timer when the test runner is loaded and quitting
awesome in there if no test run was started yet. This only works if all tests
load the runner before doing anything that could fail, so the require("_runner")
is moved to the beginning in every test.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Having many arguments can easily get confusing and hard to understand. This
commit uses a table instead so that we have names that identify what each
callback does.
Signed-off-by: Uli Schlachter <psychon@znc.in>
* This commit add a new module to avoid a (4 level) loop dependency
* It is now possible to call awful.spawn() with a table of properties
* awful.rules is used to execute the rules.
* Everything is public to allow alternative workflow modules such as
Tyrannical to use their own callback implementation.