25 #include "dbus-internals.h"
26 #include "dbus-test.h"
27 #include "dbus-auth.h"
36 #ifdef DBUS_BUILD_TESTS
37 #include "dbus-test.h"
38 #include "dbus-auth-script.h"
42 process_test_subdir (
const DBusString *test_base_dir,
80 printf (
"Testing %s:\n", subdir);
98 _dbus_verbose (
"Skipping non-.auth-script file %s\n",
106 if (!_dbus_auth_script_run (&full_path))
117 _dbus_warn (
"Could not get next file in %s: %s\n",
136 process_test_dirs (
const char *test_data_dir)
145 if (!process_test_subdir (&test_directory,
"auth"))
158 _dbus_auth_test (
const char *test_data_dir)
161 if (test_data_dir ==
NULL)
164 if (!process_test_dirs (test_data_dir))
const char * message
public error message field
#define NULL
A null pointer, defined appropriately for C or C++.
void _dbus_directory_close(DBusDirIter *iter)
Closes a directory iteration.
dbus_bool_t _dbus_directory_get_next_file(DBusDirIter *iter, DBusString *filename, DBusError *error)
Get next file in the directory.
#define DBUS_ERROR_INIT
Expands to a suitable initializer for a DBusError on the stack.
void dbus_error_free(DBusError *error)
Frees an error that's been set (or just initialized), then reinitializes the error as in dbus_error_i...
DBusDirIter * _dbus_directory_open(const DBusString *filename, DBusError *error)
Open a directory to iterate over.
dbus_bool_t _dbus_string_init(DBusString *str)
Initializes a string.
dbus_bool_t _dbus_string_copy(const DBusString *source, int start, DBusString *dest, int insert_at)
Like _dbus_string_move(), but does not delete the section of the source string that's copied to the d...
dbus_bool_t _dbus_string_ends_with_c_str(const DBusString *a, const char *c_str)
Returns whether a string ends with the given suffix.
Internals of directory iterator.
dbus_bool_t _dbus_concat_dir_and_file(DBusString *dir, const DBusString *next_component)
Appends the given filename to the given directory.
dbus_uint32_t dbus_bool_t
A boolean, valid values are TRUE and FALSE.
void _dbus_string_init_const(DBusString *str, const char *value)
Initializes a constant string.
void _dbus_warn(const char *format,...)
Prints a warning message to stderr.
Object representing an exception.
void _dbus_string_free(DBusString *str)
Frees a string created by _dbus_string_init().
#define TRUE
Expands to "1".
#define _dbus_assert_not_reached(explanation)
Aborts with an error message if called.
#define FALSE
Expands to "0".
const char * _dbus_string_get_const_data(const DBusString *str)
Gets the raw character buffer from a const string.
dbus_bool_t dbus_error_is_set(const DBusError *error)
Checks whether an error occurred (the error is set).