"a=\n" \
"b="
-static void test_load_env_file_1(void) {
+TEST(load_env_file_1) {
_cleanup_strv_free_ char **data = NULL;
int r;
assert_se(data[6] == NULL);
}
-static void test_load_env_file_2(void) {
+TEST(load_env_file_2) {
_cleanup_strv_free_ char **data = NULL;
int r;
assert_se(data[1] == NULL);
}
-static void test_load_env_file_3(void) {
+TEST(load_env_file_3) {
_cleanup_strv_free_ char **data = NULL;
int r;
assert_se(data == NULL);
}
-static void test_load_env_file_4(void) {
+TEST(load_env_file_4) {
_cleanup_strv_free_ char **data = NULL;
_cleanup_(unlink_tempfilep) char name[] = "/tmp/test-load-env-file.XXXXXX";
_cleanup_close_ int fd;
assert_se(data[3] == NULL);
}
-static void test_load_env_file_5(void) {
+TEST(load_env_file_5) {
_cleanup_strv_free_ char **data = NULL;
int r;
assert_se(data[2] == NULL);
}
-static void test_write_and_load_env_file(void) {
+TEST(write_and_load_env_file) {
const char *v;
/* Make sure that our writer, parser and the shell agree on what our env var files mean */
}
}
-int main(int argc, char *argv[]) {
- test_setup_logging(LOG_INFO);
-
- test_load_env_file_1();
- test_load_env_file_2();
- test_load_env_file_3();
- test_load_env_file_4();
- test_load_env_file_5();
-
- test_write_and_load_env_file();
-
- return 0;
-}
+DEFINE_TEST_MAIN(LOG_INFO);