test_sbus_opath.c revision 57c5ea8825c7179fd93382dbcbb07e828e5aec19
/*
Authors:
Jakub Hrozek <jhrozek@redhat.com>
Pavel Březina <pbrezina@redhat.com>
Copyright (C) 2014 Red Hat
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <talloc.h>
#include <errno.h>
#include <popt.h>
#include "sbus/sssd_dbus.h"
#include "tests/cmocka/common_mock.h"
void test_sbus_opath_strip_prefix(void **state)
{
const char *prefix = "/org/freedesktop/sssd/";
const char *path = "/org/freedesktop/sssd/infopipe";
const char *strip;
}
void test_sbus_opath_escape_unescape(void **state)
{
char *escaped;
char *raw;
/* underscore is 0x5F in ASCII */
/* empty string */
/* negative tests */
}
void test_sbus_opath_compose(void **state)
{
char *path;
/* Doesn't need escaping */
}
void test_sbus_opath_compose_escape(void **state)
{
char *path;
/* A dot needs escaping */
}
static void check_opath_components(char **input,
const char **expected)
{
int i;
assert_non_null(input[i]);
assert_non_null(expected[i]);
}
assert_null(input[i]);
assert_null(expected[i]);
}
static void check_opath_components_and_length(char **input,
const char **expected,
{
}
void test_sbus_opath_decompose_noprefix(void **state)
{
char **components;
}
void test_sbus_opath_decompose_prefix(void **state)
{
char **components;
}
void test_sbus_opath_decompose_prefix_slash(void **state)
{
char **components;
}
void test_sbus_opath_decompose_wrong_prefix(void **state)
{
char **components;
}
void test_sbus_opath_decompose_escaped(void **state)
{
const char *path = "/object/redhat_2ecom";
char **components;
}
void test_sbus_opath_decompose_exact_correct(void **state)
{
char **components;
}
void test_sbus_opath_decompose_exact_wrong(void **state)
{
char **components;
}
void test_sbus_opath_get_object_name(void **state)
{
char *name;
}
{
int opt;
struct poptOption long_options[] = {
};
const struct CMUnitTest tests[] = {
};
/* Set debug level to invalid value so we can decide if -d 0 was used. */
switch(opt) {
default:
return 1;
}
}
}