test-journal-match.c revision b5efdb8af40ea759a1ea584c1bc44ecc81dd00ce
0ba2cbe97e0678a691742f98d2532caed0a2c4aaxc/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
0ba2cbe97e0678a691742f98d2532caed0a2c4aaxc This file is part of systemd.
0ba2cbe97e0678a691742f98d2532caed0a2c4aaxc Copyright 2012 Lennart Poettering
0ba2cbe97e0678a691742f98d2532caed0a2c4aaxc systemd is free software; you can redistribute it and/or modify it
0ba2cbe97e0678a691742f98d2532caed0a2c4aaxc under the terms of the GNU Lesser General Public License as published by
0ba2cbe97e0678a691742f98d2532caed0a2c4aaxc the Free Software Foundation; either version 2.1 of the License, or
0ba2cbe97e0678a691742f98d2532caed0a2c4aaxc (at your option) any later version.
0ba2cbe97e0678a691742f98d2532caed0a2c4aaxc systemd is distributed in the hope that it will be useful, but
0ba2cbe97e0678a691742f98d2532caed0a2c4aaxc WITHOUT ANY WARRANTY; without even the implied warranty of
0ba2cbe97e0678a691742f98d2532caed0a2c4aaxc MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
0ba2cbe97e0678a691742f98d2532caed0a2c4aaxc Lesser General Public License for more details.
0ba2cbe97e0678a691742f98d2532caed0a2c4aaxc You should have received a copy of the GNU Lesser General Public License
0ba2cbe97e0678a691742f98d2532caed0a2c4aaxc along with systemd; If not, see <http://www.gnu.org/licenses/>.
d62bc4badc1c1f1549c961cfb8b420e650e1272byz assert_se(sd_journal_add_match(j, "foobar=waldo", 0) < 0);
f4b3ec61df05330d25f55a36b975b4d7519fdeb1dh assert_se(sd_journal_add_match(j, "HALLO=WALDO", 0) >= 0);
e7801d59e8ceda0cde8ebdfdddd7582ee2ea96efsowmini assert_se(sd_journal_add_match(j, "QUUX=xxxxx", 0) >= 0);
e7801d59e8ceda0cde8ebdfdddd7582ee2ea96efsowmini assert_se(sd_journal_add_match(j, "HALLO=", 0) >= 0);
e7801d59e8ceda0cde8ebdfdddd7582ee2ea96efsowmini assert_se(sd_journal_add_match(j, "QUUX=xxxxx", 0) >= 0);
e7801d59e8ceda0cde8ebdfdddd7582ee2ea96efsowmini assert_se(sd_journal_add_match(j, "QUUX=yyyyy", 0) >= 0);
bcb5c89da22515e2ccf139578bad3caebcd716adSowmini Varadhan assert_se(sd_journal_add_match(j, "PIFF=paff", 0) >= 0);
afdda45f890ee5dfc86e5131a30b11b354d51633Vasumathi Sundaram - Sun Microsystems assert_se(sd_journal_add_match(j, "ONE=one", 0) >= 0);
afdda45f890ee5dfc86e5131a30b11b354d51633Vasumathi Sundaram - Sun Microsystems assert_se(sd_journal_add_match(j, "ONE=two", 0) >= 0);
6b9e797c2ea518518cb2b57895991d8bdaa167fesowmini assert_se(sd_journal_add_match(j, "L3=yes", 0) >= 0);
afdda45f890ee5dfc86e5131a30b11b354d51633Vasumathi Sundaram - Sun Microsystems assert_se(sd_journal_add_match(j, "L3=ok", 0) >= 0);
e7801d59e8ceda0cde8ebdfdddd7582ee2ea96efsowmini assert_se(streq(t, "(((L3=ok OR L3=yes) OR ((L4_2=ok OR L4_2=yes) AND (L4_1=ok OR L4_1=yes))) AND ((TWO=two AND (ONE=two OR ONE=one)) OR (PIFF=paff AND (QUUX=yyyyy OR QUUX=xxxxx OR QUUX=mmmm) AND (HALLO= OR HALLO=WALDO))))"));