1347 Commits

Author SHA1 Message Date
Benedikt Heine
394393fb6e Let's test CircleCI 2018-11-28 21:22:36 +02:00
Nikos Tsipinakis
0a2802af75
Merge pull request #566 from bebehei/notification-colors
Notification colors
2018-11-27 14:36:02 +02:00
Benedikt Heine
ecfe64c4bd Cleanup unused macros 2018-11-26 19:54:21 +01:00
Benedikt Heine
7e81506226 Remove colors field from xctx
The xctx color field is a full duplicate of the settings logic.
Only logic included in xctx color fields, are the frame colors, which
fall back to the global frame setting. So, this required to handle it
directly in settings.c
2018-11-26 19:54:07 +01:00
Benedikt Heine
3e205ff159 Use notification_colors struct in settings 2018-11-26 18:17:00 +01:00
Benedikt Heine
c3cd623f41 Use notification_colors struct for notification colors 2018-11-26 17:31:46 +01:00
Nikos Tsipinakis
f02a0d4b8d
Merge pull request #561 from tsipinakis/bugfix/drop-libdbus
Drop libdbus dependency
2018-11-26 17:03:46 +02:00
Nikos Tsipinakis
baf0ec3e11 Remove dbus build flags
We haven't been using libdbus for a while so there is no use to
linking it with the build.
Unfortunately there is still a dependency on it as we depend on the dbus
package to tell us where to put our service files.
2018-11-26 16:05:50 +02:00
Benedikt Heine
7b1157c5af
Merge pull request #564 from bebehei/testsuite
Misc Testsuite updates
2018-11-26 15:00:45 +01:00
Benedikt Heine
b9b803d0ea The memory leaks should be fixed by librsvg 2018-11-26 12:57:37 +01:00
Benedikt Heine
5284ce01f4 Make notification tests easier 2018-11-26 12:19:17 +01:00
Benedikt Heine
193b1f7202 Test notification maximum length 2018-11-26 12:19:17 +01:00
Benedikt Heine
1b4ca786cd Test notification_format_message 2018-11-26 12:17:50 +01:00
Benedikt Heine
6988a6e04d Add tests for log.c 2018-11-26 12:08:18 +01:00
Benedikt Heine
ec3e47abb5 Skip tests requiring extended precision if not avail
Alpine is running with Musl libc and musl uses extended precision
doubles, while valgrind can't handle extended precision,
2.3 == atof("2.3") won't be true under valgrind.

And therefore the option retrieval methods *_get_double would fail.

Also we have to increase the test verbosity, as `SKIPm` doesn't print
the message when skipping the tests.
See: silentbicycle/greatest#85
2018-11-26 12:07:50 +01:00
Benedikt Heine
22cc3f190d Update greatest.h (1.2.1 -> 1.4.0)
Enables the feature -x to exclude some specific tests.
2018-11-26 10:52:57 +01:00
Benedikt Heine
7ba6ca910f
Merge pull request #551 from bebehei/queues-tests
Queues tests
2018-11-26 10:50:58 +01:00
Benedikt Heine
93f6eb58a3 Remove n->start tests
These aren't used anymore. Any notification which gets moved from
waiting to displayed, will have set the start field with the current
monotonic time.

So testing start == 0 won't ever succeed in
queues_notification_is_finished, as the tested notification is contained
in the displayed queue. So the start field never will be 0.

