mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 12:32:40 +03:00
Fixes in tests
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
parent
495b4d662f
commit
517cc5cfe4
@ -1,3 +1,5 @@
|
||||
PACKAGE_STRING = "/lib"
|
||||
|
||||
SUBDIRS = . mcconfig search strutil vfs widget
|
||||
|
||||
AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) @CHECK_CFLAGS@
|
||||
|
@ -55,10 +55,10 @@ main (void)
|
||||
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -148,10 +148,10 @@ main (void)
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "mc_build_filename.log");
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -1,3 +1,4 @@
|
||||
PACKAGE_STRING = "/lib/mcconfig"
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-DWORKDIR=\"$(abs_builddir)\" \
|
||||
|
@ -253,11 +253,11 @@ main (void)
|
||||
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
/* srunner_set_fork_status (sr, CK_NOFORK); */
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_set_log (sr, "config_string.log");
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -229,11 +229,10 @@ main (void)
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "user_configs_path.log");
|
||||
/* srunner_set_fork_status (sr, CK_NOFORK); */
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -144,10 +144,10 @@ main (void)
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "name_quote.log");
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -1,3 +1,4 @@
|
||||
PACKAGE_STRING = "/lib/search"
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
$(GLIB_CFLAGS) \
|
||||
|
@ -107,10 +107,11 @@ main (void)
|
||||
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_set_log (sr, "glob_prepare_replace_str.log");
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -119,10 +119,11 @@ main (void)
|
||||
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_set_log (sr, "glob_translate_to_regex.log");
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -148,10 +148,11 @@ main (void)
|
||||
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_set_log (sr, "regex_get_compile_flags.log");
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -153,10 +153,11 @@ main (void)
|
||||
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_set_log (sr, "regex_process_escape_sequence.log");
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -223,10 +223,11 @@ main (void)
|
||||
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_set_log (sr, "regex_replace_esc_seq.log");
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -96,10 +96,11 @@ main (void)
|
||||
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_set_log (sr, "translate_replace_glob_to_regex.log");
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -384,10 +384,10 @@ main (void)
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "serialize.log");
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -1,3 +1,4 @@
|
||||
PACKAGE_STRING = "/lib/strutil"
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
$(GLIB_CFLAGS) \
|
||||
|
@ -159,10 +159,10 @@ main (void)
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "parse_integer.log");
|
||||
srunner_run_all (sr, CK_NOFORK);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -185,10 +185,10 @@ main (void)
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "replace__str_replace_all.log");
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -83,11 +83,11 @@ main (void)
|
||||
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "utilinux__my_system.log");
|
||||
srunner_run_all (sr, CK_NOFORK);
|
||||
srunner_set_log (sr, "utilinux__my_system-fork_child.log");
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -84,11 +84,11 @@ main (void)
|
||||
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "utilinux__my_system.log");
|
||||
srunner_run_all (sr, CK_NOFORK);
|
||||
srunner_set_log (sr, "utilinux__my_system-fork_child_shell.log");
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -79,11 +79,11 @@ main (void)
|
||||
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "utilinux__my_system.log");
|
||||
srunner_run_all (sr, CK_NOFORK);
|
||||
srunner_set_log (sr, "utilinux__my_system-fork_fail.log");
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -1,3 +1,4 @@
|
||||
PACKAGE_STRING = "/lib/vfs"
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-DTEST_SHARE_DIR=\"$(abs_srcdir)\" \
|
||||
|
@ -207,10 +207,10 @@ main (void)
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "canonicalize_pathname.log");
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -210,10 +210,10 @@ main (void)
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "current_dir.log");
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -253,10 +253,10 @@ main (void)
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "path_cmp.log");
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -141,10 +141,10 @@ main (void)
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "path_len.log");
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -469,10 +469,10 @@ main (void)
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "path_manipulations.log");
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -82,7 +82,7 @@ test_init_vfs (const char *encoding)
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
static void
|
||||
test_deinit_vfs ()
|
||||
test_deinit_vfs (void)
|
||||
{
|
||||
free_codepages_list ();
|
||||
str_uninit_strings ();
|
||||
@ -291,12 +291,11 @@ main (void)
|
||||
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_print (sr, CK_VERBOSE);
|
||||
srunner_set_log (sr, "path_recode.log");
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -210,10 +210,10 @@ main (void)
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "path_serialize.log");
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -217,10 +217,10 @@ main (void)
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "relative_cd.log");
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -143,10 +143,10 @@ main (void)
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "tempdir.log");
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -158,10 +158,10 @@ main (void)
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "vfs_get_encoding.log");
|
||||
srunner_run_all (sr, CK_NOFORK);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -381,10 +381,10 @@ main (void)
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "vfs_parse_ls_lga.log");
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -126,10 +126,10 @@ main (void)
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "vfs_path_from_str_flags.log");
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -344,10 +344,10 @@ main (void)
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "vfs_path_string_convert.log");
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -179,10 +179,10 @@ main (void)
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "vfs_prefix_to_class.log");
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -177,10 +177,10 @@ main (void)
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "vfs_s_get_path.log");
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -156,10 +156,10 @@ main (void)
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "vfs_setup_cwd.log");
|
||||
srunner_run_all (sr, CK_NOFORK);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -217,10 +217,10 @@ main (void)
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "vfs_split.log");
|
||||
srunner_run_all (sr, CK_NOFORK);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -1,3 +1,4 @@
|
||||
PACKAGE_STRING = "/lib/widget"
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
$(GLIB_CFLAGS) \
|
||||
|
@ -237,10 +237,10 @@ main (void)
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "complete_engine.log");
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
lib/vfs - x_basename() function testing
|
||||
lib - x_basename() function testing
|
||||
|
||||
Copyright (C) 2011-2015
|
||||
Free Software Foundation, Inc.
|
||||
@ -127,10 +127,10 @@ main (void)
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "x_basename.log");
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define MC__TEST
|
||||
|
||||
#include <config.h>
|
||||
#include <stdlib.h>
|
||||
#include <check.h>
|
||||
|
||||
#include "lib/global.h"
|
||||
@ -25,33 +26,47 @@
|
||||
}
|
||||
|
||||
#define mctest_assert_ptr_eq(actual_pointer, etalon_pointer) { \
|
||||
fail_unless ( actual_pointer == etalon_pointer, \
|
||||
ck_assert_msg ( actual_pointer == etalon_pointer, \
|
||||
"%s(%p) pointer should be equal to %s(%p)\n", \
|
||||
#actual_pointer, actual_pointer, #etalon_pointer , etalon_pointer \
|
||||
);\
|
||||
}
|
||||
|
||||
#define mctest_assert_ptr_ne(actual_pointer, etalon_pointer) { \
|
||||
fail_unless ( actual_pointer != etalon_pointer, \
|
||||
ck_assert_msg ( actual_pointer != etalon_pointer, \
|
||||
"%s(%p) pointer should not be equal to %s(%p)\n", \
|
||||
#actual_pointer, actual_pointer, #etalon_pointer , etalon_pointer \
|
||||
);\
|
||||
}
|
||||
|
||||
#define mctest_assert_null(actual_pointer) { \
|
||||
fail_unless( \
|
||||
ck_assert_msg( \
|
||||
(void *) actual_pointer == NULL, \
|
||||
"%s(%p) variable should be NULL", #actual_pointer, actual_pointer \
|
||||
); \
|
||||
}
|
||||
|
||||
#define mctest_assert_not_null(actual_pointer) { \
|
||||
fail_if( \
|
||||
(void *) actual_pointer == NULL, \
|
||||
ck_assert_msg( \
|
||||
(void *) actual_pointer != NULL, \
|
||||
"%s(nil) variable should not be NULL", #actual_pointer \
|
||||
); \
|
||||
}
|
||||
|
||||
#define mctest_assert_true(actual_pointer) { \
|
||||
ck_assert_msg( \
|
||||
(int) actual_pointer != 0, \
|
||||
"%s variable should be TRUE", #actual_pointer \
|
||||
); \
|
||||
}
|
||||
|
||||
#define mctest_assert_false(actual_pointer) { \
|
||||
ck_assert_msg( \
|
||||
(int) actual_pointer == 0, \
|
||||
"%s variable should be TRUE", #actual_pointer \
|
||||
); \
|
||||
}
|
||||
|
||||
/**
|
||||
* Define header for a parameterized test.
|
||||
* Declare 'data' variable for access to the parameters in current iteration
|
||||
|
@ -1,3 +1,5 @@
|
||||
PACKAGE_STRING = "/src"
|
||||
|
||||
SUBDIRS = . filemanager
|
||||
|
||||
if USE_INTERNAL_EDIT
|
||||
|
@ -1,3 +1,5 @@
|
||||
PACKAGE_STRING = "/src/editor"
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-DTEST_SHARE_DIR=\"$(abs_srcdir)\" \
|
||||
$(GLIB_CFLAGS) \
|
||||
|
@ -384,10 +384,10 @@ main (void)
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "edit_complete_word_cmd.log");
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -48,13 +48,13 @@ vfs_file_is_local (const vfs_path_t * vpath)
|
||||
}
|
||||
|
||||
static void
|
||||
vfs_file_is_local__init ()
|
||||
vfs_file_is_local__init (void)
|
||||
{
|
||||
vfs_file_is_local__vpath__captured = g_ptr_array_new ();
|
||||
}
|
||||
|
||||
static void
|
||||
vfs_file_is_local__deinit ()
|
||||
vfs_file_is_local__deinit (void)
|
||||
{
|
||||
g_ptr_array_foreach (vfs_file_is_local__vpath__captured, (GFunc) vfs_path_free, NULL);
|
||||
g_ptr_array_free (vfs_file_is_local__vpath__captured, TRUE);
|
||||
@ -81,14 +81,14 @@ do_execute (const char *lc_shell, const char *command, int flags)
|
||||
}
|
||||
|
||||
static void
|
||||
do_execute__init ()
|
||||
do_execute__init (void)
|
||||
{
|
||||
do_execute__command__captured = NULL;
|
||||
do_execute__lc_shell__captured = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
do_execute__deinit ()
|
||||
do_execute__deinit (void)
|
||||
{
|
||||
g_free (do_execute__lc_shell__captured);
|
||||
g_free (do_execute__command__captured);
|
||||
|
@ -200,10 +200,10 @@ main (void)
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "execute__execute_external_editor_or_viewer.log");
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -203,10 +203,10 @@ main (void)
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "execute__execute_get_external_cmd_opts_from_config.log");
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -239,10 +239,10 @@ main (void)
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "execute__execute_with_vfs_arg.log");
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -1,3 +1,5 @@
|
||||
PACKAGE_STRING = "/src/filemanager"
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
$(GLIB_CFLAGS) \
|
||||
-I$(top_srcdir) \
|
||||
|
@ -45,7 +45,6 @@ guess_message_value (void)
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
int rand (void);
|
||||
|
||||
/* @ThenReturnValue */
|
||||
static gboolean rand__return_value = 0;
|
||||
@ -180,10 +179,10 @@ main (void)
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "cmd__get_random_hint.log");
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -170,10 +170,10 @@ main (void)
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "do_cd_command.log");
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -180,11 +180,11 @@ main (void)
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "examine_cd.log");
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -127,11 +127,11 @@ main (void)
|
||||
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "do_panel_cd.log");
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_set_log (sr, "exec_get_export_variables_ext.log");
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -158,10 +158,10 @@ main (void)
|
||||
suite_add_tcase (s, tc_core);
|
||||
sr = srunner_create (s);
|
||||
srunner_set_log (sr, "filegui_is_wildcarded.log");
|
||||
srunner_run_all (sr, CK_NORMAL);
|
||||
srunner_run_all (sr, CK_ENV);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
return (number_failed == 0) ? 0 : 1;
|
||||
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
Loading…
Reference in New Issue
Block a user