summaryrefslogtreecommitdiff
path: root/src/test/test-log.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/test-log.c')
-rw-r--r--src/test/test-log.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/test-log.c b/src/test/test-log.c
index ae9e113ef..626d2c613 100644
--- a/src/test/test-log.c
+++ b/src/test/test-log.c
@@ -24,6 +24,15 @@
#include "log.h"
#include "util.h"
+assert_cc(LOG_REALM_REMOVE_LEVEL(LOG_REALM_PLUS_LEVEL(LOG_REALM_SYSTEMD, LOG_FTP | LOG_DEBUG))
+ == LOG_REALM_SYSTEMD);
+assert_cc(LOG_REALM_REMOVE_LEVEL(LOG_REALM_PLUS_LEVEL(LOG_REALM_UDEV, LOG_LOCAL7 | LOG_DEBUG))
+ == LOG_REALM_UDEV);
+assert_cc((LOG_REALM_PLUS_LEVEL(LOG_REALM_SYSTEMD, LOG_LOCAL3 | LOG_DEBUG) & LOG_FACMASK)
+ == LOG_LOCAL3);
+assert_cc((LOG_REALM_PLUS_LEVEL(LOG_REALM_UDEV, LOG_USER | LOG_INFO) & LOG_PRIMASK)
+ == LOG_INFO);
+
int main(int argc, char* argv[]) {
log_set_target(LOG_TARGET_CONSOLE);