Now that tests are no longer scanned for recursively, the hack of passing values
back and forth via the environment is no longer needed and can be removed.
While at it, this also exchanges the "useless use of regex" for an explicit
string replacement.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Instead of recursively walking the directory tree, this commit makes the code us
GLOB_RECURSE to find all files and then handles them on after another.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The namespace of e.g. "tests/examples/awful/mouse/coords.lua" is "_awful_mouse".
This is purely based on the path of the file.
Previously, this was computed while recursively scanning the directory tree.
This commit instead moves this to an extra function that handles this task.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Previously, while recursively scanning the directory tree, the code in here also
scanned for template.lua files and remembered the latest one it found. This
commit adds a function which finds the right template.lua for a given file name,
making this search explicit and easier to understand.
Signed-off-by: Uli Schlachter <psychon@znc.in>
There was a problem that the examples were considered to have failed as soon as
they produced any kind of output, but there were legitimate cases of warnings
being printed that triggered these checks. Commit 4819be4f4f used a
regular expression to detect and ignore this warnings.
This commit reverts the above commit and instead silences the warnings by
monkey-patching the function that prints the warnings into a no-op.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The requirement to call add_signal() was added to catch typos. However, this
requirement became increasingly annoying with property::<name> signals and e.g.
gears.object allowing arbitrary properties to be changed.
All of this ended up in a single commit because tests/examples fails if I first
let add_signal() emit a deprecation warning.
Signed-off-by: Uli Schlachter <psychon@znc.in>
As the documentation generation insert increasingly large ammount
of code into the lua files, the coverage data is getting less and
less accurate. This try to fix this by only collecting such data
after the `configure_file` calls are done.
Any clients with these tags end up somewhere random (the first tag on the first
remaining screen). This certainly can be improved in the future, but at least
this is a start.
Signed-off-by: Uli Schlachter <psychon@znc.in>
There was a regression when refactoring the API. It was no longer
possible to disable the automatic tag selection.
Due to recent changes, it was no longer possible to disable the
default tag selection handler. This commit extend the already
existing request::tag mechanism to let handlers select the tags.