From d3bb9de01fcd6a644ac40b34e31dcff1596ea839 Mon Sep 17 00:00:00 2001 From: Slava Zanko Date: Mon, 11 Jul 2011 11:22:46 +0300 Subject: [PATCH] Ticket 2570: Code cleanup Moved tests from lib/tests to tests/lib directory Signed-off-by: Slava Zanko --- Makefile.am | 4 ++++ configure.ac | 9 +++++---- lib/Makefile.am | 4 ---- tests/Makefile.am | 1 + {lib/tests => tests/lib}/Makefile.am | 0 {lib/tests => tests/lib}/library_independ.c | 0 {lib/tests => tests/lib}/mc_build_filename.c | 0 {lib/tests => tests/lib}/mcconfig/Makefile.am | 0 {lib/tests => tests/lib}/mcconfig/config_string.c | 0 {lib/tests => tests/lib}/search/Makefile.am | 0 .../lib}/search/regex_process_escape_sequence.c | 0 {lib/tests => tests/lib}/search/regex_replace_esc_seq.c | 0 {lib/tests => tests/lib}/serialize.c | 0 {lib/tests => tests/lib}/vfs/Makefile.am | 0 {lib/tests => tests/lib}/vfs/canonicalize_pathname.c | 0 {lib/tests => tests/lib}/vfs/current_dir.c | 0 {lib/tests => tests/lib}/vfs/mc.charsets | 0 {lib/tests => tests/lib}/vfs/path_serialize.c | 0 {lib/tests => tests/lib}/vfs/vfs_parse_ls_lga.c | 0 {lib/tests => tests/lib}/vfs/vfs_path_string_convert.c | 0 {lib/tests => tests/lib}/vfs/vfs_prefix_to_class.c | 0 {lib/tests => tests/lib}/vfs/vfs_s_get_path.c | 0 {lib/tests => tests/lib}/vfs/vfs_split.c | 0 {lib/tests => tests/lib}/x_basename.c | 0 24 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 tests/Makefile.am rename {lib/tests => tests/lib}/Makefile.am (100%) rename {lib/tests => tests/lib}/library_independ.c (100%) rename {lib/tests => tests/lib}/mc_build_filename.c (100%) rename {lib/tests => tests/lib}/mcconfig/Makefile.am (100%) rename {lib/tests => tests/lib}/mcconfig/config_string.c (100%) rename {lib/tests => tests/lib}/search/Makefile.am (100%) rename {lib/tests => tests/lib}/search/regex_process_escape_sequence.c (100%) rename {lib/tests => tests/lib}/search/regex_replace_esc_seq.c (100%) rename {lib/tests => tests/lib}/serialize.c (100%) rename {lib/tests => tests/lib}/vfs/Makefile.am (100%) rename {lib/tests => tests/lib}/vfs/canonicalize_pathname.c (100%) rename {lib/tests => tests/lib}/vfs/current_dir.c (100%) rename {lib/tests => tests/lib}/vfs/mc.charsets (100%) rename {lib/tests => tests/lib}/vfs/path_serialize.c (100%) rename {lib/tests => tests/lib}/vfs/vfs_parse_ls_lga.c (100%) rename {lib/tests => tests/lib}/vfs/vfs_path_string_convert.c (100%) rename {lib/tests => tests/lib}/vfs/vfs_prefix_to_class.c (100%) rename {lib/tests => tests/lib}/vfs/vfs_s_get_path.c (100%) rename {lib/tests => tests/lib}/vfs/vfs_split.c (100%) rename {lib/tests => tests/lib}/x_basename.c (100%) diff --git a/Makefile.am b/Makefile.am index ab4f9b7eb..61eb8bb7e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,6 +3,10 @@ AUTOMAKE_OPTIONS = 1.5 SUBDIRS = intl po lib src doc contrib misc +if HAVE_TESTS + SUBDIRS += tests +endif + EXTRA_DIST = dist_noinst_SCRIPTS = build-glib2.sh diff --git a/configure.ac b/configure.ac index 369fd764c..f009742a2 100644 --- a/configure.ac +++ b/configure.ac @@ -596,10 +596,11 @@ po/Makefile.in if test x$enable_tests != xno; then AC_CONFIG_FILES([ -lib/tests/Makefile -lib/tests/mcconfig/Makefile -lib/tests/search/Makefile -lib/tests/vfs/Makefile +tests/Makefile +tests/lib/Makefile +tests/lib/mcconfig/Makefile +tests/lib/search/Makefile +tests/lib/vfs/Makefile ]) fi diff --git a/lib/Makefile.am b/lib/Makefile.am index 70eab3088..61b4c9bde 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,9 +1,5 @@ SUBDIRS = event filehighlight mcconfig search skin tty vfs strutil widget . -if HAVE_TESTS - SUBDIRS += tests -endif - if ENABLE_MCLIB LIB_VERSION=`echo $(LIBMC_VERSION) | \ tr '.' ' '| \ diff --git a/tests/Makefile.am b/tests/Makefile.am new file mode 100644 index 000000000..0262e4ddc --- /dev/null +++ b/tests/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = lib diff --git a/lib/tests/Makefile.am b/tests/lib/Makefile.am similarity index 100% rename from lib/tests/Makefile.am rename to tests/lib/Makefile.am diff --git a/lib/tests/library_independ.c b/tests/lib/library_independ.c similarity index 100% rename from lib/tests/library_independ.c rename to tests/lib/library_independ.c diff --git a/lib/tests/mc_build_filename.c b/tests/lib/mc_build_filename.c similarity index 100% rename from lib/tests/mc_build_filename.c rename to tests/lib/mc_build_filename.c diff --git a/lib/tests/mcconfig/Makefile.am b/tests/lib/mcconfig/Makefile.am similarity index 100% rename from lib/tests/mcconfig/Makefile.am rename to tests/lib/mcconfig/Makefile.am diff --git a/lib/tests/mcconfig/config_string.c b/tests/lib/mcconfig/config_string.c similarity index 100% rename from lib/tests/mcconfig/config_string.c rename to tests/lib/mcconfig/config_string.c diff --git a/lib/tests/search/Makefile.am b/tests/lib/search/Makefile.am similarity index 100% rename from lib/tests/search/Makefile.am rename to tests/lib/search/Makefile.am diff --git a/lib/tests/search/regex_process_escape_sequence.c b/tests/lib/search/regex_process_escape_sequence.c similarity index 100% rename from lib/tests/search/regex_process_escape_sequence.c rename to tests/lib/search/regex_process_escape_sequence.c diff --git a/lib/tests/search/regex_replace_esc_seq.c b/tests/lib/search/regex_replace_esc_seq.c similarity index 100% rename from lib/tests/search/regex_replace_esc_seq.c rename to tests/lib/search/regex_replace_esc_seq.c diff --git a/lib/tests/serialize.c b/tests/lib/serialize.c similarity index 100% rename from lib/tests/serialize.c rename to tests/lib/serialize.c diff --git a/lib/tests/vfs/Makefile.am b/tests/lib/vfs/Makefile.am similarity index 100% rename from lib/tests/vfs/Makefile.am rename to tests/lib/vfs/Makefile.am diff --git a/lib/tests/vfs/canonicalize_pathname.c b/tests/lib/vfs/canonicalize_pathname.c similarity index 100% rename from lib/tests/vfs/canonicalize_pathname.c rename to tests/lib/vfs/canonicalize_pathname.c diff --git a/lib/tests/vfs/current_dir.c b/tests/lib/vfs/current_dir.c similarity index 100% rename from lib/tests/vfs/current_dir.c rename to tests/lib/vfs/current_dir.c diff --git a/lib/tests/vfs/mc.charsets b/tests/lib/vfs/mc.charsets similarity index 100% rename from lib/tests/vfs/mc.charsets rename to tests/lib/vfs/mc.charsets diff --git a/lib/tests/vfs/path_serialize.c b/tests/lib/vfs/path_serialize.c similarity index 100% rename from lib/tests/vfs/path_serialize.c rename to tests/lib/vfs/path_serialize.c diff --git a/lib/tests/vfs/vfs_parse_ls_lga.c b/tests/lib/vfs/vfs_parse_ls_lga.c similarity index 100% rename from lib/tests/vfs/vfs_parse_ls_lga.c rename to tests/lib/vfs/vfs_parse_ls_lga.c diff --git a/lib/tests/vfs/vfs_path_string_convert.c b/tests/lib/vfs/vfs_path_string_convert.c similarity index 100% rename from lib/tests/vfs/vfs_path_string_convert.c rename to tests/lib/vfs/vfs_path_string_convert.c diff --git a/lib/tests/vfs/vfs_prefix_to_class.c b/tests/lib/vfs/vfs_prefix_to_class.c similarity index 100% rename from lib/tests/vfs/vfs_prefix_to_class.c rename to tests/lib/vfs/vfs_prefix_to_class.c diff --git a/lib/tests/vfs/vfs_s_get_path.c b/tests/lib/vfs/vfs_s_get_path.c similarity index 100% rename from lib/tests/vfs/vfs_s_get_path.c rename to tests/lib/vfs/vfs_s_get_path.c diff --git a/lib/tests/vfs/vfs_split.c b/tests/lib/vfs/vfs_split.c similarity index 100% rename from lib/tests/vfs/vfs_split.c rename to tests/lib/vfs/vfs_split.c diff --git a/lib/tests/x_basename.c b/tests/lib/x_basename.c similarity index 100% rename from lib/tests/x_basename.c rename to tests/lib/x_basename.c