Commit Graph

9 Commits

Author SHA1 Message Date
Daniel Hahler 68de588f21 tests: fix indenting/style (#1303)
Basically:

> for f in **/*.lua; do vim '+set sw=4' '+norm gg=G' '+wq' "$f"; done
2016-12-27 21:39:08 +01:00
Uli Schlachter 3a7e14e5d7 Improve API of test/_client.lua
The first return value was always true. How useless...

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-12-01 15:32:31 +01:00
Uli Schlachter f9cdc98c73 Fix spawn callbacks
Spawn callbacks were never invoked when no startup-notification-rules were
given. This commit fixes the code so that "startup done" callbacks are also
called when no rules were given.

Fixes: https://github.com/awesomeWM/awesome/issues/1218
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-12-01 15:32:21 +01:00
Uli Schlachter badf338542 Add awesome.hostname
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-27 19:22:42 +02:00
Uli Schlachter 6b4a2625cb test-spawn-snid.lua: Use test client instead of urxvt
Startup notification support in urxvt is optional while GTK always supports
startup notification. Thus, use the new GTK-based test client for the SN tests.

Fixes: https://github.com/awesomeWM/awesome/issues/848
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-05 18:48:24 +02:00
Uli Schlachter e18bece3df Make tests more reliable on "early errors"
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>
2016-03-06 10:20:45 +01:00
Uli Schlachter bf3b9b5f42 tests: Fix luacheck warnings
This leaves one warning in tests/test-urgent.lua which points out an actual
bug/problem.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-12 09:12:41 +01:00
Uli Schlachter 63653bed76 Add the right vim modeline to all lua files
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-12-12 17:42:33 +01:00
Daniel Hahler 339e2b0ecc Add failing test: c.startup_id should be nil when snid is disabled
When using `spawn` without startup notification support, the
`startup_id` property on the client should be nil.

This adds rxvt-unicode to the Travis build, because it supports startup
notifications, but xterm does not.  We should replace xterm with it in
the existing tests then later.
2015-11-05 23:03:59 +01:00