test-env-replace.c revision 940bd4738b16503d903689e50eeb22645463fc16
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/***
This file is part of systemd.
Copyright 2010 Lennart Poettering
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 <unistd.h>
#include <string.h>
#include "util.h"
#include "strv.h"
static void test_strv_env_delete(void) {
d = strv_env_delete(a, 2, b, c);
}
static void test_strv_env_unset(void) {
_cleanup_strv_free_ char **l = NULL;
strv_env_unset(l, "SCHLUMPF");
}
static void test_strv_env_set(void) {
r = strv_env_set(l, "WALDO=WALDO");
}
static void test_strv_env_merge(void) {
r = strv_env_merge(2, a, b);
strv_env_clean(r);
}
static void test_replace_env_arg(void) {
const char *env[] = {
"FOO=BAR BAR",
"BAR=waldo",
};
const char *line[] = {
"FOO$FOO",
"FOO$FOOFOO",
"FOO${FOO}$FOO",
"FOO${FOO}",
"${FOO}",
"$FOO",
"$FOO$FOO",
"${FOO}${BAR}",
"${FOO",
};
_cleanup_strv_free_ char **r = NULL;
}
{
_cleanup_free_ char *t;
}
static void test_normalize_env_assignment(void) {
}
return 0;
}