114 Commits

Author SHA1 Message Date
Michael Krasnitski
a4a1a1ac9e Add tests for parsing lists from conf/cmdline. 2020-04-05 15:29:28 -04:00
stefan
697db7198d Uninstall dunstify 2020-04-03 14:16:53 +02:00
Jonas Berlin
ad5d20bd6a Add tests for icon scaling math & loading 2019-12-17 22:40:36 +02:00
Benedikt Heine
52a8489043 Don't overflow when passing INT_MAX on DBus wire 2019-08-09 14:41:37 +02:00
Nikos Tsipinakis
d6bd506669 Fix parsing of comments after a quoted string in the config
Quoted values can still have a trailing comment that we need to remove
before calling `add_value`. Otherwise, when trying to strip the quotes
from the value `string_strip_quotes` only looks at the end which
is inside the comment and so it won't find a matching end quote to
strip.

Fixes #626
2019-04-27 10:30:02 +03:00
Nikos Tsipinakis
63ec283c5a
Merge pull request #590 from mgsloan/skip-display-rule-option
Skip display rule option
2019-02-09 11:33:26 +02:00
Nikos Tsipinakis
2fb1de8f02 Test installation
Ensure that dunst is installed correctly to avoid bugs like #600.
2019-02-05 23:11:35 +02:00
Michael Sloan
977a7a7ea4 New rule option: skip_display 2019-01-30 23:50:33 -08:00
Benedikt Heine
1e82c761c9 Add support for desktop-entry hints 2019-01-25 07:59:01 +01:00
Benedikt Heine
6f8b53c4e8 Compare raw icons by their checksums
Currently, we just skipped the notification comparison, if the
notification had a raw icon attached. This is a bit counterintuitive.

Calculating a checksum of the raw icon's data is the solution.

For that we cache the pixel buffer and introduce a field, which saves
the current icon's id. The icon_id may be a path or a hash.
So you can compare two notifications by their icon_id field regardless
of their icon type by their icon_id field.
2019-01-11 13:10:37 +01:00
Benedikt Heine
cd09d5a88e Cache GdkPixbuf in notification structure 2019-01-07 17:56:00 +01:00
Benedikt Heine
088907488c Rename icon field to iconname 2019-01-07 17:56:00 +01:00
Benedikt Heine
595ffc294a
Merge pull request #584 from bebehei/test-printlog
Control to print log messages during test
2019-01-05 20:51:27 +01:00
Benedikt Heine
0e0af0d8ec
Merge pull request #582 from bebehei/dbus-test2
Test raw icon assembly in DBus
2019-01-05 15:43:40 +01:00
Benedikt Heine
7092e54840 Control to print log messages during test
The log messages are useless during general and automated testing. But
while developing tests, the warning messages might be an easy debugging
option to check why one's own test currently fails.
2019-01-04 22:35:30 +01:00
Benedikt Heine
d1700dc3eb Test raw icon assembly in DBus 2019-01-03 18:39:22 +01:00
Benedikt Heine
c37326c9a0 Move memory allocation into test methods
This implies, that memory will only get freed, if the whole test method
is gone through. In case of failure, memory leaks aren't important. But
it's crucial not to fail with a segfault just for an assertion.

Fixes #580
2019-01-03 12:21:05 +01:00
Benedikt Heine
84e5a0bf26 Make notification_is_duplicate test icons
Before, it only did test for `ASSERT_FALSE` both times. So a raw_image
wasn't guaranteed to be a condition to falsify the return.

Using the single field function, will test for both cases.
2019-01-03 12:19:53 +01:00
Benedikt Heine
330faa3e5a Add ability to test ActionInvoked signal 2018-12-30 17:07:27 +01:00
Benedikt Heine
c236ef7751 Always use an odd number of actions during testing 2018-12-30 17:07:04 +01:00
Benedikt Heine
62a83e183e Test urgency hints in DBus 2018-12-30 17:07:04 +01:00
Benedikt Heine
3c5b15d630 Test category hint in DBus 2018-12-30 17:07:04 +01:00
Benedikt Heine
416da59e9e Test icon hints in DBus 2018-12-30 17:07:04 +01:00
Benedikt Heine
01784d5514 Test progress hints in DBus 2018-12-30 17:07:04 +01:00
Benedikt Heine
5e616516df Test transient hints in DBus 2018-12-30 17:07:01 +01:00
Benedikt Heine
57a6baae85 Test FDN Daemon info 2018-12-29 14:38:59 +01:00
Benedikt Heine
fb483347ed Test close signals 2018-12-29 14:38:59 +01:00
Benedikt Heine
ae58207f9b Use binary search for functions 2018-12-29 14:38:58 +01:00
Benedikt Heine
0d82b19987 Add test for empty notification 2018-12-29 14:31:31 +01:00
Benedikt Heine
caffb0b10c Add tests for notification color hints 2018-12-29 14:31:31 +01:00
Benedikt Heine
b10bb292c6 Simplify DBus notification assembly 2018-12-29 14:31:31 +01:00
Benedikt Heine
a8faea725d wait longer for DBus in tests
While running under valgrind, it may take over 30 cycles in the loop to
wait for a running GTestDBus instance. So we have to increase the
waiting time.

Waiting a whole second will change the signal/noise ratio and will only
fail, if there's really a problem with the GTestDBus usage.

And as we're sleeping 500us in every loop, we usually get a super fast
response, too.
2018-12-29 14:31:31 +01:00
Benedikt Heine
314d982bf4 Add capability tests for DBus 2018-12-29 14:31:31 +01:00
Benedikt Heine
3598aaf3e2 Add initial dbus tests 2018-12-29 14:31:29 +01:00
Benedikt Heine
f4b8fff89d Simplify pointer test cases 2018-12-29 13:50:35 +01:00
Benedikt Heine
d40b42c77d Add additional tests for extract_urls 2018-12-27 20:59:48 +01:00
Benedikt Heine
db350883cc Improve extract_urls 2018-12-27 20:59:47 +01:00
Andrew Benson
65bcce652c Add tests for extract_urls 2018-12-27 20:59:19 +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
711b11c92f Merge queue_update and queue_check_timeouts 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