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