test-catalog.c revision 737563e4bb1606cae1dd0e9484f9e82da466fe76
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/***
This file is part of systemd.
Copyright 2012 Lennart Poettering
Copyright 2013 Zbigniew Jędrzejewski-Szmek
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <locale.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include "util.h"
#include "log.h"
#include "macro.h"
#include "sd-messages.h"
#include "catalog.h"
int r;
char name[] = "/tmp/test-catalog.XXXXXX";
}
static void test_catalog_importing(void) {
Hashmap *h;
#define BUF "xxx"
assert(hashmap_isempty(h));
log_debug("----------------------------------------");
#define BUF \
"-- 0027229ca0644181a76c4e92458afaff dededededededededededededededede\n" \
"Subject: message\n" \
"\n" \
"payload\n"
log_debug("----------------------------------------");
#define BUF \
"-- 0027229ca0644181a76c4e92458afaff dededededededededededededededed\n" \
"Subject: message\n" \
"\n" \
"payload\n"
log_debug("----------------------------------------");
}
static void test_catalog_update(void) {
int r;
static char name[] = "/tmp/test-catalog.XXXXXX";
assert(r >= 0);
/* Test what happens if there are no files. */
assert(r >= 0);
/* Note: this might actually not find anything, if systemd was
* not installed before. That should be fine too. */
assert(r >= 0);
}
int r;
assert_se(r >= 0);
assert_se(r >= 0);
if (database)
return 0;
}