Also there's no semantics for start being 0 in dunst actually
implemented.
2018-11-24 15:22:18 +01:00
Benedikt Heine
d96a29fed5 Move field definition on top of function (readability) 2018-11-24 15:22:18 +01:00
Benedikt Heine
711b11c92f Merge queue_update and queue_check_timeouts 2018-11-24 15:22:18 +01:00
Benedikt Heine
9878de312b Do not mark the waiting notification as shown
Notifications listed in the waiting queue are never shown
🙈
2018-11-24 15:22:18 +01:00
Benedikt Heine
475d829733 Fix notification seeping when displayed isn't full
Only if the queue is full, dunst should swap the most important
notifications from waiting with the least important notifications from
displayed.
2018-11-24 15:22:18 +01:00
Benedikt Heine
0b7a31b477 Add faulty notification seep test 2018-11-24 15:22:18 +01:00
Benedikt Heine
3e0daf40bf Add tests for xmore layout behavior 2018-11-24 15:22:18 +01:00
Benedikt Heine
24e0e25ec2 Add tests for seeping important notifications 2018-11-24 15:22:18 +01:00
Benedikt Heine
acee260624 Add test for pausing behavior 2018-11-24 15:22:18 +01:00
Benedikt Heine
3fbd1fc589 Add tests for fullscreen behavior 2018-11-24 15:22:18 +01:00
Benedikt Heine
2c1de2dc22 Add tests for checking notifications timing out 2018-11-24 15:22:18 +01:00
Benedikt Heine
e6e0d881eb Test stacking 2018-11-24 15:22:18 +01:00
Benedikt Heine
f1e391673a Add queue history tests 2018-11-24 15:22:18 +01:00
Benedikt Heine
5cf9e51ada Test queue length reporting functions 2018-11-24 15:22:18 +01:00
Benedikt Heine
662b22e5de Test sleep times for get_next_datachange 2018-11-24 15:22:18 +01:00
Benedikt Heine
140278a36f Introduce a status structure 2018-11-24 15:22:18 +01:00
Benedikt Heine
ef08f6aa66 Test notification closing in queues 2018-11-24 15:22:18 +01:00
Benedikt Heine
294cfdfa47 Test insertion mechanisms 2018-11-24 15:22:18 +01:00
Benedikt Heine
fb5926b6fa Add tests for queue teardown 2018-11-24 15:22:18 +01:00
Benedikt Heine
e04003e291 Add Framework for queues tests 2018-11-24 15:22:18 +01:00
Benedikt Heine
cb16fe9d96 Fix DoS in notification_format_message
When using a format with a trailing % character, dunst ends in an
endless loop, searching for a % char, while pointing exactly with the
haystack on the % character.

Increasing the substring pointer will shift the pointer forwards onto
the actual NULL character and stop the loop.
2018-11-24 15:22:18 +01:00
Nikos Tsipinakis
5f3960b171 Fix id replacement not assigning id if no notification has it
In previous releases when a replace request came in with an id that
doesn't exist we created a new notification with it anyway.
This is used by some to imitate the behaviour of `stack_tag` and while
not recommended (as it will break if another notification gets assigned
that id) we want to avoid such subtle breakages without consideration.

This bug was introduced in d879d70da060ea78fe735d62249a0afdf3e61bc8.
2018-11-24 15:22:18 +01:00
Benedikt Heine
28f30d182b Rename queues teardown function
Make it consistent with the queues_init function
2018-11-23 13:50:46 +01:00
Nikos Tsipinakis
d786381cb0
Merge pull request #562 from bebehei/buildsystem
Minor changes & fixes
2018-11-22 18:02:06 +02:00
Benedikt Heine
e82b7bfb2d Use return value as success indicator 2018-11-21 10:55:44 +01:00
Benedikt Heine
92543cce22 Remove GLib requirement check
The requirement for GLib above 2.36 is already included in the
configuration file. So this type check is redundant.
2018-11-20 19:50:15 +01:00
Benedikt Heine
20df6f2103 Remove deprecated .c.o rule 2018-11-19 17:19:35 +01:00
Benedikt Heine
0410a9369b
Merge pull request #502 from bebehei/coveragereport
Coveragereport and test suite improvements
2018-11-18 13:34:57 +01:00
Benedikt Heine
ed341dfca3 Add S2US macro 2018-11-15 15:17:48 +01:00
Benedikt Heine
9b45a111f1 Sort includes alphabetically 2018-11-15 15:17:48 +01:00
Benedikt Heine
feb62a0c4c Remove displaced comment 2018-11-15 15:17:48 +01:00
Benedikt Heine
a6abfdf7c5 Include all local files relatively 2018-11-15 15:17:48 +01:00
Benedikt Heine
8c192f3c28 Make tests runnable from everywhere 2018-11-15 15:17:46 +01:00