This way their name doesn't get mangle by the broken magic. It will also
eventually allow to `error()` in the template when the implicit
`@function` is used.
This commit also fixes a large number of issues found while
proof-reading everything.
- Fill slider bar with a linear pattern based on current value (if `bar_active_color` and `bar_color` are correctly provided)
- Add examples for the apidoc
* naughty.legacy: Fix a regression caused by a prior fix.
The title was only set "later" because it was called too early.
The intended result was to prevent the code from being executed when
there is no leagcy popup, but it had this side effect.
* naughty.dbus: Expose the new "private" methods so they can be tested.
Because it now uses Gio instead of capi.dbus, it isn't possible to
just shim the backend anymore.
* shims: Upgrade the dbus shims to also emulate some Gio behavior.
As usual, it is the most basic version that produces the correct
result. It doesn't try to comply to the real API.
The tests for naughty are currently broken, because naughty.dbus now
uses Gio for interacting with DBus, but the tests still try to use
awesome's dbus object. Turn the resulting weird error into something a
lot less cryptic.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This will avoid some copy/paste in future tests.
The commit also fixes a typo and a missing --DOC_NO_DASH which breaks
rendering with one of the markdown implementation.
Once the signals get propagated, it means "manage" will call code before
the metatable is set. If this happens and it sets some properties, they
will perpetually bypass the `awful.client.object` handler.
Given there is some async wibox redraw operations, there is a tiny,
tiny chance the test suite callback will be executed before the
redraw. It has been seen on the CI, so it is not 100% impossible.
There is not much good reason why this should be required and making it
optional is almost trivial, as this patch shows.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit makes test-gravity.lua use the new infrastructure that was
added in the previous commit: Instead of pretending to be a steps-based
test, this is now a direct test. This gets rid of all the useless
wait_a_bit steps that exist purely to satisfy the steps-based test
runner.
This commit makes test-gravity.lua about one third shorter. Also, the
test might run a tiny bit faster, since there is no more timer that
regularly checks if the test is done, but instead it finishes
immediately when the external process finishes.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The current _runner.lua expects a table containing steps to be passed
in. However, not all tests look like this. This commits adds an API to
the runner that allows tests to run however they like. They just have to
call run_direct() initially and call done() when they are finished.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This moves selection_acquire to selection.acquire, selection_getter to
selection.getter and selection_watcher to selection.watcher. The only
user-visible change due to this is that type(selection) is now "table"
instead of "function". If that breaks something for you, tough luck.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This is inspired to be a correctness fix: The "hints" argument to
notifications is supposed to have type a{sv}, i.e. this maps from string
keys to some generic value. dbus-send does not support this and instead
it sends an argument of type a{ss}, i.e. a mapping from string to
string. This commit fixes this problem and uses the correct type.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The first step of a test is called 20 times before a failure is
diagnosed. Later steps only get five calls to finish. I guess the idea
is that the first step sets everything up and opens all necessary
clients, while later steps then do something with these clients.
However, looking at our existing tests, they are not structured like
that. Later steps open more clients etc.
Since this limit has no negative impact on the run-time of tests, but
only means that failures are detected later, let's just remove this
limit of five calls.
Signed-off-by: Uli Schlachter <psychon@znc.in>
When a string is spawned, the C code has to split this into an array for
the execve() syscall. When an array is given directly, this array does
not need to be transformed in any way. This makes it much more clear
what is actually started.
This commit removes some quotation marks that were previously removed by
the C code. For example,
array:string:1,"four",2,"five",3,"six"
became
array:string:1,four,2,five,3,six
because otherwise the action was called "four" instead of four and the
test failed.
Signed-off-by: Uli Schlachter <psychon@znc.in>
As requested in the review, instead of just having a single string
argument, selection_acquire() now has a table as its argument. It
searches the string under the "selection" key here.
Signed-off-by: Uli Schlachter <psychon@znc.in>