To assert static objects, we either have to add a method into the
object under test itself and recompile on a test run with the activated test
method (but also recompile after tests, so that method is gone on
release builds).
Alternatively we can include the whole .c file in our test
infrastructure and save the object in the test directory. So there's no
necessity to clean it up prior to a release build and it's contained
away.
This requires, that the test folder isn't excluded in coveralls.
The coveralls service is a great webservice, but like the testsuite it's
better to have an alternative, which makes it possible to process it
locally. This is faster and doesn't even require a full push iteration.
gcovr is easy to get:
pip install gcovr
make test-coverage-report
Add the necessary compiler flags to the Makefile to actually make
coverage reports available locally, too.
The coverage files have to get cleaned every time before the test gets
run. Otherwise, it would sum up the coverage over multiple test runs.
Previously config lines like
[rule]
script = mail -s "New notif"
were only possible to get written with additional full quotes,
which makes no sense in command line expressions.
Parsing the arguments with g_shell_parse_argv is more safe than just
splitting it by spaces. Also this allows to pass values with spaces to
the browser command.
When executing dmenu, the current notifications get "locked", by setting
their timeout temporarily to 0 and referencing them. So the notification
won't get closed (exept forcefully) and won't get freed while dmenu is
opened.
This is currently pointless, but as the dmenu call will become threaded,
it's necessary later.
The notification spec says, that a notification gets invalidated when
closed. So the client won't listen anymore to ActionInvoked signals and
won't listen to NotificationClosed signals.
Remembering the actual status of the notification helps the standard and
makes the behavior clearer.
The blame reveals commit 820cfe73, which introduced printing of
notifications similar to notification_print(). The fflush call is still
left over since porting the printfs into their dedicated method.
As notification_print() is called after this fflush() call, it's not
necessary anymore.