diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 20:22:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 20:22:03 +0000 |
commit | ffccd5b2b05243e7976db80f90f453dccfae9886 (patch) | |
tree | 39a43152d27f7390d8f7a6fb276fa6887f87c6e8 /tests | |
parent | Initial commit. (diff) | |
download | mc-ffccd5b2b05243e7976db80f90f453dccfae9886.tar.xz mc-ffccd5b2b05243e7976db80f90f453dccfae9886.zip |
Adding upstream version 3:4.8.30.upstream/3%4.8.30
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests')
166 files changed, 32174 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am new file mode 100644 index 0000000..de3ff6c --- /dev/null +++ b/tests/Makefile.am @@ -0,0 +1,3 @@ +SUBDIRS = lib src + +EXTRA_DIST = mctest.h README diff --git a/tests/Makefile.in b/tests/Makefile.in new file mode 100644 index 0000000..5556f5e --- /dev/null +++ b/tests/Makefile.in @@ -0,0 +1,759 @@ +# Makefile.in generated by automake 1.16.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2021 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = tests +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/m4.include/gnulib/mode_t.m4 \ + $(top_srcdir)/m4.include/gnulib/stat-size.m4 \ + $(top_srcdir)/m4.include/gnulib/fstypename.m4 \ + $(top_srcdir)/m4.include/gnulib/fsusage.m4 \ + $(top_srcdir)/m4.include/gnulib/mountlist.m4 \ + $(top_srcdir)/m4.include/gnulib/windows-stat-inodes.m4 \ + $(top_srcdir)/m4.include/gnulib/sys_types_h.m4 \ + $(top_srcdir)/m4.include/ax_path_lib_pcre.m4 \ + $(top_srcdir)/m4.include/ax_check_pcre2.m4 \ + $(top_srcdir)/m4.include/dx_doxygen.m4 \ + $(top_srcdir)/m4.include/ax_require_defined.m4 \ + $(top_srcdir)/m4.include/ax_check_compile_flag.m4 \ + $(top_srcdir)/m4.include/ax_append_flag.m4 \ + $(top_srcdir)/m4.include/ax_append_compile_flags.m4 \ + $(top_srcdir)/m4.include/mc-cflags.m4 \ + $(top_srcdir)/m4.include/ax_gcc_func_attribute.m4 \ + $(top_srcdir)/m4.include/mc-check-search-type.m4 \ + $(top_srcdir)/m4.include/mc-get-fs-info.m4 \ + $(top_srcdir)/m4.include/mc-with-x.m4 \ + $(top_srcdir)/m4.include/mc-use-termcap.m4 \ + $(top_srcdir)/m4.include/mc-with-screen.m4 \ + $(top_srcdir)/m4.include/mc-with-screen-ncurses.m4 \ + $(top_srcdir)/m4.include/mc-with-screen-slang.m4 \ + $(top_srcdir)/m4.include/mc-with-internal-edit.m4 \ + $(top_srcdir)/m4.include/mc-subshell.m4 \ + $(top_srcdir)/m4.include/mc-background.m4 \ + $(top_srcdir)/m4.include/mc-ext2fs-attr.m4 \ + $(top_srcdir)/m4.include/mc-glib.m4 \ + $(top_srcdir)/m4.include/mc-vfs.m4 \ + $(top_srcdir)/m4.include/vfs/rpc.m4 \ + $(top_srcdir)/m4.include/vfs/socket.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-extfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-sfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-ftp.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-sftp.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-fish.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-undelfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-tarfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-cpiofs.m4 \ + $(top_srcdir)/m4.include/mc-version.m4 \ + $(top_srcdir)/m4.include/mc-tests.m4 \ + $(top_srcdir)/m4.include/mc-i18n.m4 \ + $(top_srcdir)/m4.include/mc-assert.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir distdir-am +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in README +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +COM_ERR_CFLAGS = @COM_ERR_CFLAGS@ +COM_ERR_LIBS = @COM_ERR_LIBS@ +CP1251 = @CP1251@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DOC_LINGUAS = @DOC_LINGUAS@ +DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +DX_CONFIG = @DX_CONFIG@ +DX_DOCDIR = @DX_DOCDIR@ +DX_DOT = @DX_DOT@ +DX_DOXYGEN = @DX_DOXYGEN@ +DX_DVIPS = @DX_DVIPS@ +DX_EGREP = @DX_EGREP@ +DX_ENV = @DX_ENV@ +DX_FLAG_chi = @DX_FLAG_chi@ +DX_FLAG_chm = @DX_FLAG_chm@ +DX_FLAG_doc = @DX_FLAG_doc@ +DX_FLAG_dot = @DX_FLAG_dot@ +DX_FLAG_html = @DX_FLAG_html@ +DX_FLAG_man = @DX_FLAG_man@ +DX_FLAG_pdf = @DX_FLAG_pdf@ +DX_FLAG_ps = @DX_FLAG_ps@ +DX_FLAG_rtf = @DX_FLAG_rtf@ +DX_FLAG_xml = @DX_FLAG_xml@ +DX_HHC = @DX_HHC@ +DX_LATEX = @DX_LATEX@ +DX_MAKEINDEX = @DX_MAKEINDEX@ +DX_PDFLATEX = @DX_PDFLATEX@ +DX_PERL = @DX_PERL@ +DX_PROJECT = @DX_PROJECT@ +E2P_CFLAGS = @E2P_CFLAGS@ +E2P_LIBS = @E2P_LIBS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ETAGS = @ETAGS@ +EXEEXT = @EXEEXT@ +EXT2FS_CFLAGS = @EXT2FS_CFLAGS@ +EXT2FS_LIBS = @EXT2FS_LIBS@ +EXTHELPERSDIR = @EXTHELPERSDIR@ +FGREP = @FGREP@ +FILECMD = @FILECMD@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ +GMODULE_CFLAGS = @GMODULE_CFLAGS@ +GMODULE_LIBS = @GMODULE_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +HAVE_FILECMD = @HAVE_FILECMD@ +HAVE_ZIPINFO = @HAVE_ZIPINFO@ +HAVE_nroff = @HAVE_nroff@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBMC_RELEASE = @LIBMC_RELEASE@ +LIBMC_VERSION = @LIBMC_VERSION@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSSH_CFLAGS = @LIBSSH_CFLAGS@ +LIBSSH_LIBS = @LIBSSH_LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANDOC = @MANDOC@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_DATE = @MAN_DATE@ +MAN_FLAGS = @MAN_FLAGS@ +MAN_VERSION = @MAN_VERSION@ +MCLIBS = @MCLIBS@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCRE_CFLAGS = @PCRE_CFLAGS@ +PCRE_LIBS = @PCRE_LIBS@ +PERL = @PERL@ +PERL_FOR_BUILD = @PERL_FOR_BUILD@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POSUB = @POSUB@ +PYTHON = @PYTHON@ +RANLIB = @RANLIB@ +RUBY = @RUBY@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SLANG_CFLAGS = @SLANG_CFLAGS@ +SLANG_LIBS = @SLANG_LIBS@ +STRIP = @STRIP@ +TESTS_LDFLAGS = @TESTS_LDFLAGS@ +UNZIP = @UNZIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +X11_WWW = @X11_WWW@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +ZIP = @ZIP@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = lib src +EXTRA_DIST = mctest.h README +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu tests/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/tests/README b/tests/README new file mode 100644 index 0000000..f606d1d --- /dev/null +++ b/tests/README @@ -0,0 +1,25 @@ +Overview +-------- + +This tree contains unit tests. + +To compile and run the tests, do 'make check' (either in the top folder, +or just in the folder containing the tests you're interested in). + +IMPORTANT: To compile the tests, you need to have the "Check" unit +testing framework[1] installed.[2] If you have it installed, you will see +"Unit tests: yes" in configure's summary message; if you don't see this +message, you won't be able to compile the tests.[3] + +Tips and tricks +--------------- + +* To be able to step with the debugger into test code, see [4]. E.g., do: + + $ export CK_FORK=no + +[1]: http://libcheck.github.io/check/ +[2]: Your package manager likely has it. +[3]: Actually, some tests (like src/vfs/extfs/helpers-list) don't use + this framework and will compile just fine. But that's the exception. +[4]: http://stackoverflow.com/questions/1649814/debugging-unit-test-in-c-using-check diff --git a/tests/lib/Makefile.am b/tests/lib/Makefile.am new file mode 100644 index 0000000..56585f9 --- /dev/null +++ b/tests/lib/Makefile.am @@ -0,0 +1,65 @@ +PACKAGE_STRING = "/lib" + +SUBDIRS = . mcconfig search strutil vfs widget + +AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) @CHECK_CFLAGS@ + +AM_LDFLAGS = @TESTS_LDFLAGS@ + +LIBS = @CHECK_LIBS@ \ + $(top_builddir)/lib/libmc.la + +if ENABLE_MCLIB +LIBS += $(GLIB_LIBS) \ + @E2P_LIBS@ +endif + +EXTRA_DIST = utilunix__my_system-common.c + +TESTS = \ + library_independ \ + mc_build_filename \ + name_quote \ + serialize \ + utilunix__mc_pstream_get_string \ + utilunix__my_system_fork_fail \ + utilunix__my_system_fork_child_shell \ + utilunix__my_system_fork_child \ + x_basename + +if CHARSET +TESTS += mc_realpath +endif + +check_PROGRAMS = $(TESTS) + +library_independ_SOURCES = \ + library_independ.c + +mc_build_filename_SOURCES = \ + mc_build_filename.c + +mc_realpath_SOURCES = \ + mc_realpath.c + +name_quote_SOURCES = \ + name_quote.c + +serialize_SOURCES = \ + serialize.c + +utilunix__mc_pstream_get_string_SOURCES = \ + utilunix__mc_pstream_get_string.c + +utilunix__my_system_fork_fail_SOURCES = \ + utilunix__my_system-fork_fail.c + +utilunix__my_system_fork_child_shell_SOURCES = \ + utilunix__my_system-fork_child_shell.c + +utilunix__my_system_fork_child_SOURCES = \ + utilunix__my_system-fork_child.c + +x_basename_SOURCES = \ + x_basename.c + diff --git a/tests/lib/Makefile.in b/tests/lib/Makefile.in new file mode 100644 index 0000000..c67254f --- /dev/null +++ b/tests/lib/Makefile.in @@ -0,0 +1,1450 @@ +# Makefile.in generated by automake 1.16.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2021 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@ENABLE_MCLIB_TRUE@am__append_1 = $(GLIB_LIBS) \ +@ENABLE_MCLIB_TRUE@ @E2P_LIBS@ + +TESTS = library_independ$(EXEEXT) mc_build_filename$(EXEEXT) \ + name_quote$(EXEEXT) serialize$(EXEEXT) \ + utilunix__mc_pstream_get_string$(EXEEXT) \ + utilunix__my_system_fork_fail$(EXEEXT) \ + utilunix__my_system_fork_child_shell$(EXEEXT) \ + utilunix__my_system_fork_child$(EXEEXT) x_basename$(EXEEXT) \ + $(am__EXEEXT_1) +@CHARSET_TRUE@am__append_2 = mc_realpath +check_PROGRAMS = $(am__EXEEXT_2) +subdir = tests/lib +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/m4.include/gnulib/mode_t.m4 \ + $(top_srcdir)/m4.include/gnulib/stat-size.m4 \ + $(top_srcdir)/m4.include/gnulib/fstypename.m4 \ + $(top_srcdir)/m4.include/gnulib/fsusage.m4 \ + $(top_srcdir)/m4.include/gnulib/mountlist.m4 \ + $(top_srcdir)/m4.include/gnulib/windows-stat-inodes.m4 \ + $(top_srcdir)/m4.include/gnulib/sys_types_h.m4 \ + $(top_srcdir)/m4.include/ax_path_lib_pcre.m4 \ + $(top_srcdir)/m4.include/ax_check_pcre2.m4 \ + $(top_srcdir)/m4.include/dx_doxygen.m4 \ + $(top_srcdir)/m4.include/ax_require_defined.m4 \ + $(top_srcdir)/m4.include/ax_check_compile_flag.m4 \ + $(top_srcdir)/m4.include/ax_append_flag.m4 \ + $(top_srcdir)/m4.include/ax_append_compile_flags.m4 \ + $(top_srcdir)/m4.include/mc-cflags.m4 \ + $(top_srcdir)/m4.include/ax_gcc_func_attribute.m4 \ + $(top_srcdir)/m4.include/mc-check-search-type.m4 \ + $(top_srcdir)/m4.include/mc-get-fs-info.m4 \ + $(top_srcdir)/m4.include/mc-with-x.m4 \ + $(top_srcdir)/m4.include/mc-use-termcap.m4 \ + $(top_srcdir)/m4.include/mc-with-screen.m4 \ + $(top_srcdir)/m4.include/mc-with-screen-ncurses.m4 \ + $(top_srcdir)/m4.include/mc-with-screen-slang.m4 \ + $(top_srcdir)/m4.include/mc-with-internal-edit.m4 \ + $(top_srcdir)/m4.include/mc-subshell.m4 \ + $(top_srcdir)/m4.include/mc-background.m4 \ + $(top_srcdir)/m4.include/mc-ext2fs-attr.m4 \ + $(top_srcdir)/m4.include/mc-glib.m4 \ + $(top_srcdir)/m4.include/mc-vfs.m4 \ + $(top_srcdir)/m4.include/vfs/rpc.m4 \ + $(top_srcdir)/m4.include/vfs/socket.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-extfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-sfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-ftp.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-sftp.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-fish.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-undelfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-tarfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-cpiofs.m4 \ + $(top_srcdir)/m4.include/mc-version.m4 \ + $(top_srcdir)/m4.include/mc-tests.m4 \ + $(top_srcdir)/m4.include/mc-i18n.m4 \ + $(top_srcdir)/m4.include/mc-assert.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +@CHARSET_TRUE@am__EXEEXT_1 = mc_realpath$(EXEEXT) +am__EXEEXT_2 = library_independ$(EXEEXT) mc_build_filename$(EXEEXT) \ + name_quote$(EXEEXT) serialize$(EXEEXT) \ + utilunix__mc_pstream_get_string$(EXEEXT) \ + utilunix__my_system_fork_fail$(EXEEXT) \ + utilunix__my_system_fork_child_shell$(EXEEXT) \ + utilunix__my_system_fork_child$(EXEEXT) x_basename$(EXEEXT) \ + $(am__EXEEXT_1) +am_library_independ_OBJECTS = library_independ.$(OBJEXT) +library_independ_OBJECTS = $(am_library_independ_OBJECTS) +library_independ_LDADD = $(LDADD) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +am_mc_build_filename_OBJECTS = mc_build_filename.$(OBJEXT) +mc_build_filename_OBJECTS = $(am_mc_build_filename_OBJECTS) +mc_build_filename_LDADD = $(LDADD) +am_mc_realpath_OBJECTS = mc_realpath.$(OBJEXT) +mc_realpath_OBJECTS = $(am_mc_realpath_OBJECTS) +mc_realpath_LDADD = $(LDADD) +am_name_quote_OBJECTS = name_quote.$(OBJEXT) +name_quote_OBJECTS = $(am_name_quote_OBJECTS) +name_quote_LDADD = $(LDADD) +am_serialize_OBJECTS = serialize.$(OBJEXT) +serialize_OBJECTS = $(am_serialize_OBJECTS) +serialize_LDADD = $(LDADD) +am_utilunix__mc_pstream_get_string_OBJECTS = \ + utilunix__mc_pstream_get_string.$(OBJEXT) +utilunix__mc_pstream_get_string_OBJECTS = \ + $(am_utilunix__mc_pstream_get_string_OBJECTS) +utilunix__mc_pstream_get_string_LDADD = $(LDADD) +am_utilunix__my_system_fork_child_OBJECTS = \ + utilunix__my_system-fork_child.$(OBJEXT) +utilunix__my_system_fork_child_OBJECTS = \ + $(am_utilunix__my_system_fork_child_OBJECTS) +utilunix__my_system_fork_child_LDADD = $(LDADD) +am_utilunix__my_system_fork_child_shell_OBJECTS = \ + utilunix__my_system-fork_child_shell.$(OBJEXT) +utilunix__my_system_fork_child_shell_OBJECTS = \ + $(am_utilunix__my_system_fork_child_shell_OBJECTS) +utilunix__my_system_fork_child_shell_LDADD = $(LDADD) +am_utilunix__my_system_fork_fail_OBJECTS = \ + utilunix__my_system-fork_fail.$(OBJEXT) +utilunix__my_system_fork_fail_OBJECTS = \ + $(am_utilunix__my_system_fork_fail_OBJECTS) +utilunix__my_system_fork_fail_LDADD = $(LDADD) +am_x_basename_OBJECTS = x_basename.$(OBJEXT) +x_basename_OBJECTS = $(am_x_basename_OBJECTS) +x_basename_LDADD = $(LDADD) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/library_independ.Po \ + ./$(DEPDIR)/mc_build_filename.Po ./$(DEPDIR)/mc_realpath.Po \ + ./$(DEPDIR)/name_quote.Po ./$(DEPDIR)/serialize.Po \ + ./$(DEPDIR)/utilunix__mc_pstream_get_string.Po \ + ./$(DEPDIR)/utilunix__my_system-fork_child.Po \ + ./$(DEPDIR)/utilunix__my_system-fork_child_shell.Po \ + ./$(DEPDIR)/utilunix__my_system-fork_fail.Po \ + ./$(DEPDIR)/x_basename.Po +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(library_independ_SOURCES) $(mc_build_filename_SOURCES) \ + $(mc_realpath_SOURCES) $(name_quote_SOURCES) \ + $(serialize_SOURCES) \ + $(utilunix__mc_pstream_get_string_SOURCES) \ + $(utilunix__my_system_fork_child_SOURCES) \ + $(utilunix__my_system_fork_child_shell_SOURCES) \ + $(utilunix__my_system_fork_fail_SOURCES) $(x_basename_SOURCES) +DIST_SOURCES = $(library_independ_SOURCES) \ + $(mc_build_filename_SOURCES) $(mc_realpath_SOURCES) \ + $(name_quote_SOURCES) $(serialize_SOURCES) \ + $(utilunix__mc_pstream_get_string_SOURCES) \ + $(utilunix__my_system_fork_child_SOURCES) \ + $(utilunix__my_system_fork_child_shell_SOURCES) \ + $(utilunix__my_system_fork_fail_SOURCES) $(x_basename_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + check recheck distdir distdir-am +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red='[0;31m'; \ + grn='[0;32m'; \ + lgn='[1;32m'; \ + blu='[1;34m'; \ + mgn='[0;35m'; \ + brg='[1m'; \ + std='[m'; \ + fi; \ +} +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' +RECHECK_LOGS = $(TEST_LOGS) +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ + $(top_srcdir)/config/test-driver +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +COM_ERR_CFLAGS = @COM_ERR_CFLAGS@ +COM_ERR_LIBS = @COM_ERR_LIBS@ +CP1251 = @CP1251@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DOC_LINGUAS = @DOC_LINGUAS@ +DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +DX_CONFIG = @DX_CONFIG@ +DX_DOCDIR = @DX_DOCDIR@ +DX_DOT = @DX_DOT@ +DX_DOXYGEN = @DX_DOXYGEN@ +DX_DVIPS = @DX_DVIPS@ +DX_EGREP = @DX_EGREP@ +DX_ENV = @DX_ENV@ +DX_FLAG_chi = @DX_FLAG_chi@ +DX_FLAG_chm = @DX_FLAG_chm@ +DX_FLAG_doc = @DX_FLAG_doc@ +DX_FLAG_dot = @DX_FLAG_dot@ +DX_FLAG_html = @DX_FLAG_html@ +DX_FLAG_man = @DX_FLAG_man@ +DX_FLAG_pdf = @DX_FLAG_pdf@ +DX_FLAG_ps = @DX_FLAG_ps@ +DX_FLAG_rtf = @DX_FLAG_rtf@ +DX_FLAG_xml = @DX_FLAG_xml@ +DX_HHC = @DX_HHC@ +DX_LATEX = @DX_LATEX@ +DX_MAKEINDEX = @DX_MAKEINDEX@ +DX_PDFLATEX = @DX_PDFLATEX@ +DX_PERL = @DX_PERL@ +DX_PROJECT = @DX_PROJECT@ +E2P_CFLAGS = @E2P_CFLAGS@ +E2P_LIBS = @E2P_LIBS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ETAGS = @ETAGS@ +EXEEXT = @EXEEXT@ +EXT2FS_CFLAGS = @EXT2FS_CFLAGS@ +EXT2FS_LIBS = @EXT2FS_LIBS@ +EXTHELPERSDIR = @EXTHELPERSDIR@ +FGREP = @FGREP@ +FILECMD = @FILECMD@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ +GMODULE_CFLAGS = @GMODULE_CFLAGS@ +GMODULE_LIBS = @GMODULE_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +HAVE_FILECMD = @HAVE_FILECMD@ +HAVE_ZIPINFO = @HAVE_ZIPINFO@ +HAVE_nroff = @HAVE_nroff@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBMC_RELEASE = @LIBMC_RELEASE@ +LIBMC_VERSION = @LIBMC_VERSION@ +LIBOBJS = @LIBOBJS@ +LIBS = @CHECK_LIBS@ $(top_builddir)/lib/libmc.la $(am__append_1) +LIBSSH_CFLAGS = @LIBSSH_CFLAGS@ +LIBSSH_LIBS = @LIBSSH_LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANDOC = @MANDOC@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_DATE = @MAN_DATE@ +MAN_FLAGS = @MAN_FLAGS@ +MAN_VERSION = @MAN_VERSION@ +MCLIBS = @MCLIBS@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = "/lib" +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCRE_CFLAGS = @PCRE_CFLAGS@ +PCRE_LIBS = @PCRE_LIBS@ +PERL = @PERL@ +PERL_FOR_BUILD = @PERL_FOR_BUILD@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POSUB = @POSUB@ +PYTHON = @PYTHON@ +RANLIB = @RANLIB@ +RUBY = @RUBY@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SLANG_CFLAGS = @SLANG_CFLAGS@ +SLANG_LIBS = @SLANG_LIBS@ +STRIP = @STRIP@ +TESTS_LDFLAGS = @TESTS_LDFLAGS@ +UNZIP = @UNZIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +X11_WWW = @X11_WWW@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +ZIP = @ZIP@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = . mcconfig search strutil vfs widget +AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) @CHECK_CFLAGS@ +AM_LDFLAGS = @TESTS_LDFLAGS@ +EXTRA_DIST = utilunix__my_system-common.c +library_independ_SOURCES = \ + library_independ.c + +mc_build_filename_SOURCES = \ + mc_build_filename.c + +mc_realpath_SOURCES = \ + mc_realpath.c + +name_quote_SOURCES = \ + name_quote.c + +serialize_SOURCES = \ + serialize.c + +utilunix__mc_pstream_get_string_SOURCES = \ + utilunix__mc_pstream_get_string.c + +utilunix__my_system_fork_fail_SOURCES = \ + utilunix__my_system-fork_fail.c + +utilunix__my_system_fork_child_shell_SOURCES = \ + utilunix__my_system-fork_child_shell.c + +utilunix__my_system_fork_child_SOURCES = \ + utilunix__my_system-fork_child.c + +x_basename_SOURCES = \ + x_basename.c + +all: all-recursive + +.SUFFIXES: +.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/lib/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu tests/lib/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +library_independ$(EXEEXT): $(library_independ_OBJECTS) $(library_independ_DEPENDENCIES) $(EXTRA_library_independ_DEPENDENCIES) + @rm -f library_independ$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(library_independ_OBJECTS) $(library_independ_LDADD) $(LIBS) + +mc_build_filename$(EXEEXT): $(mc_build_filename_OBJECTS) $(mc_build_filename_DEPENDENCIES) $(EXTRA_mc_build_filename_DEPENDENCIES) + @rm -f mc_build_filename$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mc_build_filename_OBJECTS) $(mc_build_filename_LDADD) $(LIBS) + +mc_realpath$(EXEEXT): $(mc_realpath_OBJECTS) $(mc_realpath_DEPENDENCIES) $(EXTRA_mc_realpath_DEPENDENCIES) + @rm -f mc_realpath$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mc_realpath_OBJECTS) $(mc_realpath_LDADD) $(LIBS) + +name_quote$(EXEEXT): $(name_quote_OBJECTS) $(name_quote_DEPENDENCIES) $(EXTRA_name_quote_DEPENDENCIES) + @rm -f name_quote$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(name_quote_OBJECTS) $(name_quote_LDADD) $(LIBS) + +serialize$(EXEEXT): $(serialize_OBJECTS) $(serialize_DEPENDENCIES) $(EXTRA_serialize_DEPENDENCIES) + @rm -f serialize$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(serialize_OBJECTS) $(serialize_LDADD) $(LIBS) + +utilunix__mc_pstream_get_string$(EXEEXT): $(utilunix__mc_pstream_get_string_OBJECTS) $(utilunix__mc_pstream_get_string_DEPENDENCIES) $(EXTRA_utilunix__mc_pstream_get_string_DEPENDENCIES) + @rm -f utilunix__mc_pstream_get_string$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(utilunix__mc_pstream_get_string_OBJECTS) $(utilunix__mc_pstream_get_string_LDADD) $(LIBS) + +utilunix__my_system_fork_child$(EXEEXT): $(utilunix__my_system_fork_child_OBJECTS) $(utilunix__my_system_fork_child_DEPENDENCIES) $(EXTRA_utilunix__my_system_fork_child_DEPENDENCIES) + @rm -f utilunix__my_system_fork_child$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(utilunix__my_system_fork_child_OBJECTS) $(utilunix__my_system_fork_child_LDADD) $(LIBS) + +utilunix__my_system_fork_child_shell$(EXEEXT): $(utilunix__my_system_fork_child_shell_OBJECTS) $(utilunix__my_system_fork_child_shell_DEPENDENCIES) $(EXTRA_utilunix__my_system_fork_child_shell_DEPENDENCIES) + @rm -f utilunix__my_system_fork_child_shell$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(utilunix__my_system_fork_child_shell_OBJECTS) $(utilunix__my_system_fork_child_shell_LDADD) $(LIBS) + +utilunix__my_system_fork_fail$(EXEEXT): $(utilunix__my_system_fork_fail_OBJECTS) $(utilunix__my_system_fork_fail_DEPENDENCIES) $(EXTRA_utilunix__my_system_fork_fail_DEPENDENCIES) + @rm -f utilunix__my_system_fork_fail$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(utilunix__my_system_fork_fail_OBJECTS) $(utilunix__my_system_fork_fail_LDADD) $(LIBS) + +x_basename$(EXEEXT): $(x_basename_OBJECTS) $(x_basename_DEPENDENCIES) $(EXTRA_x_basename_DEPENDENCIES) + @rm -f x_basename$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(x_basename_OBJECTS) $(x_basename_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/library_independ.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mc_build_filename.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mc_realpath.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/name_quote.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/serialize.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utilunix__mc_pstream_get_string.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utilunix__my_system-fork_child.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utilunix__my_system-fork_child_shell.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utilunix__my_system-fork_fail.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x_basename.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + elif test -n "$$redo_logs"; then \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: $(check_PROGRAMS) + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +library_independ.log: library_independ$(EXEEXT) + @p='library_independ$(EXEEXT)'; \ + b='library_independ'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +mc_build_filename.log: mc_build_filename$(EXEEXT) + @p='mc_build_filename$(EXEEXT)'; \ + b='mc_build_filename'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +name_quote.log: name_quote$(EXEEXT) + @p='name_quote$(EXEEXT)'; \ + b='name_quote'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +serialize.log: serialize$(EXEEXT) + @p='serialize$(EXEEXT)'; \ + b='serialize'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +utilunix__mc_pstream_get_string.log: utilunix__mc_pstream_get_string$(EXEEXT) + @p='utilunix__mc_pstream_get_string$(EXEEXT)'; \ + b='utilunix__mc_pstream_get_string'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +utilunix__my_system_fork_fail.log: utilunix__my_system_fork_fail$(EXEEXT) + @p='utilunix__my_system_fork_fail$(EXEEXT)'; \ + b='utilunix__my_system_fork_fail'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +utilunix__my_system_fork_child_shell.log: utilunix__my_system_fork_child_shell$(EXEEXT) + @p='utilunix__my_system_fork_child_shell$(EXEEXT)'; \ + b='utilunix__my_system_fork_child_shell'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +utilunix__my_system_fork_child.log: utilunix__my_system_fork_child$(EXEEXT) + @p='utilunix__my_system_fork_child$(EXEEXT)'; \ + b='utilunix__my_system_fork_child'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +x_basename.log: x_basename$(EXEEXT) + @p='x_basename$(EXEEXT)'; \ + b='x_basename'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +mc_realpath.log: mc_realpath$(EXEEXT) + @p='mc_realpath$(EXEEXT)'; \ + b='mc_realpath'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-recursive + -rm -f ./$(DEPDIR)/library_independ.Po + -rm -f ./$(DEPDIR)/mc_build_filename.Po + -rm -f ./$(DEPDIR)/mc_realpath.Po + -rm -f ./$(DEPDIR)/name_quote.Po + -rm -f ./$(DEPDIR)/serialize.Po + -rm -f ./$(DEPDIR)/utilunix__mc_pstream_get_string.Po + -rm -f ./$(DEPDIR)/utilunix__my_system-fork_child.Po + -rm -f ./$(DEPDIR)/utilunix__my_system-fork_child_shell.Po + -rm -f ./$(DEPDIR)/utilunix__my_system-fork_fail.Po + -rm -f ./$(DEPDIR)/x_basename.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f ./$(DEPDIR)/library_independ.Po + -rm -f ./$(DEPDIR)/mc_build_filename.Po + -rm -f ./$(DEPDIR)/mc_realpath.Po + -rm -f ./$(DEPDIR)/name_quote.Po + -rm -f ./$(DEPDIR)/serialize.Po + -rm -f ./$(DEPDIR)/utilunix__mc_pstream_get_string.Po + -rm -f ./$(DEPDIR)/utilunix__my_system-fork_child.Po + -rm -f ./$(DEPDIR)/utilunix__my_system-fork_child_shell.Po + -rm -f ./$(DEPDIR)/utilunix__my_system-fork_fail.Po + -rm -f ./$(DEPDIR)/x_basename.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(am__recursive_targets) check-am install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--depfiles check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + recheck tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/tests/lib/library_independ.c b/tests/lib/library_independ.c new file mode 100644 index 0000000..aa3a2a1 --- /dev/null +++ b/tests/lib/library_independ.c @@ -0,0 +1,57 @@ +/* + libmc - check if library is independent to $(topsrc)/src directory + + Copyright (C) 2011-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2011, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "lib/library_independ" + +#include "tests/mctest.h" + +/* --------------------------------------------------------------------------------------------- */ + +/* *INDENT-OFF* */ +START_TEST (test_library_independ) +/* *INDENT-ON* */ +{ +} +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + /* Add new tests here: *************** */ + tcase_add_test (tc_core, test_library_independ); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/mc_build_filename.c b/tests/lib/mc_build_filename.c new file mode 100644 index 0000000..780676b --- /dev/null +++ b/tests/lib/mc_build_filename.c @@ -0,0 +1,150 @@ +/* + lib - mc_build_filename() function testing + + Copyright (C) 2011-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2011, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib/util" + +#include "tests/mctest.h" + +#include <stdio.h> + +#include "lib/strutil.h" +#include "lib/util.h" + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ +} + +/* --------------------------------------------------------------------------------------------- */ + +static char * +run_mc_build_filename (int iteration) +{ + switch (iteration) + { + case 0: + return mc_build_filename ("test", "path", (char *) NULL); + case 1: + return mc_build_filename ("/test", "path/", (char *) NULL); + case 2: + return mc_build_filename ("/test", "pa/th", (char *) NULL); + case 3: + return mc_build_filename ("/test", "#vfsprefix:", "path ", (char *) NULL); + case 4: + return mc_build_filename ("/test", "vfsprefix://", "path ", (char *) NULL); + case 5: + return mc_build_filename ("/test", "vfs/../prefix:///", "p\\///ath", (char *) NULL); + case 6: + return mc_build_filename ("/test", "path", "..", "/test", "path/", (char *) NULL); + case 7: + return mc_build_filename ("", "path", (char *) NULL); + case 8: + return mc_build_filename ("", "/path", (char *) NULL); + case 9: + return mc_build_filename ("path", "", (char *) NULL); + case 10: + return mc_build_filename ("/path", "", (char *) NULL); + case 11: + return mc_build_filename ("pa", "", "th", (char *) NULL); + case 12: + return mc_build_filename ("/pa", "", "/th", (char *) NULL); + default: + return NULL; + } +} + +/* @DataSource("test_mc_build_filename_ds") */ +/* *INDENT-OFF* */ +static const struct test_mc_build_filename_ds +{ + const char *expected_result; +} test_mc_build_filename_ds[] = +{ + {"test/path"}, + {"/test/path"}, + {"/test/pa/th"}, + {"/test/#vfsprefix:/path "}, + {"/test/vfsprefix://path "}, + {"/test/prefix://p\\/ath"}, + {"/test/test/path"}, + {"path"}, + {"path"}, + {"path"}, + {"/path"}, + {"pa/th"}, + {"/pa/th"}, +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_mc_build_filename_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_mc_build_filename, test_mc_build_filename_ds) +/* *INDENT-ON* */ +{ + /* given */ + char *actual_result; + + /* when */ + actual_result = run_mc_build_filename (_i); + + /* then */ + mctest_assert_str_eq (actual_result, data->expected_result); + + g_free (actual_result); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, test_mc_build_filename, test_mc_build_filename_ds); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/mc_realpath.c b/tests/lib/mc_realpath.c new file mode 100644 index 0000000..f00873c --- /dev/null +++ b/tests/lib/mc_realpath.c @@ -0,0 +1,131 @@ +/* + lib - realpath + + Copyright (C) 2017-2023 + Free Software Foundation, Inc. + + Written by: + Andrew Borodin <aborodin@vmail.ru>, 2017 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib/util" + +#include "tests/mctest.h" + +#include "lib/strutil.h" +#include "lib/vfs/vfs.h" /* VFS_ENCODING_PREFIX, vfs_init(), vfs_shut() */ +#include "src/vfs/local/local.c" + +#include "lib/util.h" /* mc_realpath() */ + +/* --------------------------------------------------------------------------------------------- */ + +static char resolved_path[PATH_MAX]; + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ + str_init_strings (NULL); + vfs_init (); + vfs_init_localfs (); + vfs_setup_work_dir (); +} + +/* @After */ +static void +teardown (void) +{ + vfs_shut (); + str_uninit_strings (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("data_source") */ +/* *INDENT-OFF* */ +static const struct data_source +{ + const char *input_string; + const char *expected_string; +} data_source[] = +{ + /* absolute paths */ + { "/", "/"}, + { "/" VFS_ENCODING_PREFIX "UTF-8/", "/" }, + { "/usr/bin", "/usr/bin" }, + { "/" VFS_ENCODING_PREFIX "UTF-8/usr/bin", "/usr/bin" }, + + /* relative paths are relative to / */ + { VFS_ENCODING_PREFIX "UTF-8/", "/" }, + { "usr/bin", "/usr/bin" }, + { VFS_ENCODING_PREFIX "UTF-8/usr/bin", "/usr/bin" } +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "data_source") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (realpath_test, data_source) +/* *INDENT-ON* */ +{ + int ret; + + /* realpath(3) produces a canonicalized absolute pathname using current directory. + * Change the current directory to produce correct pathname. */ + ret = chdir ("/"); + + /* when */ + if (mc_realpath (data->input_string, resolved_path) == NULL) + resolved_path[0] = '\0'; + + /* then */ + mctest_assert_str_eq (resolved_path, data->expected_string); + + (void) ret; +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + char *cwd; + + tc_core = tcase_create ("Core"); + + /* writable directory where check creates temporary files */ + cwd = g_get_current_dir (); + g_setenv ("TEMP", cwd, TRUE); + g_free (cwd); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, realpath_test, data_source); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/mcconfig/Makefile.am b/tests/lib/mcconfig/Makefile.am new file mode 100644 index 0000000..4643e40 --- /dev/null +++ b/tests/lib/mcconfig/Makefile.am @@ -0,0 +1,29 @@ +PACKAGE_STRING = "/lib/mcconfig" + +AM_CPPFLAGS = \ + -DWORKDIR=\"$(abs_builddir)\" \ + $(GLIB_CFLAGS) \ + -I$(top_srcdir) \ + @CHECK_CFLAGS@ + +AM_LDFLAGS = @TESTS_LDFLAGS@ + +LIBS = @CHECK_LIBS@ \ + $(top_builddir)/lib/libmc.la + +if ENABLE_MCLIB +LIBS += $(GLIB_LIBS) \ + @E2P_LIBS@ +endif + +TESTS = \ + config_string \ + user_configs_path + +check_PROGRAMS = $(TESTS) + +config_string_SOURCES = \ + config_string.c + +user_configs_path_SOURCES = \ + user_configs_path.c diff --git a/tests/lib/mcconfig/Makefile.in b/tests/lib/mcconfig/Makefile.in new file mode 100644 index 0000000..260196a --- /dev/null +++ b/tests/lib/mcconfig/Makefile.in @@ -0,0 +1,1138 @@ +# Makefile.in generated by automake 1.16.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2021 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@ENABLE_MCLIB_TRUE@am__append_1 = $(GLIB_LIBS) \ +@ENABLE_MCLIB_TRUE@ @E2P_LIBS@ + +TESTS = config_string$(EXEEXT) user_configs_path$(EXEEXT) +check_PROGRAMS = $(am__EXEEXT_1) +subdir = tests/lib/mcconfig +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/m4.include/gnulib/mode_t.m4 \ + $(top_srcdir)/m4.include/gnulib/stat-size.m4 \ + $(top_srcdir)/m4.include/gnulib/fstypename.m4 \ + $(top_srcdir)/m4.include/gnulib/fsusage.m4 \ + $(top_srcdir)/m4.include/gnulib/mountlist.m4 \ + $(top_srcdir)/m4.include/gnulib/windows-stat-inodes.m4 \ + $(top_srcdir)/m4.include/gnulib/sys_types_h.m4 \ + $(top_srcdir)/m4.include/ax_path_lib_pcre.m4 \ + $(top_srcdir)/m4.include/ax_check_pcre2.m4 \ + $(top_srcdir)/m4.include/dx_doxygen.m4 \ + $(top_srcdir)/m4.include/ax_require_defined.m4 \ + $(top_srcdir)/m4.include/ax_check_compile_flag.m4 \ + $(top_srcdir)/m4.include/ax_append_flag.m4 \ + $(top_srcdir)/m4.include/ax_append_compile_flags.m4 \ + $(top_srcdir)/m4.include/mc-cflags.m4 \ + $(top_srcdir)/m4.include/ax_gcc_func_attribute.m4 \ + $(top_srcdir)/m4.include/mc-check-search-type.m4 \ + $(top_srcdir)/m4.include/mc-get-fs-info.m4 \ + $(top_srcdir)/m4.include/mc-with-x.m4 \ + $(top_srcdir)/m4.include/mc-use-termcap.m4 \ + $(top_srcdir)/m4.include/mc-with-screen.m4 \ + $(top_srcdir)/m4.include/mc-with-screen-ncurses.m4 \ + $(top_srcdir)/m4.include/mc-with-screen-slang.m4 \ + $(top_srcdir)/m4.include/mc-with-internal-edit.m4 \ + $(top_srcdir)/m4.include/mc-subshell.m4 \ + $(top_srcdir)/m4.include/mc-background.m4 \ + $(top_srcdir)/m4.include/mc-ext2fs-attr.m4 \ + $(top_srcdir)/m4.include/mc-glib.m4 \ + $(top_srcdir)/m4.include/mc-vfs.m4 \ + $(top_srcdir)/m4.include/vfs/rpc.m4 \ + $(top_srcdir)/m4.include/vfs/socket.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-extfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-sfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-ftp.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-sftp.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-fish.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-undelfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-tarfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-cpiofs.m4 \ + $(top_srcdir)/m4.include/mc-version.m4 \ + $(top_srcdir)/m4.include/mc-tests.m4 \ + $(top_srcdir)/m4.include/mc-i18n.m4 \ + $(top_srcdir)/m4.include/mc-assert.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__EXEEXT_1 = config_string$(EXEEXT) user_configs_path$(EXEEXT) +am_config_string_OBJECTS = config_string.$(OBJEXT) +config_string_OBJECTS = $(am_config_string_OBJECTS) +config_string_LDADD = $(LDADD) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +am_user_configs_path_OBJECTS = user_configs_path.$(OBJEXT) +user_configs_path_OBJECTS = $(am_user_configs_path_OBJECTS) +user_configs_path_LDADD = $(LDADD) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/config_string.Po \ + ./$(DEPDIR)/user_configs_path.Po +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(config_string_SOURCES) $(user_configs_path_SOURCES) +DIST_SOURCES = $(config_string_SOURCES) $(user_configs_path_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red='[0;31m'; \ + grn='[0;32m'; \ + lgn='[1;32m'; \ + blu='[1;34m'; \ + mgn='[0;35m'; \ + brg='[1m'; \ + std='[m'; \ + fi; \ +} +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ + $(top_srcdir)/config/test-driver +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +COM_ERR_CFLAGS = @COM_ERR_CFLAGS@ +COM_ERR_LIBS = @COM_ERR_LIBS@ +CP1251 = @CP1251@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DOC_LINGUAS = @DOC_LINGUAS@ +DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +DX_CONFIG = @DX_CONFIG@ +DX_DOCDIR = @DX_DOCDIR@ +DX_DOT = @DX_DOT@ +DX_DOXYGEN = @DX_DOXYGEN@ +DX_DVIPS = @DX_DVIPS@ +DX_EGREP = @DX_EGREP@ +DX_ENV = @DX_ENV@ +DX_FLAG_chi = @DX_FLAG_chi@ +DX_FLAG_chm = @DX_FLAG_chm@ +DX_FLAG_doc = @DX_FLAG_doc@ +DX_FLAG_dot = @DX_FLAG_dot@ +DX_FLAG_html = @DX_FLAG_html@ +DX_FLAG_man = @DX_FLAG_man@ +DX_FLAG_pdf = @DX_FLAG_pdf@ +DX_FLAG_ps = @DX_FLAG_ps@ +DX_FLAG_rtf = @DX_FLAG_rtf@ +DX_FLAG_xml = @DX_FLAG_xml@ +DX_HHC = @DX_HHC@ +DX_LATEX = @DX_LATEX@ +DX_MAKEINDEX = @DX_MAKEINDEX@ +DX_PDFLATEX = @DX_PDFLATEX@ +DX_PERL = @DX_PERL@ +DX_PROJECT = @DX_PROJECT@ +E2P_CFLAGS = @E2P_CFLAGS@ +E2P_LIBS = @E2P_LIBS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ETAGS = @ETAGS@ +EXEEXT = @EXEEXT@ +EXT2FS_CFLAGS = @EXT2FS_CFLAGS@ +EXT2FS_LIBS = @EXT2FS_LIBS@ +EXTHELPERSDIR = @EXTHELPERSDIR@ +FGREP = @FGREP@ +FILECMD = @FILECMD@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ +GMODULE_CFLAGS = @GMODULE_CFLAGS@ +GMODULE_LIBS = @GMODULE_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +HAVE_FILECMD = @HAVE_FILECMD@ +HAVE_ZIPINFO = @HAVE_ZIPINFO@ +HAVE_nroff = @HAVE_nroff@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBMC_RELEASE = @LIBMC_RELEASE@ +LIBMC_VERSION = @LIBMC_VERSION@ +LIBOBJS = @LIBOBJS@ +LIBS = @CHECK_LIBS@ $(top_builddir)/lib/libmc.la $(am__append_1) +LIBSSH_CFLAGS = @LIBSSH_CFLAGS@ +LIBSSH_LIBS = @LIBSSH_LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANDOC = @MANDOC@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_DATE = @MAN_DATE@ +MAN_FLAGS = @MAN_FLAGS@ +MAN_VERSION = @MAN_VERSION@ +MCLIBS = @MCLIBS@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = "/lib/mcconfig" +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCRE_CFLAGS = @PCRE_CFLAGS@ +PCRE_LIBS = @PCRE_LIBS@ +PERL = @PERL@ +PERL_FOR_BUILD = @PERL_FOR_BUILD@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POSUB = @POSUB@ +PYTHON = @PYTHON@ +RANLIB = @RANLIB@ +RUBY = @RUBY@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SLANG_CFLAGS = @SLANG_CFLAGS@ +SLANG_LIBS = @SLANG_LIBS@ +STRIP = @STRIP@ +TESTS_LDFLAGS = @TESTS_LDFLAGS@ +UNZIP = @UNZIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +X11_WWW = @X11_WWW@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +ZIP = @ZIP@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AM_CPPFLAGS = \ + -DWORKDIR=\"$(abs_builddir)\" \ + $(GLIB_CFLAGS) \ + -I$(top_srcdir) \ + @CHECK_CFLAGS@ + +AM_LDFLAGS = @TESTS_LDFLAGS@ +config_string_SOURCES = \ + config_string.c + +user_configs_path_SOURCES = \ + user_configs_path.c + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/lib/mcconfig/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu tests/lib/mcconfig/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +config_string$(EXEEXT): $(config_string_OBJECTS) $(config_string_DEPENDENCIES) $(EXTRA_config_string_DEPENDENCIES) + @rm -f config_string$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(config_string_OBJECTS) $(config_string_LDADD) $(LIBS) + +user_configs_path$(EXEEXT): $(user_configs_path_OBJECTS) $(user_configs_path_DEPENDENCIES) $(EXTRA_user_configs_path_DEPENDENCIES) + @rm -f user_configs_path$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(user_configs_path_OBJECTS) $(user_configs_path_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config_string.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/user_configs_path.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + elif test -n "$$redo_logs"; then \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: $(check_PROGRAMS) + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +config_string.log: config_string$(EXEEXT) + @p='config_string$(EXEEXT)'; \ + b='config_string'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +user_configs_path.log: user_configs_path$(EXEEXT) + @p='user_configs_path$(EXEEXT)'; \ + b='user_configs_path'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/config_string.Po + -rm -f ./$(DEPDIR)/user_configs_path.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/config_string.Po + -rm -f ./$(DEPDIR)/user_configs_path.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \ + check-am clean clean-checkPROGRAMS clean-generic clean-libtool \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + recheck tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/tests/lib/mcconfig/config_string.c b/tests/lib/mcconfig/config_string.c new file mode 100644 index 0000000..4a3a68d --- /dev/null +++ b/tests/lib/mcconfig/config_string.c @@ -0,0 +1,255 @@ +/* + libmc - check mcconfig submodule. read and write config files + + Copyright (C) 2011-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2011, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "lib/mcconfig" + +#include "tests/mctest.h" + +#include "lib/mcconfig.h" +#include "lib/strutil.h" +#include "lib/strescape.h" +#include "lib/vfs/vfs.h" +#include "src/vfs/local/local.c" + +static mc_config_t *mc_config; +static char *ini_filename; + +/* --------------------------------------------------------------------------------------------- */ + +static void +config_object__init (void) +{ + ini_filename = g_build_filename (WORKDIR, "config_string.ini", (char *) NULL); + unlink (ini_filename); + + mc_config = mc_config_init (ini_filename, FALSE); +} + +/* --------------------------------------------------------------------------------------------- */ + +static void +config_object__reopen (void) +{ + GError *error = NULL; + + if (!mc_config_save_file (mc_config, &error)) + { + ck_abort_msg ("Unable to save config file: %s", error->message); + g_error_free (error); + } + + mc_config_deinit (mc_config); + mc_config = mc_config_init (ini_filename, FALSE); +} + +/* --------------------------------------------------------------------------------------------- */ + +static void +config_object__deinit (void) +{ + mc_config_deinit (mc_config); + g_free (ini_filename); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ + str_init_strings ("KOI8-R"); + vfs_init (); + vfs_init_localfs (); + + config_object__init (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ + config_object__deinit (); + + vfs_shut (); + str_uninit_strings (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_create_ini_file_ds") */ +/* *INDENT-OFF* */ +static const struct test_create_ini_file_ds +{ + const char *input_group; + const char *input_param; + const char *input_default_value; + const char *expected_value; + const char *expected_raw_value; +} test_create_ini_file_ds[] = +{ + { /* 0. */ + "group-not-exists", + "param-not_exists", + NULL, + NULL, + NULL + }, + { /* 1. */ + "test-group1", + "test-param1", + "not-exists", + " some value ", + " some value " + }, + { /* 2. */ + "test-group1", + "test-param2", + "not-exists", + " \tkoi8-r: ôÅÓÔÏ×ÏÅ ÚÎÁÞÅÎÉÅ ", + " \tkoi8-r: \320\242\320\265\321\201\321\202\320\276\320\262\320\276\320\265 \320\267\320\275\320\260\321\207\320\265\320\275\320\270\320\265 " + }, + { /* 3. */ + "test-group1", + "test-param3", + "not-exists", + " \tsome value2\n\nf\b\005fff ", + " \tsome value2\n\nf\b\005fff " + }, + { /* 4. */ + "test-group2", + "test-param1", + "not-exists", + " some value ", + " some value " + }, + { /* 5. */ + "test-group2", + "test-param2", + "not-exists", + "not-exists", + "not-exists" + }, + { /* 6. */ + "test-group2", + "test-param3", + "not-exists", + " \tsome value2\n\nf\b\005fff ", + " \tsome value2\n\nf\b\005fff " + }, + +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_create_ini_file_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_create_ini_file_paths, test_create_ini_file_ds) +/* *INDENT-ON* */ +{ + /* given */ + char *actual_value, *actual_raw_value; + + mc_config_set_string (mc_config, "test-group1", "test-param1", " some value "); + mc_config_set_string (mc_config, "test-group1", "test-param2", " \tkoi8-r: ôÅÓÔÏ×ÏÅ ÚÎÁÞÅÎÉÅ "); + mc_config_set_string (mc_config, "test-group1", "test-param3", " \tsome value2\n\nf\b\005fff "); + mc_config_set_string_raw (mc_config, "test-group2", "test-param1", " some value "); + mc_config_set_string_raw (mc_config, "test-group2", "test-param2", + " koi8-r: ôÅÓÔÏ×ÏÅ ÚÎÁÞÅÎÉÅ"); + mc_config_set_string_raw (mc_config, "test-group2", "test-param3", + " \tsome value2\n\nf\b\005fff "); + + config_object__reopen (); + + /* when */ + actual_value = + mc_config_get_string (mc_config, data->input_group, data->input_param, + data->input_default_value); + actual_raw_value = + mc_config_get_string_raw (mc_config, data->input_group, data->input_param, + data->input_default_value); + + /* then */ + mctest_assert_str_eq (actual_value, data->expected_value); + mctest_assert_str_eq (actual_raw_value, data->expected_raw_value); + + g_free (actual_value); + g_free (actual_raw_value); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +/* @Test(group='Integration') */ +/* *INDENT-OFF* */ +START_TEST (emulate__learn_save) +/* *INDENT-ON* */ +{ + /* given */ + char *actual_value; + + { + char *esc_str; + + esc_str = strutils_escape ("T;E\\X;T-FOR-\\T;E;S\\TI;N'G", -1, ";", TRUE); + mc_config_set_string_raw (mc_config, "test-group1", "test-param1", esc_str); + g_free (esc_str); + } + + config_object__reopen (); + + /* when */ + actual_value = mc_config_get_string_raw (mc_config, "test-group1", "test-param1", "not-exists"); + + /* then */ + mctest_assert_str_eq (actual_value, "T\\;E\\X\\;T-FOR-\\T\\;E\\;S\\TI\\;N'G"); + g_free (actual_value); +} +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, test_create_ini_file_paths, test_create_ini_file_ds); + tcase_add_test (tc_core, emulate__learn_save); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/mcconfig/user_configs_path.c b/tests/lib/mcconfig/user_configs_path.c new file mode 100644 index 0000000..6140c12 --- /dev/null +++ b/tests/lib/mcconfig/user_configs_path.c @@ -0,0 +1,223 @@ +/* + libmc - check mcconfig submodule. Get full paths to user's config files. + + Copyright (C) 2011-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2011, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "lib/mcconfig" + +#include "tests/mctest.h" + +#include "lib/strutil.h" +#include "lib/strescape.h" +#include "lib/vfs/vfs.h" +#include "lib/fileloc.h" + +#include "lib/mcconfig.h" +#include "src/vfs/local/local.c" + +#define HOME_DIR "/home/testuser" + +#define CONF_MAIN HOME_DIR PATH_SEP_STR ".config" +#define CONF_DATA HOME_DIR PATH_SEP_STR ".local" PATH_SEP_STR "share" +#define CONF_CACHE HOME_DIR PATH_SEP_STR ".cache" + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ + g_setenv ("HOME", HOME_DIR, TRUE); + g_setenv ("XDG_CONFIG_HOME", CONF_MAIN, TRUE); + g_setenv ("XDG_DATA_HOME", CONF_DATA, TRUE); + g_setenv ("XDG_CACHE_HOME", CONF_CACHE, TRUE); + str_init_strings ("UTF-8"); + vfs_init (); + vfs_init_localfs (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ + vfs_shut (); + str_uninit_strings (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_user_config_paths_ds") */ +/* *INDENT-OFF* */ +static const struct test_user_config_paths_ds +{ + const char *input_base_dir; + const char *input_file_name; +} test_user_config_paths_ds[] = +{ + { /* 0. */ + CONF_MAIN, + MC_CONFIG_FILE + }, + { /* 1. */ + CONF_MAIN, + MC_FHL_INI_FILE + }, + { /* 2. */ + CONF_MAIN, + MC_HOTLIST_FILE + }, + { /* 3. */ + CONF_MAIN, + GLOBAL_KEYMAP_FILE + }, + { /* 4. */ + CONF_MAIN, + MC_USERMENU_FILE + }, + { /* 5. */ + CONF_DATA, + EDIT_SYNTAX_FILE + }, + { /* 6. */ + CONF_MAIN, + EDIT_HOME_MENU + }, + { /* 7. */ + CONF_MAIN, + MC_PANELS_FILE + }, + { /* 8. */ + CONF_MAIN, + MC_EXT_FILE + }, + { /* 9. */ + CONF_DATA, + MC_SKINS_DIR + }, + { /* 10. */ + CONF_DATA, + FISH_PREFIX + }, + { /* 11. */ + CONF_DATA, + MC_ASHRC_FILE + }, + { /* 12. */ + CONF_DATA, + MC_BASHRC_FILE + }, + { /* 13. */ + CONF_DATA, + MC_INPUTRC_FILE + }, + { /* 14. */ + CONF_DATA, + MC_ZSHRC_FILE + }, + { /* 15. */ + CONF_DATA, + MC_EXTFS_DIR + }, + { /* 16. */ + CONF_DATA, + MC_HISTORY_FILE + }, + { /* 17. */ + CONF_DATA, + MC_FILEPOS_FILE + }, + { /* 18. */ + CONF_DATA, + EDIT_HOME_CLIP_FILE + }, + { /* 19. */ + CONF_DATA, + MC_MACRO_FILE + }, + { /* 20. */ + CONF_CACHE, + "mc.log" + }, + { /* 21. */ + CONF_CACHE, + MC_TREESTORE_FILE + }, + { /* 22. */ + CONF_CACHE, + EDIT_HOME_TEMP_FILE + }, + { /* 23. */ + CONF_CACHE, + EDIT_HOME_BLOCK_FILE + }, +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_user_config_paths_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_user_config_paths, test_user_config_paths_ds) +/* *INDENT-ON* */ +{ + /* given */ + char *actual_result; + + /* when */ + actual_result = mc_config_get_full_path (data->input_file_name); + + /* then */ + { + char *expected_file_path; + + expected_file_path = + g_build_filename (data->input_base_dir, MC_USERCONF_DIR, data->input_file_name, + (char *) NULL); + mctest_assert_str_eq (actual_result, expected_file_path); + g_free (expected_file_path); + } + g_free (actual_result); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, test_user_config_paths, test_user_config_paths_ds); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/name_quote.c b/tests/lib/name_quote.c new file mode 100644 index 0000000..e86a608 --- /dev/null +++ b/tests/lib/name_quote.c @@ -0,0 +1,145 @@ +/* + lib - Quote file names + + Copyright (C) 2011-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2011, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib/util" + +#include "tests/mctest.h" + +#include "lib/util.h" + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ +} + +/* @After */ +static void +teardown (void) +{ +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("data_source1") */ +/* *INDENT-OFF* */ +static const struct data_source1 +{ + gboolean input_quote_percent; + const char *input_string; + + const char *expected_string; +} data_source1[] = +{ + { TRUE, "%%", "%%%%"}, + { FALSE, "%%", "%%"}, +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "data_source1") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (quote_percent_test, data_source1) +/* *INDENT-ON* */ +{ + /* given */ + char *actual_string; + + /* when */ + actual_string = name_quote (data->input_string, data->input_quote_percent); + + /* then */ + mctest_assert_str_eq (actual_string, data->expected_string); + + g_free (actual_string); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("data_source2") */ +/* *INDENT-OFF* */ +static const struct data_source2 +{ + const char *input_string; + + const char *expected_string; +} data_source2[] = +{ + {"-", "./-"}, + {"blabla-", "blabla-"}, + {"\r\n\t", "\\\r\\\n\\\t"}, + {"'\\\";?|[]{}<>`!$&*()", "\\'\\\\\\\"\\;\\?\\|\\[\\]\\{\\}\\<\\>\\`\\!\\$\\&\\*\\(\\)"}, + {"a b c ", "a\\ b\\ c\\ "}, + {"#", "\\#"}, + {"blabla#", "blabla#"}, + {"~", "\\~"}, + {"blabla~", "blabla~"}, +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "data_source2") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (name_quote_test, data_source2) +/* *INDENT-ON* */ +{ + /* given */ + char *actual_string; + + /* when */ + actual_string = name_quote (data->input_string, FALSE); + + /* then */ + mctest_assert_str_eq (actual_string, data->expected_string); + + g_free (actual_string); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, quote_percent_test, data_source1); + mctest_add_parameterized_test (tc_core, name_quote_test, data_source2); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/search/Makefile.am b/tests/lib/search/Makefile.am new file mode 100644 index 0000000..c3296ab --- /dev/null +++ b/tests/lib/search/Makefile.am @@ -0,0 +1,42 @@ +PACKAGE_STRING = "/lib/search" + +AM_CPPFLAGS = \ + $(GLIB_CFLAGS) \ + -I$(top_srcdir) \ + -I$(top_srcdir)/lib/search \ + @CHECK_CFLAGS@ + +LIBS = @CHECK_LIBS@ \ + $(top_builddir)/lib/libmc.la + +if ENABLE_MCLIB +LIBS += $(GLIB_LIBS) +endif + +TESTS = \ + glob_prepare_replace_str \ + glob_translate_to_regex \ + hex_translate_to_regex \ + regex_replace_esc_seq \ + regex_process_escape_sequence \ + translate_replace_glob_to_regex + +check_PROGRAMS = $(TESTS) + +glob_prepare_replace_str_SOURCES = \ + glob_prepare_replace_str.c + +regex_replace_esc_seq_SOURCES = \ + regex_replace_esc_seq.c + +regex_process_escape_sequence_SOURCES = \ + regex_process_escape_sequence.c + +translate_replace_glob_to_regex_SOURCES = \ + translate_replace_glob_to_regex.c + +glob_translate_to_regex_SOURCES = \ + glob_translate_to_regex.c + +hex_translate_to_regex_SOURCES = \ + hex_translate_to_regex.c diff --git a/tests/lib/search/Makefile.in b/tests/lib/search/Makefile.in new file mode 100644 index 0000000..2b94a7f --- /dev/null +++ b/tests/lib/search/Makefile.in @@ -0,0 +1,1245 @@ +# Makefile.in generated by automake 1.16.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2021 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@ENABLE_MCLIB_TRUE@am__append_1 = $(GLIB_LIBS) +TESTS = glob_prepare_replace_str$(EXEEXT) \ + glob_translate_to_regex$(EXEEXT) \ + hex_translate_to_regex$(EXEEXT) regex_replace_esc_seq$(EXEEXT) \ + regex_process_escape_sequence$(EXEEXT) \ + translate_replace_glob_to_regex$(EXEEXT) +check_PROGRAMS = $(am__EXEEXT_1) +subdir = tests/lib/search +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/m4.include/gnulib/mode_t.m4 \ + $(top_srcdir)/m4.include/gnulib/stat-size.m4 \ + $(top_srcdir)/m4.include/gnulib/fstypename.m4 \ + $(top_srcdir)/m4.include/gnulib/fsusage.m4 \ + $(top_srcdir)/m4.include/gnulib/mountlist.m4 \ + $(top_srcdir)/m4.include/gnulib/windows-stat-inodes.m4 \ + $(top_srcdir)/m4.include/gnulib/sys_types_h.m4 \ + $(top_srcdir)/m4.include/ax_path_lib_pcre.m4 \ + $(top_srcdir)/m4.include/ax_check_pcre2.m4 \ + $(top_srcdir)/m4.include/dx_doxygen.m4 \ + $(top_srcdir)/m4.include/ax_require_defined.m4 \ + $(top_srcdir)/m4.include/ax_check_compile_flag.m4 \ + $(top_srcdir)/m4.include/ax_append_flag.m4 \ + $(top_srcdir)/m4.include/ax_append_compile_flags.m4 \ + $(top_srcdir)/m4.include/mc-cflags.m4 \ + $(top_srcdir)/m4.include/ax_gcc_func_attribute.m4 \ + $(top_srcdir)/m4.include/mc-check-search-type.m4 \ + $(top_srcdir)/m4.include/mc-get-fs-info.m4 \ + $(top_srcdir)/m4.include/mc-with-x.m4 \ + $(top_srcdir)/m4.include/mc-use-termcap.m4 \ + $(top_srcdir)/m4.include/mc-with-screen.m4 \ + $(top_srcdir)/m4.include/mc-with-screen-ncurses.m4 \ + $(top_srcdir)/m4.include/mc-with-screen-slang.m4 \ + $(top_srcdir)/m4.include/mc-with-internal-edit.m4 \ + $(top_srcdir)/m4.include/mc-subshell.m4 \ + $(top_srcdir)/m4.include/mc-background.m4 \ + $(top_srcdir)/m4.include/mc-ext2fs-attr.m4 \ + $(top_srcdir)/m4.include/mc-glib.m4 \ + $(top_srcdir)/m4.include/mc-vfs.m4 \ + $(top_srcdir)/m4.include/vfs/rpc.m4 \ + $(top_srcdir)/m4.include/vfs/socket.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-extfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-sfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-ftp.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-sftp.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-fish.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-undelfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-tarfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-cpiofs.m4 \ + $(top_srcdir)/m4.include/mc-version.m4 \ + $(top_srcdir)/m4.include/mc-tests.m4 \ + $(top_srcdir)/m4.include/mc-i18n.m4 \ + $(top_srcdir)/m4.include/mc-assert.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__EXEEXT_1 = glob_prepare_replace_str$(EXEEXT) \ + glob_translate_to_regex$(EXEEXT) \ + hex_translate_to_regex$(EXEEXT) regex_replace_esc_seq$(EXEEXT) \ + regex_process_escape_sequence$(EXEEXT) \ + translate_replace_glob_to_regex$(EXEEXT) +am_glob_prepare_replace_str_OBJECTS = \ + glob_prepare_replace_str.$(OBJEXT) +glob_prepare_replace_str_OBJECTS = \ + $(am_glob_prepare_replace_str_OBJECTS) +glob_prepare_replace_str_LDADD = $(LDADD) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +am_glob_translate_to_regex_OBJECTS = \ + glob_translate_to_regex.$(OBJEXT) +glob_translate_to_regex_OBJECTS = \ + $(am_glob_translate_to_regex_OBJECTS) +glob_translate_to_regex_LDADD = $(LDADD) +am_hex_translate_to_regex_OBJECTS = hex_translate_to_regex.$(OBJEXT) +hex_translate_to_regex_OBJECTS = $(am_hex_translate_to_regex_OBJECTS) +hex_translate_to_regex_LDADD = $(LDADD) +am_regex_process_escape_sequence_OBJECTS = \ + regex_process_escape_sequence.$(OBJEXT) +regex_process_escape_sequence_OBJECTS = \ + $(am_regex_process_escape_sequence_OBJECTS) +regex_process_escape_sequence_LDADD = $(LDADD) +am_regex_replace_esc_seq_OBJECTS = regex_replace_esc_seq.$(OBJEXT) +regex_replace_esc_seq_OBJECTS = $(am_regex_replace_esc_seq_OBJECTS) +regex_replace_esc_seq_LDADD = $(LDADD) +am_translate_replace_glob_to_regex_OBJECTS = \ + translate_replace_glob_to_regex.$(OBJEXT) +translate_replace_glob_to_regex_OBJECTS = \ + $(am_translate_replace_glob_to_regex_OBJECTS) +translate_replace_glob_to_regex_LDADD = $(LDADD) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/glob_prepare_replace_str.Po \ + ./$(DEPDIR)/glob_translate_to_regex.Po \ + ./$(DEPDIR)/hex_translate_to_regex.Po \ + ./$(DEPDIR)/regex_process_escape_sequence.Po \ + ./$(DEPDIR)/regex_replace_esc_seq.Po \ + ./$(DEPDIR)/translate_replace_glob_to_regex.Po +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(glob_prepare_replace_str_SOURCES) \ + $(glob_translate_to_regex_SOURCES) \ + $(hex_translate_to_regex_SOURCES) \ + $(regex_process_escape_sequence_SOURCES) \ + $(regex_replace_esc_seq_SOURCES) \ + $(translate_replace_glob_to_regex_SOURCES) +DIST_SOURCES = $(glob_prepare_replace_str_SOURCES) \ + $(glob_translate_to_regex_SOURCES) \ + $(hex_translate_to_regex_SOURCES) \ + $(regex_process_escape_sequence_SOURCES) \ + $(regex_replace_esc_seq_SOURCES) \ + $(translate_replace_glob_to_regex_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red='[0;31m'; \ + grn='[0;32m'; \ + lgn='[1;32m'; \ + blu='[1;34m'; \ + mgn='[0;35m'; \ + brg='[1m'; \ + std='[m'; \ + fi; \ +} +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ + $(top_srcdir)/config/test-driver +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +COM_ERR_CFLAGS = @COM_ERR_CFLAGS@ +COM_ERR_LIBS = @COM_ERR_LIBS@ +CP1251 = @CP1251@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DOC_LINGUAS = @DOC_LINGUAS@ +DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +DX_CONFIG = @DX_CONFIG@ +DX_DOCDIR = @DX_DOCDIR@ +DX_DOT = @DX_DOT@ +DX_DOXYGEN = @DX_DOXYGEN@ +DX_DVIPS = @DX_DVIPS@ +DX_EGREP = @DX_EGREP@ +DX_ENV = @DX_ENV@ +DX_FLAG_chi = @DX_FLAG_chi@ +DX_FLAG_chm = @DX_FLAG_chm@ +DX_FLAG_doc = @DX_FLAG_doc@ +DX_FLAG_dot = @DX_FLAG_dot@ +DX_FLAG_html = @DX_FLAG_html@ +DX_FLAG_man = @DX_FLAG_man@ +DX_FLAG_pdf = @DX_FLAG_pdf@ +DX_FLAG_ps = @DX_FLAG_ps@ +DX_FLAG_rtf = @DX_FLAG_rtf@ +DX_FLAG_xml = @DX_FLAG_xml@ +DX_HHC = @DX_HHC@ +DX_LATEX = @DX_LATEX@ +DX_MAKEINDEX = @DX_MAKEINDEX@ +DX_PDFLATEX = @DX_PDFLATEX@ +DX_PERL = @DX_PERL@ +DX_PROJECT = @DX_PROJECT@ +E2P_CFLAGS = @E2P_CFLAGS@ +E2P_LIBS = @E2P_LIBS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ETAGS = @ETAGS@ +EXEEXT = @EXEEXT@ +EXT2FS_CFLAGS = @EXT2FS_CFLAGS@ +EXT2FS_LIBS = @EXT2FS_LIBS@ +EXTHELPERSDIR = @EXTHELPERSDIR@ +FGREP = @FGREP@ +FILECMD = @FILECMD@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ +GMODULE_CFLAGS = @GMODULE_CFLAGS@ +GMODULE_LIBS = @GMODULE_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +HAVE_FILECMD = @HAVE_FILECMD@ +HAVE_ZIPINFO = @HAVE_ZIPINFO@ +HAVE_nroff = @HAVE_nroff@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBMC_RELEASE = @LIBMC_RELEASE@ +LIBMC_VERSION = @LIBMC_VERSION@ +LIBOBJS = @LIBOBJS@ +LIBS = @CHECK_LIBS@ $(top_builddir)/lib/libmc.la $(am__append_1) +LIBSSH_CFLAGS = @LIBSSH_CFLAGS@ +LIBSSH_LIBS = @LIBSSH_LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANDOC = @MANDOC@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_DATE = @MAN_DATE@ +MAN_FLAGS = @MAN_FLAGS@ +MAN_VERSION = @MAN_VERSION@ +MCLIBS = @MCLIBS@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = "/lib/search" +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCRE_CFLAGS = @PCRE_CFLAGS@ +PCRE_LIBS = @PCRE_LIBS@ +PERL = @PERL@ +PERL_FOR_BUILD = @PERL_FOR_BUILD@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POSUB = @POSUB@ +PYTHON = @PYTHON@ +RANLIB = @RANLIB@ +RUBY = @RUBY@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SLANG_CFLAGS = @SLANG_CFLAGS@ +SLANG_LIBS = @SLANG_LIBS@ +STRIP = @STRIP@ +TESTS_LDFLAGS = @TESTS_LDFLAGS@ +UNZIP = @UNZIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +X11_WWW = @X11_WWW@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +ZIP = @ZIP@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AM_CPPFLAGS = \ + $(GLIB_CFLAGS) \ + -I$(top_srcdir) \ + -I$(top_srcdir)/lib/search \ + @CHECK_CFLAGS@ + +glob_prepare_replace_str_SOURCES = \ + glob_prepare_replace_str.c + +regex_replace_esc_seq_SOURCES = \ + regex_replace_esc_seq.c + +regex_process_escape_sequence_SOURCES = \ + regex_process_escape_sequence.c + +translate_replace_glob_to_regex_SOURCES = \ + translate_replace_glob_to_regex.c + +glob_translate_to_regex_SOURCES = \ + glob_translate_to_regex.c + +hex_translate_to_regex_SOURCES = \ + hex_translate_to_regex.c + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/lib/search/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu tests/lib/search/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +glob_prepare_replace_str$(EXEEXT): $(glob_prepare_replace_str_OBJECTS) $(glob_prepare_replace_str_DEPENDENCIES) $(EXTRA_glob_prepare_replace_str_DEPENDENCIES) + @rm -f glob_prepare_replace_str$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(glob_prepare_replace_str_OBJECTS) $(glob_prepare_replace_str_LDADD) $(LIBS) + +glob_translate_to_regex$(EXEEXT): $(glob_translate_to_regex_OBJECTS) $(glob_translate_to_regex_DEPENDENCIES) $(EXTRA_glob_translate_to_regex_DEPENDENCIES) + @rm -f glob_translate_to_regex$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(glob_translate_to_regex_OBJECTS) $(glob_translate_to_regex_LDADD) $(LIBS) + +hex_translate_to_regex$(EXEEXT): $(hex_translate_to_regex_OBJECTS) $(hex_translate_to_regex_DEPENDENCIES) $(EXTRA_hex_translate_to_regex_DEPENDENCIES) + @rm -f hex_translate_to_regex$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(hex_translate_to_regex_OBJECTS) $(hex_translate_to_regex_LDADD) $(LIBS) + +regex_process_escape_sequence$(EXEEXT): $(regex_process_escape_sequence_OBJECTS) $(regex_process_escape_sequence_DEPENDENCIES) $(EXTRA_regex_process_escape_sequence_DEPENDENCIES) + @rm -f regex_process_escape_sequence$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(regex_process_escape_sequence_OBJECTS) $(regex_process_escape_sequence_LDADD) $(LIBS) + +regex_replace_esc_seq$(EXEEXT): $(regex_replace_esc_seq_OBJECTS) $(regex_replace_esc_seq_DEPENDENCIES) $(EXTRA_regex_replace_esc_seq_DEPENDENCIES) + @rm -f regex_replace_esc_seq$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(regex_replace_esc_seq_OBJECTS) $(regex_replace_esc_seq_LDADD) $(LIBS) + +translate_replace_glob_to_regex$(EXEEXT): $(translate_replace_glob_to_regex_OBJECTS) $(translate_replace_glob_to_regex_DEPENDENCIES) $(EXTRA_translate_replace_glob_to_regex_DEPENDENCIES) + @rm -f translate_replace_glob_to_regex$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(translate_replace_glob_to_regex_OBJECTS) $(translate_replace_glob_to_regex_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glob_prepare_replace_str.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glob_translate_to_regex.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hex_translate_to_regex.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex_process_escape_sequence.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex_replace_esc_seq.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/translate_replace_glob_to_regex.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + elif test -n "$$redo_logs"; then \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: $(check_PROGRAMS) + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +glob_prepare_replace_str.log: glob_prepare_replace_str$(EXEEXT) + @p='glob_prepare_replace_str$(EXEEXT)'; \ + b='glob_prepare_replace_str'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +glob_translate_to_regex.log: glob_translate_to_regex$(EXEEXT) + @p='glob_translate_to_regex$(EXEEXT)'; \ + b='glob_translate_to_regex'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +hex_translate_to_regex.log: hex_translate_to_regex$(EXEEXT) + @p='hex_translate_to_regex$(EXEEXT)'; \ + b='hex_translate_to_regex'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +regex_replace_esc_seq.log: regex_replace_esc_seq$(EXEEXT) + @p='regex_replace_esc_seq$(EXEEXT)'; \ + b='regex_replace_esc_seq'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +regex_process_escape_sequence.log: regex_process_escape_sequence$(EXEEXT) + @p='regex_process_escape_sequence$(EXEEXT)'; \ + b='regex_process_escape_sequence'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +translate_replace_glob_to_regex.log: translate_replace_glob_to_regex$(EXEEXT) + @p='translate_replace_glob_to_regex$(EXEEXT)'; \ + b='translate_replace_glob_to_regex'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/glob_prepare_replace_str.Po + -rm -f ./$(DEPDIR)/glob_translate_to_regex.Po + -rm -f ./$(DEPDIR)/hex_translate_to_regex.Po + -rm -f ./$(DEPDIR)/regex_process_escape_sequence.Po + -rm -f ./$(DEPDIR)/regex_replace_esc_seq.Po + -rm -f ./$(DEPDIR)/translate_replace_glob_to_regex.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/glob_prepare_replace_str.Po + -rm -f ./$(DEPDIR)/glob_translate_to_regex.Po + -rm -f ./$(DEPDIR)/hex_translate_to_regex.Po + -rm -f ./$(DEPDIR)/regex_process_escape_sequence.Po + -rm -f ./$(DEPDIR)/regex_replace_esc_seq.Po + -rm -f ./$(DEPDIR)/translate_replace_glob_to_regex.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \ + check-am clean clean-checkPROGRAMS clean-generic clean-libtool \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + recheck tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/tests/lib/search/glob_prepare_replace_str.c b/tests/lib/search/glob_prepare_replace_str.c new file mode 100644 index 0000000..6cc5020 --- /dev/null +++ b/tests/lib/search/glob_prepare_replace_str.c @@ -0,0 +1,109 @@ +/* + libmc - checks for processing esc sequences in replace string + + Copyright (C) 2011-2023 + Free Software Foundation, Inc. + + Written by: + Andrew Borodin <aborodin@vmail.ru>, 2014 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "lib/search/glob" + +#include "tests/mctest.h" + +#include "glob.c" /* for testing static functions */ + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_glob_prepare_replace_str_ds") */ +/* *INDENT-OFF* */ +static const struct test_glob_prepare_replace_str_ds +{ + const char *input_value; + const char *glob_str; + const char *replace_str; + const char *expected_result; +} test_glob_prepare_replace_str_ds[] = +{ + { /* 0. */ + "qqwwee", + "*ww*", + "\\1AA\\2", + "qqAAee" + }, + { /* 1. */ + "qqwwee", + "*qq*", + "\\1SS\\2", + "SSwwee" + }, + { /* 2. */ + "qqwwee", + "*ee*", + "\\1RR\\2", + "qqwwRR" + } +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_glob_prepare_replace_str_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_glob_prepare_replace_str, test_glob_prepare_replace_str_ds) +/* *INDENT-ON* */ +{ + /* given */ + mc_search_t *s; + char *dest_str; + + s = mc_search_new (data->glob_str, NULL); + s->is_case_sensitive = TRUE; + s->search_type = MC_SEARCH_T_GLOB; + + /* when */ + mc_search_run (s, data->input_value, 0, strlen (data->input_value), NULL); + dest_str = mc_search_prepare_replace_str2 (s, (char *) data->replace_str); + + /* then */ + mctest_assert_str_eq (dest_str, data->expected_result); + + g_free (dest_str); + mc_search_free (s); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, test_glob_prepare_replace_str, + test_glob_prepare_replace_str_ds); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/search/glob_translate_to_regex.c b/tests/lib/search/glob_translate_to_regex.c new file mode 100644 index 0000000..a15df94 --- /dev/null +++ b/tests/lib/search/glob_translate_to_regex.c @@ -0,0 +1,121 @@ +/* + libmc - checks for processing esc sequences in replace string + + Copyright (C) 2011-2023 + Free Software Foundation, Inc. + + Written by: + Andrew Borodin <aborodin@vmail.ru>, 2011 + Slava Zanko <slavazanko@gmail.com>, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "lib/search/glob" + +#include "tests/mctest.h" + +#include "glob.c" /* for testing static functions */ + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_glob_translate_to_regex_ds") */ +/* *INDENT-OFF* */ +static const struct test_glob_translate_to_regex_ds +{ + const char *input_value; + const char *expected_result; +} test_glob_translate_to_regex_ds[] = +{ + { + "test*", + "test(.*)" + }, + { + "t?es*t", + "t(.)es(.*)t" + }, + { + "te{st}", + "te(st)" + }, + { + "te{st|ts}", + "te(st|ts)" + }, + { + "te{st,ts}", + "te(st|ts)" + }, + { + "te[st]", + "te[st]" + }, + { + "t,e.st", + "t,e\\.st" + }, + { + "^t,e.+st+$", + "\\^t,e\\.\\+st\\+\\$" + }, + { + "te!@#$%^&*()_+|\";:'{}:><?\\?\\*.,/[]|\\/st", + "te!@#\\$%\\^&(.*)\\(\\)_\\+|\";:'():><(.)\\?\\*\\.,/[]|\\/st" + }, +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_glob_translate_to_regex_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_glob_translate_to_regex, test_glob_translate_to_regex_ds) +/* *INDENT-ON* */ +{ + /* given */ + GString *tmp = g_string_new (data->input_value); + GString *dest_str; + + /* when */ + dest_str = mc_search__glob_translate_to_regex (tmp); + + /* then */ + g_string_free (tmp, TRUE); + + mctest_assert_str_eq (dest_str->str, data->expected_result); + g_string_free (dest_str, TRUE); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, test_glob_translate_to_regex, + test_glob_translate_to_regex_ds); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/search/hex_translate_to_regex.c b/tests/lib/search/hex_translate_to_regex.c new file mode 100644 index 0000000..a250bc0 --- /dev/null +++ b/tests/lib/search/hex_translate_to_regex.c @@ -0,0 +1,194 @@ +/* + libmc - checks for hex pattern parsing + + Copyright (C) 2017-2023 + Free Software Foundation, Inc. + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "lib/search/hex" + +#include "tests/mctest.h" + +#include "hex.c" /* for testing static functions */ + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_hex_translate_to_regex_ds") */ +/* *INDENT-OFF* */ +static const struct test_hex_translate_to_regex_ds +{ + const char *input_value; + const char *expected_result; + mc_search_hex_parse_error_t expected_error; +} test_hex_translate_to_regex_ds[] = +{ + { + /* Simplest case */ + "12 34", + "\\x12\\x34", + MC_SEARCH_HEX_E_OK + }, + { + /* Prefixes (0x, 0X) */ + "0x12 0X34", + "\\x12\\x34", + MC_SEARCH_HEX_E_OK + }, + { + /* Prefix "0" doesn't signify octal! Numbers are always interpreted in hex. */ + "012", + "\\x12", + MC_SEARCH_HEX_E_OK + }, + { + /* Extra whitespace */ + " 12 34 ", + "\\x12\\x34", + MC_SEARCH_HEX_E_OK + }, + { + /* Min/max values */ + "0 ff", + "\\x00\\xFF", + MC_SEARCH_HEX_E_OK + }, + { + /* Error: Number out of range */ + "100", + NULL, + MC_SEARCH_HEX_E_NUM_OUT_OF_RANGE + }, + { + /* Error: Number out of range (negative) */ + "-1", + NULL, + MC_SEARCH_HEX_E_NUM_OUT_OF_RANGE + }, + { + /* Error: Invalid characters */ + "1 z 2", + NULL, + MC_SEARCH_HEX_E_INVALID_CHARACTER + }, + /* + * Quotes. + */ + { + " \"abc\" ", + "abc", + MC_SEARCH_HEX_E_OK + }, + { + /* Preserve upper/lower case */ + "\"aBc\"", + "aBc", + MC_SEARCH_HEX_E_OK + }, + { + " 12\"abc\"34 ", + "\\x12abc\\x34", + MC_SEARCH_HEX_E_OK + }, + { + "\"a\"\"b\"", + "ab", + MC_SEARCH_HEX_E_OK + }, + /* Empty quotes */ + { + "\"\"", + "", + MC_SEARCH_HEX_E_OK + }, + { + "12 \"\"", + "\\x12", + MC_SEARCH_HEX_E_OK + }, + /* Error: Unmatched quotes */ + { + "\"a", + NULL, + MC_SEARCH_HEX_E_UNMATCHED_QUOTES + }, + { + "\"", + NULL, + MC_SEARCH_HEX_E_UNMATCHED_QUOTES + }, + /* Escaped quotes */ + { + "\"a\\\"b\"", + "a\"b", + MC_SEARCH_HEX_E_OK + }, + { + "\"a\\\\b\"", + "a\\b", + MC_SEARCH_HEX_E_OK + }, +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_hex_translate_to_regex_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_hex_translate_to_regex, test_hex_translate_to_regex_ds) +/* *INDENT-ON* */ +{ + GString *tmp, *dest_str; + mc_search_hex_parse_error_t error = MC_SEARCH_HEX_E_OK; + + /* given */ + tmp = g_string_new (data->input_value); + + /* when */ + dest_str = mc_search__hex_translate_to_regex (tmp, &error, NULL); + + g_string_free (tmp, TRUE); + + /* then */ + if (dest_str != NULL) + { + mctest_assert_str_eq (dest_str->str, data->expected_result); + g_string_free (dest_str, TRUE); + } + else + ck_assert_int_eq (error, data->expected_error); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, test_hex_translate_to_regex, + test_hex_translate_to_regex_ds); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/search/regex_process_escape_sequence.c b/tests/lib/search/regex_process_escape_sequence.c new file mode 100644 index 0000000..c7d7785 --- /dev/null +++ b/tests/lib/search/regex_process_escape_sequence.c @@ -0,0 +1,155 @@ +/* + libmc - checks for processing esc sequences in replace string + + Copyright (C) 2011-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2011, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "lib/search/regex" + +#include "tests/mctest.h" + +#include "regex.c" /* for testing static functions */ + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_regex_process_escape_sequence_ds") */ +/* *INDENT-OFF* */ +static const struct test_regex_process_escape_sequence_ds +{ + const char *input_from; + const replace_transform_type_t input_initial_flags; + const gboolean input_use_utf; + const char *expected_string; +} test_regex_process_escape_sequence_ds[] = +{ + { /* 0. */ + "{101}", + REPLACE_T_NO_TRANSFORM, + FALSE, + "A" + }, + { /* 1. */ + "x42", + REPLACE_T_NO_TRANSFORM, + FALSE, + "B" + }, + { /* 2. */ + "x{444}", + REPLACE_T_NO_TRANSFORM, + FALSE, + "D" + }, + { /* 3. */ + "x{444}", + REPLACE_T_NO_TRANSFORM, + TRUE, + "Ñ„" + }, + { /* 4. */ + "n", + REPLACE_T_NO_TRANSFORM, + FALSE, + "\n" + }, + { /* 5. */ + "t", + REPLACE_T_NO_TRANSFORM, + FALSE, + "\t" + }, + { /* 6. */ + "v", + REPLACE_T_NO_TRANSFORM, + FALSE, + "\v" + }, + { /* 7. */ + "b", + REPLACE_T_NO_TRANSFORM, + FALSE, + "\b" + }, + { /* 8. */ + "r", + REPLACE_T_NO_TRANSFORM, + FALSE, + "\r" + }, + { /* 9. */ + "f", + REPLACE_T_NO_TRANSFORM, + FALSE, + "\f" + }, + { /* 10. */ + "a", + REPLACE_T_NO_TRANSFORM, + FALSE, + "\a" + }, +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_regex_process_escape_sequence_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_regex_process_escape_sequence, test_regex_process_escape_sequence_ds) +/* *INDENT-ON* */ +{ + /* given */ + GString *actual_string; + replace_transform_type_t replace_flags = REPLACE_T_NO_TRANSFORM; + + replace_flags = data->input_initial_flags; + actual_string = g_string_new (""); + + /* when */ + mc_search_regex__process_escape_sequence (actual_string, data->input_from, -1, &replace_flags, + data->input_use_utf); + + /* then */ + mctest_assert_str_eq (actual_string->str, data->expected_string); + + g_string_free (actual_string, TRUE); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, test_regex_process_escape_sequence, + test_regex_process_escape_sequence_ds); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/search/regex_replace_esc_seq.c b/tests/lib/search/regex_replace_esc_seq.c new file mode 100644 index 0000000..7d5cd3e --- /dev/null +++ b/tests/lib/search/regex_replace_esc_seq.c @@ -0,0 +1,226 @@ +/* + libmc - checks for processing esc sequences in replace string + + Copyright (C) 2011-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2011, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "lib/search/regex" + +#include "tests/mctest.h" + +#include "regex.c" /* for testing static functions */ + +/* --------------------------------------------------------------------------------------------- */ +#define test_helper_check_valid_data( a, b, c, d, e, f ) \ +{ \ + ck_assert_msg (a == b, "ret_value != %s", (b) ? "TRUE": "FALSE"); \ + ck_assert_msg (c == d, "skip_len(%d) != %d", c, d); \ + if (f != 0) \ + ck_assert_msg (e == f, "ret(%d) != %d", e, f); \ +} + +#define test_helper_handle_esc_seq( pos, r, skip, flag ) \ +{ \ + skip_len = 0;\ + test_helper_check_valid_data(\ + mc_search_regex__replace_handle_esc_seq( replace_str, pos, &skip_len, &ret ), r,\ + skip_len, skip,\ + ret, flag\ + ); \ +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_regex_replace_esc_seq_prepare_ds") */ +/* *INDENT-OFF* */ +static const struct test_regex_replace_esc_seq_prepare_ds +{ + const char *input_string; + const size_t input_pos; + + const gboolean expected_result; + const gsize expected_skipped_len; + const int expected_flags; +} test_regex_replace_esc_seq_prepare_ds[] = +{ + { /* 0. \\{123} */ + "bla-bla\\{123}bla-bla\\xabc234 bla-bla\\x{456abcd}bla-bla\\xtre\\n\\t\\v\\b\\r\\f\\a", + 7, + FALSE, + 6, + REPLACE_PREPARE_T_ESCAPE_SEQ + }, + { /* 1. \\xab */ + "bla-bla\\{123}bla-bla\\xabc234 bla-bla\\x{456abcd}bla-bla\\xtre\\n\\t\\v\\b\\r\\f\\a", + 20, + FALSE, + 4, + REPLACE_PREPARE_T_ESCAPE_SEQ + }, + { /* 2. \\x{456abcd} */ + "bla-bla\\{123}bla-bla\\xabc234 bla-bla\\x{456abcd}bla-bla\\xtre\\n\\t\\v\\b\\r\\f\\a", + 36, + FALSE, + 11, + REPLACE_PREPARE_T_ESCAPE_SEQ + }, + { /* 3. \\xtre */ + "bla-bla\\{123}bla-bla\\xabc234 bla-bla\\x{456abcd}bla-bla\\xtre\\n\\t\\v\\b\\r\\f\\a", + 54, + FALSE, + 2, + REPLACE_PREPARE_T_NOTHING_SPECIAL + }, + { /* 4. \\n */ + "bla-bla\\{123}bla-bla\\xabc234 bla-bla\\x{456abcd}bla-bla\\xtre\\n\\t\\v\\b\\r\\f\\a", + 59, + FALSE, + 2, + REPLACE_PREPARE_T_ESCAPE_SEQ + }, + { /* 5. \\t */ + "bla-bla\\{123}bla-bla\\xabc234 bla-bla\\x{456abcd}bla-bla\\xtre\\n\\t\\v\\b\\r\\f\\a", + 61, + FALSE, + 2, + REPLACE_PREPARE_T_ESCAPE_SEQ + }, + { /* 6. \\v */ + "bla-bla\\{123}bla-bla\\xabc234 bla-bla\\x{456abcd}bla-bla\\xtre\\n\\t\\v\\b\\r\\f\\a", + 63, + FALSE, + 2, + REPLACE_PREPARE_T_ESCAPE_SEQ + }, + { /* 7. \\b */ + "bla-bla\\{123}bla-bla\\xabc234 bla-bla\\x{456abcd}bla-bla\\xtre\\n\\t\\v\\b\\r\\f\\a", + 65, + FALSE, + 2, + REPLACE_PREPARE_T_ESCAPE_SEQ + }, + { /* 8. \\r */ + "bla-bla\\{123}bla-bla\\xabc234 bla-bla\\x{456abcd}bla-bla\\xtre\\n\\t\\v\\b\\r\\f\\a", + 67, + FALSE, + 2, + REPLACE_PREPARE_T_ESCAPE_SEQ + }, + { /* 9. \\f */ + "bla-bla\\{123}bla-bla\\xabc234 bla-bla\\x{456abcd}bla-bla\\xtre\\n\\t\\v\\b\\r\\f\\a", + 69, + FALSE, + 2, + REPLACE_PREPARE_T_ESCAPE_SEQ + }, + { /* 10. \\a */ + "bla-bla\\{123}bla-bla\\xabc234 bla-bla\\x{456abcd}bla-bla\\xtre\\n\\t\\v\\b\\r\\f\\a", + 71, + FALSE, + 2, + REPLACE_PREPARE_T_ESCAPE_SEQ + }, + { /* 11. \\{123 */ + "\\{123 \\x{qwerty} \\12} \\x{456a-bcd}bla-bla\\satre", + 0, + TRUE, + 5, + REPLACE_PREPARE_T_NOTHING_SPECIAL + }, + { /* 12. \\x{qwerty} */ + "\\{123 \\x{qwerty} \\12} \\x{456a-bcd}bla-bla\\satre", + 6, + TRUE, + 3, + REPLACE_PREPARE_T_NOTHING_SPECIAL + }, + { /* 13. \\12} */ + "\\{123 \\x{qwerty} \\12} \\x{456a-bcd}bla-bla\\satre", + 17, + TRUE, + 0, + 0 + }, + { /* 14. \\x{456a-bcd} */ + "\\{123 \\x{qwerty} \\12} \\x{456a-bcd}bla-bla\\satre", + 22, + TRUE, + 7, + REPLACE_PREPARE_T_NOTHING_SPECIAL + }, + { /* 15. \\satre */ + "\\{123 \\x{qwerty} \\12} \\x{456a-bcd}bla-bla\\satre", + 41, + TRUE, + 0, + 0 + }, +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_regex_replace_esc_seq_prepare_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_regex_replace_esc_seq_prepare, test_regex_replace_esc_seq_prepare_ds) +/* *INDENT-ON* */ +{ + /* given */ + GString *replace_str; + gsize actual_skipped_len = 0; + int actual_flags = 0; + gboolean actual_result; + + replace_str = g_string_new (data->input_string); + + /* when */ + actual_result = + mc_search_regex__replace_handle_esc_seq (replace_str, data->input_pos, &actual_skipped_len, + &actual_flags); + + /* then */ + ck_assert_int_eq (actual_result, data->expected_result); + ck_assert_int_eq (actual_skipped_len, data->expected_skipped_len); + ck_assert_int_eq (actual_flags, data->expected_flags); + + g_string_free (replace_str, TRUE); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, test_regex_replace_esc_seq_prepare, + test_regex_replace_esc_seq_prepare_ds); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/search/translate_replace_glob_to_regex.c b/tests/lib/search/translate_replace_glob_to_regex.c new file mode 100644 index 0000000..4933adf --- /dev/null +++ b/tests/lib/search/translate_replace_glob_to_regex.c @@ -0,0 +1,98 @@ +/* + libmc - checks for processing esc sequences in replace string + + Copyright (C) 2011-2023 + Free Software Foundation, Inc. + + Written by: + Andrew Borodin <aborodin@vmail.ru>, 2011 + Slava Zanko <slavazanko@gmail.com>, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "lib/search/glob" + +#include "tests/mctest.h" + +#include "glob.c" /* for testing static functions */ + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_translate_replace_glob_to_regex_ds") */ +/* *INDENT-OFF* */ +static const struct test_translate_replace_glob_to_regex_ds +{ + const char *input_value; + const char *expected_result; +} test_translate_replace_glob_to_regex_ds[] = +{ + { + "a&a?a", + "a\\&a\\1a" + }, + { + "a\\&a?a", + "a\\&a\\1a" + }, + { + "a&a\\?a", + "a\\&a\\?a" + }, + { + "a\\&a\\?a", + "a\\&a\\?a" + }, +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_translate_replace_glob_to_regex_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_translate_replace_glob_to_regex, test_translate_replace_glob_to_regex_ds) +/* *INDENT-ON* */ +{ + /* given */ + GString *dest_str; + + /* when */ + dest_str = mc_search__translate_replace_glob_to_regex (data->input_value); + + /* then */ + mctest_assert_str_eq (dest_str->str, data->expected_result); + g_string_free (dest_str, TRUE); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, test_translate_replace_glob_to_regex, + test_translate_replace_glob_to_regex_ds); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/serialize.c b/tests/lib/serialize.c new file mode 100644 index 0000000..f150727 --- /dev/null +++ b/tests/lib/serialize.c @@ -0,0 +1,387 @@ +/* + lib - common serialize/deserialize functions + + Copyright (C) 2011-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2011, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib" + +#include "tests/mctest.h" + +#include "lib/strutil.h" +#include "lib/serialize.h" + +static GError *error = NULL; + +static const char *deserialize_input_value1 = + "g6:group1p6:param1v10:some valuep6:param2v11:some value " + "g6:group2p6:param1v4:truep6:param2v6:123456" + "g6:group3p6:param1v11:::bla-bla::p6:param2v31:bla-:p1:w:v2:12:g3:123:bla-bla\n" + "g6:group4p6:param1v5:falsep6:param2v6:654321"; + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ + str_init_strings (NULL); + error = NULL; +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ + g_clear_error (&error); + str_uninit_strings (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_serialize_ds") */ +/* *INDENT-OFF* */ +static const struct test_serialize_ds +{ + const char input_char_prefix; + const char *input_string; + const char *expected_result; +} test_serialize_ds[] = +{ + { + 's', + "some test string", + "s16:some test string" + }, + { + 'a', + "some test test test string", + "a26:some test test test string" + }, +}; +/* *INDENT-ON* */ +/* @Test(dataSource = "test_serialize_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_serialize, test_serialize_ds) +/* *INDENT-ON* */ +{ + /* given */ + char *actual_result; + + /* when */ + actual_result = mc_serialize_str (data->input_char_prefix, data->input_string, &error); + + /* then */ + mctest_assert_str_eq (actual_result, data->expected_result); + + g_free (actual_result); + + if (error != NULL) + g_error_free (error); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_deserialize_incorrect_ds") */ +/* *INDENT-OFF* */ +static const struct test_deserialize_incorrect_ds +{ + const char input_char_prefix; + const char *input_string; + const int expected_error_code; + const char *expected_error_string; +} test_deserialize_incorrect_ds[] = +{ + { + 's', + NULL, + 0, /* FIXME, TODO */ + "mc_serialize_str(): Input data is NULL or empty." + }, + { + 's', + "incorrect string", + 0, /* FIXME, TODO */ + "mc_serialize_str(): String prefix doesn't equal to 's'" + }, + { + 's', + "s12345string without delimiter", + 0, /* FIXME, TODO */ + "mc_serialize_str(): Length delimiter ':' doesn't exists" + }, + { + 's', + "s1234567890123456789012345678901234567890123456789012345678901234567890:too big number", + 0, /* FIXME, TODO */ + "mc_serialize_str(): Too big string length" + }, + { + 's', + "s500:actual string length less that specified length", + 0, /* FIXME, TODO */ + "mc_serialize_str(): Specified data length (500) is greater than actual data length (47)" + }, +}; +/* *INDENT-ON* */ +/* @Test(dataSource = "test_deserialize_incorrect_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_deserialize_incorrect, test_deserialize_incorrect_ds) +/* *INDENT-ON* */ +{ + /* given */ + char *actual_result; + + /* when */ + actual_result = mc_deserialize_str (data->input_char_prefix, data->input_string, &error); + + /* then */ + mctest_assert_null (actual_result); + + ck_assert_int_eq (error->code, data->expected_error_code); + mctest_assert_str_eq (error->message, data->expected_error_string); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_deserialize_ds") */ +/* *INDENT-OFF* */ +static const struct test_deserialize_ds +{ + const char input_char_prefix; + const char *input_string; + const char *expected_result; +} test_deserialize_ds[] = +{ + { + 's', + "s10:actual string length great that specified length", + "actual str" + }, + { + 'r', + "r21:The right test string", + "The right test string" + }, +}; +/* *INDENT-ON* */ +/* @Test(dataSource = "test_deserialize_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_deserialize, test_deserialize_ds) +/* *INDENT-ON* */ +{ + /* given */ + char *actual_result; + + /* when */ + actual_result = mc_deserialize_str (data->input_char_prefix, data->input_string, &error); + + /* then */ + mctest_assert_str_eq (actual_result, data->expected_result); + + g_free (actual_result); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +/* *INDENT-OFF* */ +START_TEST (test_serialize_config) +/* *INDENT-ON* */ +{ + /* given */ + mc_config_t *test_data; + char *actual; + const char *expected_result = "g6:group1p6:param1v10:some valuep6:param2v11:some value " + "g6:group2p6:param1v4:truep6:param2v6:123456" + "g6:group3p6:param1v11:::bla-bla::p6:param2v31:bla-:p1:w:v2:12:g3:123:bla-bla\n" + "g6:group4p6:param1v5:falsep6:param2v6:654321"; + + test_data = mc_config_init (NULL, FALSE); + + mc_config_set_string_raw (test_data, "group1", "param1", "some value"); + mc_config_set_string (test_data, "group1", "param2", "some value "); + + mc_config_set_bool (test_data, "group2", "param1", TRUE); + mc_config_set_int (test_data, "group2", "param2", 123456); + + mc_config_set_string_raw (test_data, "group3", "param1", "::bla-bla::"); + mc_config_set_string (test_data, "group3", "param2", "bla-:p1:w:v2:12:g3:123:bla-bla\n"); + + mc_config_set_bool (test_data, "group4", "param1", FALSE); + mc_config_set_int (test_data, "group4", "param2", 654321); + + /* when */ + actual = mc_serialize_config (test_data, &error); + mc_config_deinit (test_data); + + /* then */ + mctest_assert_not_null (actual); + mctest_assert_str_eq (actual, expected_result); + + g_free (actual); +} +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ +/* @DataSource("test_deserialize_config_incorrect_ds") */ +/* *INDENT-OFF* */ +static const struct test_deserialize_config_incorrect_ds +{ + const char *input_string; + const int expected_error_code; + const char *expected_error_string; +} test_deserialize_config_incorrect_ds[] = +{ + { + "g123error in group name", + 0, /* FIXME, TODO */ + "mc_deserialize_config() at 1: mc_serialize_str(): Length delimiter ':' doesn't exists" + }, + { + "p6:param1v10:some valuep6:param2v11:some value ", + 0, /* FIXME, TODO */ + "mc_deserialize_config() at 1: mc_serialize_str(): String prefix doesn't equal to 'g'" + }, + { + "g6:group1v10:some valuep6:param2v11:some value ", + 0, /* FIXME, TODO */ + "mc_deserialize_config() at 10: mc_serialize_str(): String prefix doesn't equal to 'p'" + }, + { + "g6:group1p6000:param2v11:some value ", + 0, /* FIXME, TODO */ + "mc_deserialize_config() at 10: mc_serialize_str(): Specified data length (6000) is greater than actual data length (21)" + }, +}; +/* *INDENT-ON* */ +/* @Test(dataSource = "test_deserialize_config_incorrect_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_deserialize_config_incorrect, test_deserialize_config_incorrect_ds) +/* *INDENT-ON* */ +{ + /* given */ + mc_config_t *actual_result; + + /* when */ + actual_result = mc_deserialize_config (data->input_string, &error); + + /* then */ + mctest_assert_null (actual_result); + + ck_assert_int_eq (error->code, data->expected_error_code); + mctest_assert_str_eq (error->message, data->expected_error_string); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +/* *INDENT-OFF* */ +START_TEST (test_deserialize_config) +/* *INDENT-ON* */ +{ + /* given */ + mc_config_t *actual; + char *actual_value; + + /* when */ + actual = mc_deserialize_config (deserialize_input_value1, &error); + + /* then */ + mctest_assert_not_null (actual); + + actual_value = mc_config_get_string_raw (actual, "group1", "param1", ""); + mctest_assert_str_eq (actual_value, "some value"); + g_free (actual_value); + + actual_value = mc_config_get_string (actual, "group1", "param2", ""); + mctest_assert_str_eq (actual_value, "some value "); + g_free (actual_value); + + mctest_assert_true (mc_config_get_bool (actual, "group2", "param1", FALSE)); + + ck_assert_int_eq (mc_config_get_int (actual, "group2", "param2", 0), 123456); + + actual_value = mc_config_get_string_raw (actual, "group3", "param1", ""); + mctest_assert_str_eq (actual_value, "::bla-bla::"); + g_free (actual_value); + + actual_value = mc_config_get_string (actual, "group3", "param2", ""); + mctest_assert_str_eq (actual_value, "bla-:p1:w:v2:12:g3:123:bla-bla\n"); + g_free (actual_value); + + mctest_assert_false (mc_config_get_bool (actual, "group4", "param1", TRUE)); + + ck_assert_int_eq (mc_config_get_int (actual, "group4", "param2", 0), 654321); + + mc_config_deinit (actual); +} +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ + +#undef input_value +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, test_serialize, test_serialize_ds); + + mctest_add_parameterized_test (tc_core, test_deserialize_incorrect, + test_deserialize_incorrect_ds); + + mctest_add_parameterized_test (tc_core, test_deserialize, test_deserialize_ds); + + tcase_add_test (tc_core, test_serialize_config); + + mctest_add_parameterized_test (tc_core, test_deserialize_config_incorrect, + test_deserialize_config_incorrect_ds); + + tcase_add_test (tc_core, test_deserialize_config); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/strutil/Makefile.am b/tests/lib/strutil/Makefile.am new file mode 100644 index 0000000..7a77395 --- /dev/null +++ b/tests/lib/strutil/Makefile.am @@ -0,0 +1,33 @@ +PACKAGE_STRING = "/lib/strutil" + +AM_CPPFLAGS = \ + $(GLIB_CFLAGS) \ + -I$(top_srcdir) \ + @CHECK_CFLAGS@ + +LIBS = @CHECK_LIBS@ \ + $(top_builddir)/lib/libmc.la + +if ENABLE_MCLIB +LIBS += $(GLIB_LIBS) +endif + +TESTS = \ + parse_integer \ + str_replace_all \ + str_verscmp \ + filevercmp + +check_PROGRAMS = $(TESTS) + +parse_integer_SOURCES = \ + parse_integer.c + +str_replace_all_SOURCES = \ + str_replace_all.c + +str_verscmp_SOURCES = \ + str_verscmp.c + +filevercmp_SOURCES = \ + filevercmp.c diff --git a/tests/lib/strutil/Makefile.in b/tests/lib/strutil/Makefile.in new file mode 100644 index 0000000..c3f2299 --- /dev/null +++ b/tests/lib/strutil/Makefile.in @@ -0,0 +1,1179 @@ +# Makefile.in generated by automake 1.16.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2021 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@ENABLE_MCLIB_TRUE@am__append_1 = $(GLIB_LIBS) +TESTS = parse_integer$(EXEEXT) str_replace_all$(EXEEXT) \ + str_verscmp$(EXEEXT) filevercmp$(EXEEXT) +check_PROGRAMS = $(am__EXEEXT_1) +subdir = tests/lib/strutil +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/m4.include/gnulib/mode_t.m4 \ + $(top_srcdir)/m4.include/gnulib/stat-size.m4 \ + $(top_srcdir)/m4.include/gnulib/fstypename.m4 \ + $(top_srcdir)/m4.include/gnulib/fsusage.m4 \ + $(top_srcdir)/m4.include/gnulib/mountlist.m4 \ + $(top_srcdir)/m4.include/gnulib/windows-stat-inodes.m4 \ + $(top_srcdir)/m4.include/gnulib/sys_types_h.m4 \ + $(top_srcdir)/m4.include/ax_path_lib_pcre.m4 \ + $(top_srcdir)/m4.include/ax_check_pcre2.m4 \ + $(top_srcdir)/m4.include/dx_doxygen.m4 \ + $(top_srcdir)/m4.include/ax_require_defined.m4 \ + $(top_srcdir)/m4.include/ax_check_compile_flag.m4 \ + $(top_srcdir)/m4.include/ax_append_flag.m4 \ + $(top_srcdir)/m4.include/ax_append_compile_flags.m4 \ + $(top_srcdir)/m4.include/mc-cflags.m4 \ + $(top_srcdir)/m4.include/ax_gcc_func_attribute.m4 \ + $(top_srcdir)/m4.include/mc-check-search-type.m4 \ + $(top_srcdir)/m4.include/mc-get-fs-info.m4 \ + $(top_srcdir)/m4.include/mc-with-x.m4 \ + $(top_srcdir)/m4.include/mc-use-termcap.m4 \ + $(top_srcdir)/m4.include/mc-with-screen.m4 \ + $(top_srcdir)/m4.include/mc-with-screen-ncurses.m4 \ + $(top_srcdir)/m4.include/mc-with-screen-slang.m4 \ + $(top_srcdir)/m4.include/mc-with-internal-edit.m4 \ + $(top_srcdir)/m4.include/mc-subshell.m4 \ + $(top_srcdir)/m4.include/mc-background.m4 \ + $(top_srcdir)/m4.include/mc-ext2fs-attr.m4 \ + $(top_srcdir)/m4.include/mc-glib.m4 \ + $(top_srcdir)/m4.include/mc-vfs.m4 \ + $(top_srcdir)/m4.include/vfs/rpc.m4 \ + $(top_srcdir)/m4.include/vfs/socket.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-extfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-sfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-ftp.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-sftp.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-fish.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-undelfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-tarfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-cpiofs.m4 \ + $(top_srcdir)/m4.include/mc-version.m4 \ + $(top_srcdir)/m4.include/mc-tests.m4 \ + $(top_srcdir)/m4.include/mc-i18n.m4 \ + $(top_srcdir)/m4.include/mc-assert.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__EXEEXT_1 = parse_integer$(EXEEXT) str_replace_all$(EXEEXT) \ + str_verscmp$(EXEEXT) filevercmp$(EXEEXT) +am_filevercmp_OBJECTS = filevercmp.$(OBJEXT) +filevercmp_OBJECTS = $(am_filevercmp_OBJECTS) +filevercmp_LDADD = $(LDADD) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +am_parse_integer_OBJECTS = parse_integer.$(OBJEXT) +parse_integer_OBJECTS = $(am_parse_integer_OBJECTS) +parse_integer_LDADD = $(LDADD) +am_str_replace_all_OBJECTS = str_replace_all.$(OBJEXT) +str_replace_all_OBJECTS = $(am_str_replace_all_OBJECTS) +str_replace_all_LDADD = $(LDADD) +am_str_verscmp_OBJECTS = str_verscmp.$(OBJEXT) +str_verscmp_OBJECTS = $(am_str_verscmp_OBJECTS) +str_verscmp_LDADD = $(LDADD) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/filevercmp.Po \ + ./$(DEPDIR)/parse_integer.Po ./$(DEPDIR)/str_replace_all.Po \ + ./$(DEPDIR)/str_verscmp.Po +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(filevercmp_SOURCES) $(parse_integer_SOURCES) \ + $(str_replace_all_SOURCES) $(str_verscmp_SOURCES) +DIST_SOURCES = $(filevercmp_SOURCES) $(parse_integer_SOURCES) \ + $(str_replace_all_SOURCES) $(str_verscmp_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red='[0;31m'; \ + grn='[0;32m'; \ + lgn='[1;32m'; \ + blu='[1;34m'; \ + mgn='[0;35m'; \ + brg='[1m'; \ + std='[m'; \ + fi; \ +} +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ + $(top_srcdir)/config/test-driver +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +COM_ERR_CFLAGS = @COM_ERR_CFLAGS@ +COM_ERR_LIBS = @COM_ERR_LIBS@ +CP1251 = @CP1251@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DOC_LINGUAS = @DOC_LINGUAS@ +DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +DX_CONFIG = @DX_CONFIG@ +DX_DOCDIR = @DX_DOCDIR@ +DX_DOT = @DX_DOT@ +DX_DOXYGEN = @DX_DOXYGEN@ +DX_DVIPS = @DX_DVIPS@ +DX_EGREP = @DX_EGREP@ +DX_ENV = @DX_ENV@ +DX_FLAG_chi = @DX_FLAG_chi@ +DX_FLAG_chm = @DX_FLAG_chm@ +DX_FLAG_doc = @DX_FLAG_doc@ +DX_FLAG_dot = @DX_FLAG_dot@ +DX_FLAG_html = @DX_FLAG_html@ +DX_FLAG_man = @DX_FLAG_man@ +DX_FLAG_pdf = @DX_FLAG_pdf@ +DX_FLAG_ps = @DX_FLAG_ps@ +DX_FLAG_rtf = @DX_FLAG_rtf@ +DX_FLAG_xml = @DX_FLAG_xml@ +DX_HHC = @DX_HHC@ +DX_LATEX = @DX_LATEX@ +DX_MAKEINDEX = @DX_MAKEINDEX@ +DX_PDFLATEX = @DX_PDFLATEX@ +DX_PERL = @DX_PERL@ +DX_PROJECT = @DX_PROJECT@ +E2P_CFLAGS = @E2P_CFLAGS@ +E2P_LIBS = @E2P_LIBS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ETAGS = @ETAGS@ +EXEEXT = @EXEEXT@ +EXT2FS_CFLAGS = @EXT2FS_CFLAGS@ +EXT2FS_LIBS = @EXT2FS_LIBS@ +EXTHELPERSDIR = @EXTHELPERSDIR@ +FGREP = @FGREP@ +FILECMD = @FILECMD@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ +GMODULE_CFLAGS = @GMODULE_CFLAGS@ +GMODULE_LIBS = @GMODULE_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +HAVE_FILECMD = @HAVE_FILECMD@ +HAVE_ZIPINFO = @HAVE_ZIPINFO@ +HAVE_nroff = @HAVE_nroff@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBMC_RELEASE = @LIBMC_RELEASE@ +LIBMC_VERSION = @LIBMC_VERSION@ +LIBOBJS = @LIBOBJS@ +LIBS = @CHECK_LIBS@ $(top_builddir)/lib/libmc.la $(am__append_1) +LIBSSH_CFLAGS = @LIBSSH_CFLAGS@ +LIBSSH_LIBS = @LIBSSH_LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANDOC = @MANDOC@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_DATE = @MAN_DATE@ +MAN_FLAGS = @MAN_FLAGS@ +MAN_VERSION = @MAN_VERSION@ +MCLIBS = @MCLIBS@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = "/lib/strutil" +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCRE_CFLAGS = @PCRE_CFLAGS@ +PCRE_LIBS = @PCRE_LIBS@ +PERL = @PERL@ +PERL_FOR_BUILD = @PERL_FOR_BUILD@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POSUB = @POSUB@ +PYTHON = @PYTHON@ +RANLIB = @RANLIB@ +RUBY = @RUBY@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SLANG_CFLAGS = @SLANG_CFLAGS@ +SLANG_LIBS = @SLANG_LIBS@ +STRIP = @STRIP@ +TESTS_LDFLAGS = @TESTS_LDFLAGS@ +UNZIP = @UNZIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +X11_WWW = @X11_WWW@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +ZIP = @ZIP@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AM_CPPFLAGS = \ + $(GLIB_CFLAGS) \ + -I$(top_srcdir) \ + @CHECK_CFLAGS@ + +parse_integer_SOURCES = \ + parse_integer.c + +str_replace_all_SOURCES = \ + str_replace_all.c + +str_verscmp_SOURCES = \ + str_verscmp.c + +filevercmp_SOURCES = \ + filevercmp.c + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/lib/strutil/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu tests/lib/strutil/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +filevercmp$(EXEEXT): $(filevercmp_OBJECTS) $(filevercmp_DEPENDENCIES) $(EXTRA_filevercmp_DEPENDENCIES) + @rm -f filevercmp$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(filevercmp_OBJECTS) $(filevercmp_LDADD) $(LIBS) + +parse_integer$(EXEEXT): $(parse_integer_OBJECTS) $(parse_integer_DEPENDENCIES) $(EXTRA_parse_integer_DEPENDENCIES) + @rm -f parse_integer$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(parse_integer_OBJECTS) $(parse_integer_LDADD) $(LIBS) + +str_replace_all$(EXEEXT): $(str_replace_all_OBJECTS) $(str_replace_all_DEPENDENCIES) $(EXTRA_str_replace_all_DEPENDENCIES) + @rm -f str_replace_all$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(str_replace_all_OBJECTS) $(str_replace_all_LDADD) $(LIBS) + +str_verscmp$(EXEEXT): $(str_verscmp_OBJECTS) $(str_verscmp_DEPENDENCIES) $(EXTRA_str_verscmp_DEPENDENCIES) + @rm -f str_verscmp$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(str_verscmp_OBJECTS) $(str_verscmp_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filevercmp.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse_integer.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/str_replace_all.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/str_verscmp.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + elif test -n "$$redo_logs"; then \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: $(check_PROGRAMS) + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +parse_integer.log: parse_integer$(EXEEXT) + @p='parse_integer$(EXEEXT)'; \ + b='parse_integer'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +str_replace_all.log: str_replace_all$(EXEEXT) + @p='str_replace_all$(EXEEXT)'; \ + b='str_replace_all'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +str_verscmp.log: str_verscmp$(EXEEXT) + @p='str_verscmp$(EXEEXT)'; \ + b='str_verscmp'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +filevercmp.log: filevercmp$(EXEEXT) + @p='filevercmp$(EXEEXT)'; \ + b='filevercmp'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/filevercmp.Po + -rm -f ./$(DEPDIR)/parse_integer.Po + -rm -f ./$(DEPDIR)/str_replace_all.Po + -rm -f ./$(DEPDIR)/str_verscmp.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/filevercmp.Po + -rm -f ./$(DEPDIR)/parse_integer.Po + -rm -f ./$(DEPDIR)/str_replace_all.Po + -rm -f ./$(DEPDIR)/str_verscmp.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \ + check-am clean clean-checkPROGRAMS clean-generic clean-libtool \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + recheck tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/tests/lib/strutil/filevercmp.c b/tests/lib/strutil/filevercmp.c new file mode 100644 index 0000000..ba7f775 --- /dev/null +++ b/tests/lib/strutil/filevercmp.c @@ -0,0 +1,399 @@ +/* + lib/strutil - tests for lib/strutil/fileverscmp function. + + Copyright (C) 2019-2023 + Free Software Foundation, Inc. + + Written by: + Andrew Borodin <aborodin@vmail.ru>, 2019 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib/strutil" + +#include "tests/mctest.h" + +#include "lib/strutil.h" +#include "lib/util.h" /* _GL_CMP() */ + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ +} + +/* --------------------------------------------------------------------------------------------- */ + +static int +sign (int n) +{ + return _GL_CMP (n, 0); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* + * Return filevercmp (a, a), checking that a similar result is gotten after replacing all '\1's + * with '\0's and calling filenvercmp with the embedded '\0's. + */ +static int +test_filevercmp (char const *a, char const *b) +{ + int result; + char buffer[BUF_1K]; + size_t alen, blen; + size_t i; + int nresult; + + result = filevercmp (a, b); + + alen = strlen (a); + blen = strlen (b); + + ck_assert_int_le (alen + blen, sizeof (buffer)); + memcpy (buffer, a, alen); + memcpy (buffer + alen, b, blen); + + for (i = 0; i < alen + blen; i++) + if (buffer[i] == '\1') + buffer[i] = '\0'; + + nresult = filenvercmp (buffer, alen, buffer + alen, blen); + ck_assert_int_eq (sign (nresult), sign (result)); + + return result; +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("filevercmp_test_ds1") */ +/* Testcases are taken from Gnulib */ +/* *INDENT-OFF* */ +static const struct filevercmp_test_struct +{ + const char *s1; + const char *s2; + int expected_result; +} filevercmp_test_ds1[] = +{ + { "", "", 0 }, + { "a", "a", 0 }, + { "a", "b", -1 }, + { "b", "a", 1 }, + { "00", "01", -1 }, + { "01", "010", -1 }, + { "9", "10", -1 }, + { "0a", "0", 1 } +}; +/* *INDENT-ON* */ + + +/* @Test(dataSource = "filevercmp_test_ds1") */ +/* *INDENT-OFF* */ +START_TEST (filevercmp_test1) +/* *INDENT-ON* */ +{ + /* given */ + int actual_result; + const struct filevercmp_test_struct *data = &filevercmp_test_ds1[_i]; + + /* when */ + actual_result = filevercmp (data->s1, data->s2); + + /* then */ + ck_assert_int_eq (sign (actual_result), sign (data->expected_result)); +} +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("filevercmp_test_ds2") */ +/* Testcases are taken from Gnulib */ +static const char *filevercmp_test_ds2[] = { + "", + ".", + "..", + ".0", + ".9", + ".A", + ".Z", + ".a~", + ".a", + ".b~", + ".b", + ".z", + ".zz~", + ".zz", + ".zz.~1~", + ".zz.0", + ".\1", + ".\1.txt", + ".\1x", + ".\1x\1", + ".\1.0", + "0", + "9", + "A", + "Z", + "a~", + "a", + "a.b~", + "a.b", + "a.bc~", + "a.bc", + "a+", + "a.", + "a..a", + "a.+", + "b~", + "b", + "gcc-c++-10.fc9.tar.gz", + "gcc-c++-10.fc9.tar.gz.~1~", + "gcc-c++-10.fc9.tar.gz.~2~", + "gcc-c++-10.8.12-0.7rc2.fc9.tar.bz2", + "gcc-c++-10.8.12-0.7rc2.fc9.tar.bz2.~1~", + "glibc-2-0.1.beta1.fc10.rpm", + "glibc-common-5-0.2.beta2.fc9.ebuild", + "glibc-common-5-0.2b.deb", + "glibc-common-11b.ebuild", + "glibc-common-11-0.6rc2.ebuild", + "libstdc++-0.5.8.11-0.7rc2.fc10.tar.gz", + "libstdc++-4a.fc8.tar.gz", + "libstdc++-4.10.4.20040204svn.rpm", + "libstdc++-devel-3.fc8.ebuild", + "libstdc++-devel-3a.fc9.tar.gz", + "libstdc++-devel-8.fc8.deb", + "libstdc++-devel-8.6.2-0.4b.fc8", + "nss_ldap-1-0.2b.fc9.tar.bz2", + "nss_ldap-1-0.6rc2.fc8.tar.gz", + "nss_ldap-1.0-0.1a.tar.gz", + "nss_ldap-10beta1.fc8.tar.gz", + "nss_ldap-10.11.8.6.20040204cvs.fc10.ebuild", + "z", + "zz~", + "zz", + "zz.~1~", + "zz.0", + "zz.0.txt", + "\1", + "\1.txt", + "\1x", + "\1x\1", + "\1.0", + "#\1.b#", + "#.b#" +}; + +const size_t filevercmp_test_ds2_len = G_N_ELEMENTS (filevercmp_test_ds2); + +/* @Test(dataSource = "filevercmp_test_ds2") */ +/* *INDENT-OFF* */ +START_TEST (filevercmp_test2) +/* *INDENT-ON* */ +{ + const char *i = filevercmp_test_ds2[_i]; + size_t _j; + + for (_j = 0; _j < filevercmp_test_ds2_len; _j++) + { + const char *j = filevercmp_test_ds2[_j]; + int result; + + result = test_filevercmp (i, j); + + if (result < 0) + ck_assert_int_lt ((size_t) _i, _j); + else if (result > 0) + ck_assert_int_gt ((size_t) _i, _j); + else + ck_assert_int_eq ((size_t) _i, _j); + } +} +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ + + +/* @DataSource("filevercmp_test_ds3") */ +/* Ticket #3959 */ +static const char *filevercmp_test_ds3[] = { + "application-1.10.tar.gz", + "application-1.10.1.tar.gz" +}; + +const size_t filevercmp_test_ds3_len = G_N_ELEMENTS (filevercmp_test_ds3); + +/* @Test(dataSource = "filevercmp_test_ds3") */ +/* *INDENT-OFF* */ +START_TEST (filevercmp_test3) +/* *INDENT-ON* */ +{ + const char *i = filevercmp_test_ds3[_i]; + size_t _j; + + for (_j = 0; _j < filevercmp_test_ds3_len; _j++) + { + const char *j = filevercmp_test_ds3[_j]; + int result; + + result = filevercmp (i, j); + + if (result < 0) + ck_assert_int_lt ((size_t) _i, _j); + else if (result > 0) + ck_assert_int_gt ((size_t) _i, _j); + else + ck_assert_int_eq ((size_t) _i, _j); + } +} +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ + + +/* @DataSource("filevercmp_test_ds4") */ +/* Ticket #3905 */ +static const char *filevercmp_test_ds4[] = { + "firefox-58.0.1+build1.tar.gz", + "firefox-59.0~b14+build1.tar.gz", + "firefox-59.0.1+build1.tar.gz" +}; + +const size_t filevercmp_test_ds4_len = G_N_ELEMENTS (filevercmp_test_ds4); + +/* @Test(dataSource = "filevercmp_test_ds4") */ +/* *INDENT-OFF* */ +START_TEST (filevercmp_test4) +/* *INDENT-ON* */ +{ + const char *i = filevercmp_test_ds4[_i]; + size_t _j; + + for (_j = 0; _j < filevercmp_test_ds4_len; _j++) + { + const char *j = filevercmp_test_ds4[_j]; + int result; + + result = filevercmp (i, j); + + if (result < 0) + ck_assert_int_lt ((size_t) _i, _j); + else if (result > 0) + ck_assert_int_gt ((size_t) _i, _j); + else + ck_assert_int_eq ((size_t) _i, _j); + } +} +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ + + +/* @DataSource("filevercmp_test_ds5") */ +/* Testcases are taken from Gnulib */ +static const char *filevercmp_test_ds5[] = { + "a", + "a0", + "a0000", + NULL, + "a\1c-27.txt", + "a\1c-027.txt", + "a\1c-00000000000000000000000000000000000000000000000000000027.txt", + NULL, + ".a\1c-27.txt", + ".a\1c-027.txt", + ".a\1c-00000000000000000000000000000000000000000000000000000027.txt", + NULL, + "a\1c-", + "a\1c-0", + "a\1c-00", + NULL, + ".a\1c-", + ".a\1c-0", + ".a\1c-00", + NULL, + "a\1c-0.txt", + "a\1c-00.txt", + NULL, + ".a\1c-1\1.txt", + ".a\1c-001\1.txt", + NULL +}; + +const size_t filevercmp_test_ds5_len = G_N_ELEMENTS (filevercmp_test_ds5); + +/* @Test(dataSource = "filevercmp_test_ds5") */ +/* *INDENT-OFF* */ +START_TEST (filevercmp_test5) +/* *INDENT-ON* */ +{ + size_t ii; + + for (ii = 0; ii < filevercmp_test_ds5_len; ii++) + for (; filevercmp_test_ds5[ii] != NULL; ii++) + { + const char *i = filevercmp_test_ds5[ii]; + size_t jj; + + for (jj = ii; filevercmp_test_ds5[jj] != NULL; jj++) + { + const char *j = filevercmp_test_ds5[jj]; + + ck_assert_int_eq (test_filevercmp (i, j), 0); + ck_assert_int_eq (test_filevercmp (j, i), 0); + } + } +} +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, filevercmp_test1, filevercmp_test_ds1); + tcase_add_loop_test (tc_core, filevercmp_test2, 0, filevercmp_test_ds2_len); + tcase_add_loop_test (tc_core, filevercmp_test3, 0, filevercmp_test_ds3_len); + tcase_add_loop_test (tc_core, filevercmp_test4, 0, filevercmp_test_ds4_len); + tcase_add_test (tc_core, filevercmp_test5); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/strutil/parse_integer.c b/tests/lib/strutil/parse_integer.c new file mode 100644 index 0000000..4e25fa4 --- /dev/null +++ b/tests/lib/strutil/parse_integer.c @@ -0,0 +1,159 @@ +/* + lib/strutil - tests for lib/strutil/parse_integer function. + + Copyright (C) 2013-2023 + Free Software Foundation, Inc. + + Written by: + Andrew Borodin <aborodin@vmail.ru>, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib/strutil" + +#include "tests/mctest.h" + +#include <inttypes.h> + +#include "lib/strutil.h" + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("parse_integer_test_ds") */ +/* *INDENT-OFF* */ +static const struct parse_integer_test_ds +{ + const char *haystack; + uintmax_t expected_result; + gboolean invalid; +} parse_integer_test_ds[] = +{ + { + /* too big */ + "99999999999999999999999999999999999999999999999999999999999999999999", + 0, + TRUE + }, + { + "x", + 0, + TRUE + }, + { + "9x", + 0, + TRUE + }, + { + "1", + 1, + FALSE + }, + { + "-1", + 0, + TRUE + }, + { + "1k", + 1024, + FALSE + }, + { + "1K", + 1024, + FALSE + }, + { + "1M", + 1024 * 1024, + FALSE + }, + { + "1m", + 0, + TRUE + }, + { + "64M", + 64 * 1024 * 1024, + FALSE + }, + { + "1G", + 1 * 1024 * 1024 * 1024, + FALSE + } +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "parse_integer_test_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (parse_integer_test, parse_integer_test_ds) +/* *INDENT-ON* */ +{ + /* given */ + uintmax_t actual_result; + gboolean invalid = FALSE; + + /* when */ + actual_result = parse_integer (data->haystack, &invalid); + + /* then */ + ck_assert_msg (invalid == data->invalid && actual_result == data->expected_result, + "actual ( %" PRIuMAX ") not equal to\nexpected (%" PRIuMAX ")", + actual_result, data->expected_result); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, parse_integer_test, parse_integer_test_ds); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/strutil/str_replace_all.c b/tests/lib/strutil/str_replace_all.c new file mode 100644 index 0000000..1a1cb89 --- /dev/null +++ b/tests/lib/strutil/str_replace_all.c @@ -0,0 +1,193 @@ +/* + lib/strutil - tests for lib/strutil/replace.c:str_replace_all() function. + + Copyright (C) 2013-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib/strutil" + +#include "tests/mctest.h" + +#include "lib/strutil.h" + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ + str_init_strings (NULL); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ + str_uninit_strings (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("str_replace_all_test_ds") */ +/* *INDENT-OFF* */ +static const struct str_replace_all_test_ds +{ + const char *haystack; + const char *needle; + const char *replacement; + const char *expected_result; +} str_replace_all_test_ds[] = +{ + { + /* 0. needle not found*/ + "needle not found", + "blablablabla", + "1234567890", + "needle not found", + }, + { + /* 1. replacement is less rather that needle */ + "some string blablablabla string", + "blablablabla", + "1234", + "some string 1234 string", + }, + { + /* 2. replacement is great rather that needle */ + "some string bla string", + "bla", + "1234567890", + "some string 1234567890 string", + }, + { + /* 3. replace few substrings in a start of string */ + "blabla blabla string", + "blabla", + "111111111", + "111111111 111111111 string", + }, + { + /* 4. replace few substrings in a middle of string */ + "some string blabla str blabla string", + "blabla", + "111111111", + "some string 111111111 str 111111111 string", + }, + { + /* 5. replace few substrings in an end of string */ + "some string blabla str blabla", + "blabla", + "111111111", + "some string 111111111 str 111111111", + }, + { + /* 6. escaped substring */ + "\\blabla blabla", + "blabla", + "111111111", + "blabla 111111111", + }, + { + /* 7. escaped substring */ + "str \\blabla blabla", + "blabla", + "111111111", + "str blabla 111111111", + }, + { + /* 8. escaped substring */ + "str \\\\\\blabla blabla", + "blabla", + "111111111", + "str \\\\blabla 111111111", + }, + { + /* 9. double-escaped substring (actually non-escaped) */ + "\\\\blabla blabla", + "blabla", + "111111111", + "\\\\111111111 111111111", + }, + { + /* 10. partial substring */ + "blablabla", + "blabla", + "111111111", + "111111111bla", + }, + { + /* 11. special symbols */ + "bla bla", + "bla", + "111\t1 1\n1111", + "111\t1 1\n1111 111\t1 1\n1111", + }, + { + /* 12. empty string */ + "", + "blablablabla", + "1234567890", + NULL, + }, +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "str_replace_all_test_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (str_replace_all_test, str_replace_all_test_ds) +/* *INDENT-ON* */ +{ + /* given */ + char *actual_result; + + /* when */ + actual_result = str_replace_all (data->haystack, data->needle, data->replacement); + + /* then */ + mctest_assert_str_eq (actual_result, data->expected_result); + g_free (actual_result); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, str_replace_all_test, str_replace_all_test_ds); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/strutil/str_verscmp.c b/tests/lib/strutil/str_verscmp.c new file mode 100644 index 0000000..df11975 --- /dev/null +++ b/tests/lib/strutil/str_verscmp.c @@ -0,0 +1,136 @@ +/* + lib/strutil - tests for lib/strutil/str_verscmp function. + Testcases are taken from Gnulib. + + Copyright (C) 2019-2023 + Free Software Foundation, Inc. + + Written by: + Andrew Borodin <aborodin@vmail.ru>, 2019 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib/strutil" + +#include "tests/mctest.h" + +#include "lib/strutil.h" +#include "lib/util.h" /* _GL_CMP() */ + +/* --------------------------------------------------------------------------------------------- */ + +/* From glibc bug 9913 */ +static char const a[] = "B0075022800016.gbp.corp.com"; +static char const b[] = "B007502280067.gbp.corp.com"; +static char const c[] = "B007502357019.GBP.CORP.COM"; + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ +} + +/* --------------------------------------------------------------------------------------------- */ + +static int +sign (int n) +{ + return _GL_CMP (n, 0); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("str_verscmp_test_ds") */ +/* *INDENT-OFF* */ +static const struct str_verscmp_test_struct +{ + const char *s1; + const char *s2; + int expected_result; +} str_verscmp_test_ds[] = +{ + { "", "", 0 }, + { "a", "a", 0 }, + { "a", "b", -1 }, + { "b", "a", 1 }, + { "000", "00", -1 }, + { "00", "000", 1 }, + { "a0", "a", 1 }, + { "00", "01", -1 }, + { "01", "010", -1 }, + { "010", "09", -1 }, + { "09", "0", -1 }, + { "9", "10", -1 }, + { "0a", "0", 1 }, + /* From glibc bug 9913 */ + { a, b, -1 }, + { b, c, -1 }, + { a, c, -1 }, + { b, a, 1 }, + { c, b, 1 }, + { c, a, 1 } +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "str_verscmp_test_ds") */ +/* *INDENT-OFF* */ +START_TEST (str_verscmp_test) +/* *INDENT-ON* */ +{ + /* given */ + int actual_result; + const struct str_verscmp_test_struct *data = &str_verscmp_test_ds[_i]; + + /* when */ + actual_result = str_verscmp (data->s1, data->s2); + + /* then */ + ck_assert_int_eq (sign (actual_result), sign (data->expected_result)); +} +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, str_verscmp_test, str_verscmp_test_ds); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/utilunix__mc_pstream_get_string.c b/tests/lib/utilunix__mc_pstream_get_string.c new file mode 100644 index 0000000..db5233e --- /dev/null +++ b/tests/lib/utilunix__mc_pstream_get_string.c @@ -0,0 +1,396 @@ +/* + lib - Read string from mc_pipe_stream + + Copyright (C) 2021-2023 + Free Software Foundation, Inc. + + Written by: + Andrew Borodin <aborodin@vmail.ru>, 2021 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib/util" + +#include "tests/mctest.h" + +#include "lib/util.h" + +/* --------------------------------------------------------------------------------------------- */ + +#define MAX_CHUNKS 8 + +/* --------------------------------------------------------------------------------------------- */ + +static mc_pipe_stream_t stream; + +static char etalon_long_file_list[BUF_1K]; +static size_t etalon_long_file_list_pos; + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ +} + +/* @After */ +static void +teardown (void) +{ +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("data_source") */ +/* *INDENT-OFF* */ +static const struct data_source +{ + /* input */ + const char *buf; /* string to read */ + + /* output */ + int pos[MAX_CHUNKS]; /* ps.pos values */ + const char *str[MAX_CHUNKS]; /* chunks */ + size_t len[MAX_CHUNKS]; /* chunk lengths */ +} +data_source[] = +{ + /* 0 */ + { + .buf = "", + .pos = { 0 }, + .str = { "" }, + .len = { 0 } + }, + /* 1 */ + { + .buf = "\n", + .pos = { 0, 1 }, + .str = { "\n" }, + .len = { 1, 0 } + }, + /* 2 */ + { + .buf = "\\\n", + .pos = { 0, 2 }, + .str = { "\\\n" }, + .len = { 2, 0 } + }, + /* 3 */ + { + .buf = "\\\\\n", + .pos = { 0, 3 }, + .str = { "\\\\\n" }, + .len = { 3, 0 } + }, + /* 4 */ + { + .buf = "\\\\\\\n", + .pos = { 0, 4 }, + .str = { "\\\\\\\n" }, + .len = { 4, 0 } + }, + /* 5 */ + { + .buf = "\\\\\\\\\n", + .pos = { 0, 5 }, + .str = { "\\\\\\\\\n" }, + .len = { 5, 0 } + }, + /* 6 */ + { + .buf = "12345", + .pos = { 0, 5 }, + .str = { "12345" }, + .len = { 5, 0 } + }, + /* 7 */ + { + .buf = "12345\n", + .pos = { 0, 6 }, + .str = { "12345\n" }, + .len = { 6, 0 } + }, + /* 8 */ + { + .buf = "12345\\\n", + .pos = { 0, 7 }, + .str = { "12345\\\n" }, + .len = { 7, 0 } + }, + /* 9 */ + { + .buf = "12345\\\\\n", + .pos = { 0, 8 }, + .str = { "12345\\\\\n" }, + .len = { 8, 0 } + }, + /* 10 */ + { + .buf = "12345\nabcd", + .pos = { 0, 6, 10 }, + .str = { "12345\n", "abcd" }, + .len = { 6, 4, 0 } + }, + /* 11 */ + { + .buf = "12345\\\nabcd", + .pos = { 0, 11 }, + .str = { "12345\\\nabcd" }, + .len = { 11, 0 } + }, + /* 12 */ + { + .buf = "12345\\\\\nabcd", + .pos = { 0, 8, 12 }, + .str = { "12345\\\\\n", "abcd" }, + .len = { 8, 4, 0 } + }, + /* 13 */ + { + .buf = "12345\\\\\\\nabcd", + .pos = { 0, 13 }, + .str = { "12345\\\\\\\nabcd" }, + .len = { 13, 0 } + }, + /* 14 */ + { + .buf = "12345\\\\\\\\\nabcd", + .pos = { 0, 10, 14 }, + .str = { "12345\\\\\\\\\n", "abcd" }, + .len = { 10, 4, 0 } + }, + /* 15 */ + { + .buf = "12345\nabcd\n", + .pos = { 0, 6, 11 }, + .str = { "12345\n", "abcd\n" }, + .len = { 6, 5, 0 } + }, + /* 16 */ + { + .buf = "12345\nabcd\n~!@#$%^", + .pos = { 0, 6, 11, 18 }, + .str = { "12345\n", "abcd\n", "~!@#$%^" }, + .len = { 6, 5, 7, 0 } + }, + /* 17 */ + { + .buf = "12345\nabcd\n~!@#$%^\n", + .pos = { 0, 6, 11, 19 }, + .str = { "12345\n", "abcd\n", "~!@#$%^\n" }, + .len = { 6, 5, 8, 0 } + } +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "data_source") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (mc_pstream_get_string_test, data_source) +/* *INDENT-ON* */ +{ + /* given */ + int j = 0; + + /* when */ + memset (&stream, 0, sizeof (stream)); + stream.len = strlen (data->buf); + memmove (&stream.buf, data->buf, stream.len); + + /* then */ + do + { + GString *ret; + + ck_assert_int_eq (stream.pos, data->pos[j]); + + ret = mc_pstream_get_string (&stream); + if (ret == NULL) + break; + + ck_assert_int_eq (ret->len, data->len[j]); + mctest_assert_str_eq (ret->str, data->str[j]); + + g_string_free (ret, TRUE); + + j++; + } + while (TRUE); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +static mc_pipe_t * +test_mc_popen (void) +{ + mc_pipe_t *p; + + p = g_try_new0 (mc_pipe_t, 1); + /* make less than sizeof (etalon_long_file_list) */ + p->out.len = 128; + + etalon_long_file_list_pos = 0; + + return p; +} + +static void +test_mc_pread (mc_pipe_t * p) +{ + size_t len; + + p->out.pos = 0; + + if (etalon_long_file_list_pos >= sizeof (etalon_long_file_list)) + { + etalon_long_file_list_pos = sizeof (etalon_long_file_list); + p->out.len = MC_PIPE_STREAM_EOF; + return; + } + + len = sizeof (etalon_long_file_list) - etalon_long_file_list_pos; + len = MIN (len, (size_t) p->out.len); + memmove (p->out.buf, etalon_long_file_list + etalon_long_file_list_pos, len); + p->out.len = (ssize_t) len; + + etalon_long_file_list_pos += len; +} + +/* *INDENT-OFF* */ +START_TEST (mc_pstream_get_long_file_list_test) +/* *INDENT-ON* */ + +{ + /* given */ + GString *result_long_file_list = NULL; + mc_pipe_t *pip; + GString *remain_file_name = NULL; + + /* when */ + /* fill the list */ + memset (etalon_long_file_list, 'a', sizeof (etalon_long_file_list) - 1); + /* create an \n-separated list */ + etalon_long_file_list[5] = '\n'; + etalon_long_file_list[25] = '\n'; + etalon_long_file_list[50] = '\n'; + etalon_long_file_list[75] = '\n'; + etalon_long_file_list[127] = '\n'; + etalon_long_file_list[200] = '\n'; + etalon_long_file_list[310] = '\n'; + etalon_long_file_list[325] = '\n'; + etalon_long_file_list[360] = '\n'; + etalon_long_file_list[512] = '\n'; + etalon_long_file_list[701] = '\n'; + etalon_long_file_list[725] = '\n'; + etalon_long_file_list[800] = '\n'; + etalon_long_file_list[sizeof (etalon_long_file_list) - 2] = '\n'; + etalon_long_file_list[sizeof (etalon_long_file_list) - 1] = '\0'; + + /* then */ + /* read file list */ + pip = test_mc_popen (); + + while (TRUE) + { + GString *line; + + test_mc_pread (pip); + + if (pip->out.len == MC_PIPE_STREAM_EOF) + break; + + while ((line = mc_pstream_get_string (&pip->out)) != NULL) + { + /* handle an \n-separated file list */ + + if (line->str[line->len - 1] == '\n') + { + /* entire file name or last chunk */ + + g_string_truncate (line, line->len - 1); + + /* join filename chunks */ + if (remain_file_name != NULL) + { + g_string_append_len (remain_file_name, line->str, line->len); + g_string_free (line, TRUE); + line = remain_file_name; + remain_file_name = NULL; + } + } + else + { + /* first or middle chunk of file name */ + if (remain_file_name == NULL) + remain_file_name = line; + else + { + g_string_append_len (remain_file_name, line->str, line->len); + g_string_free (line, TRUE); + } + + line = NULL; + } + + /* collect file names to assemble the result string */ + if (line == NULL) + continue; + + if (result_long_file_list == NULL) + result_long_file_list = line; + else + { + g_string_append_len (result_long_file_list, line->str, line->len); + g_string_free (line, TRUE); + } + + g_string_append_c (result_long_file_list, '\n'); + } + } + + mctest_assert_str_eq (etalon_long_file_list, result_long_file_list->str); + g_string_free (result_long_file_list, TRUE); + +} +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, mc_pstream_get_string_test, data_source); + tcase_add_test (tc_core, mc_pstream_get_long_file_list_test); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/utilunix__my_system-common.c b/tests/lib/utilunix__my_system-common.c new file mode 100644 index 0000000..e639107 --- /dev/null +++ b/tests/lib/utilunix__my_system-common.c @@ -0,0 +1,322 @@ +/* + lib - common code for testing lib/utilinux:my_system() function + + Copyright (C) 2013-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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 <signal.h> +#include <unistd.h> + +#include "lib/vfs/vfs.h" + +/* sighandler_t is GNU extension */ +#ifndef HAVE_SIGHANDLER_T +typedef void (*sighandler_t) (int); +#endif + +/* --------------------------------------------------------------------------------------------- */ + +/* @CapturedValue */ +static sigset_t *sigemptyset_set__captured; +/* @ThenReturnValue */ +static int sigemptyset__return_value = 0; + +/* @Mock */ +int +sigemptyset (sigset_t * set) +{ + sigemptyset_set__captured = set; + return sigemptyset__return_value; +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @CapturedValue */ +static GPtrArray *sigaction_signum__captured = NULL; +/* @CapturedValue */ +static GPtrArray *sigaction_act__captured = NULL; +/* @CapturedValue */ +static GPtrArray *sigaction_oldact__captured = NULL; +/* @ThenReturnValue */ +static int sigaction__return_value = 0; + +/* @Mock */ +int +sigaction (int signum, const struct sigaction *act, struct sigaction *oldact) +{ + int *tmp_signum; + struct sigaction *tmp_act; + + /* store signum */ + tmp_signum = g_new (int, 1); + memcpy (tmp_signum, &signum, sizeof (*tmp_signum)); + if (sigaction_signum__captured != NULL) + g_ptr_array_add (sigaction_signum__captured, tmp_signum); + + /* store act */ + if (act != NULL) + { + tmp_act = g_new (struct sigaction, 1); + memcpy (tmp_act, act, sizeof (*tmp_act)); + } + else + tmp_act = NULL; + if (sigaction_act__captured != NULL) + g_ptr_array_add (sigaction_act__captured, tmp_act); + + /* store oldact */ + if (oldact != NULL) + { + tmp_act = g_new (struct sigaction, 1); + memcpy (tmp_act, oldact, sizeof (*tmp_act)); + } + else + tmp_act = NULL; + if (sigaction_oldact__captured != NULL) + g_ptr_array_add (sigaction_oldact__captured, tmp_act); + + return sigaction__return_value; +} + +static void +sigaction__init (void) +{ + sigaction_signum__captured = g_ptr_array_new_with_free_func (g_free); + sigaction_act__captured = g_ptr_array_new_with_free_func (g_free); + sigaction_oldact__captured = g_ptr_array_new_with_free_func (g_free); +} + +static void +sigaction__deinit (void) +{ + g_ptr_array_free (sigaction_signum__captured, TRUE); + sigaction_signum__captured = NULL; + + g_ptr_array_free (sigaction_act__captured, TRUE); + sigaction_act__captured = NULL; + + g_ptr_array_free (sigaction_oldact__captured, TRUE); + sigaction_oldact__captured = NULL; +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @CapturedValue */ +static GPtrArray *signal_signum__captured; +/* @CapturedValue */ +static GPtrArray *signal_handler__captured; +/* @ThenReturnValue */ +static sighandler_t signal__return_value = NULL; + +/* @Mock */ +sighandler_t +signal (int signum, sighandler_t handler) +{ + int *tmp_signum; + sighandler_t *tmp_handler; + + /* store signum */ + tmp_signum = g_new (int, 1); + memcpy (tmp_signum, &signum, sizeof (*tmp_signum)); + g_ptr_array_add (signal_signum__captured, tmp_signum); + + /* store handler */ + if (handler != SIG_DFL) + { + tmp_handler = g_new (sighandler_t, 1); + memcpy (tmp_handler, handler, sizeof (*tmp_handler)); + } + else + tmp_handler = (void *) SIG_DFL; + g_ptr_array_add (signal_handler__captured, tmp_handler); + + return signal__return_value; +} + +static void +signal__init (void) +{ + signal_signum__captured = g_ptr_array_new_with_free_func (g_free); + signal_handler__captured = g_ptr_array_new_with_free_func (g_free); +} + +static void +signal__deinit (void) +{ + g_ptr_array_free (signal_signum__captured, TRUE); + signal_signum__captured = NULL; + + g_ptr_array_free (signal_handler__captured, TRUE); + signal_handler__captured = NULL; +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @ThenReturnValue */ +static pid_t fork__return_value; + +/* @Mock */ +pid_t +fork (void) +{ + return fork__return_value; +} + +/* --------------------------------------------------------------------------------------------- */ +/* @CapturedValue */ +static int my_exit__status__captured; + +/* @Mock */ +void +my_exit (int status) +{ + my_exit__status__captured = status; +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @CapturedValue */ +static char *execvp__file__captured = NULL; +/* @CapturedValue */ +static GPtrArray *execvp__args__captured; +/* @ThenReturnValue */ +static int execvp__return_value = 0; + +/* @Mock */ +int +execvp (const char *file, char *const argv[]) +{ + char **one_arg; + execvp__file__captured = g_strdup (file); + + for (one_arg = (char **) argv; *one_arg != NULL; one_arg++) + g_ptr_array_add (execvp__args__captured, g_strdup (*one_arg)); + + return execvp__return_value; +} + +static void +execvp__init (void) +{ + execvp__args__captured = g_ptr_array_new_with_free_func (g_free); +} + +static void +execvp__deinit (void) +{ + g_ptr_array_free (execvp__args__captured, TRUE); + execvp__args__captured = NULL; + MC_PTR_FREE (execvp__file__captured); +} + +/* --------------------------------------------------------------------------------------------- */ + +#define VERIFY_SIGACTION__ACT_IGNORED(_pntr) { \ + struct sigaction *_act = (struct sigaction *) _pntr; \ + mctest_assert_ptr_eq (_act->sa_handler, SIG_IGN); \ + ck_assert_int_eq (_act->sa_flags, 0); \ +} + +#define VERIFY_SIGACTION__IS_RESTORED(oldact_idx, act_idx) { \ + struct sigaction *_oldact = (struct sigaction *) g_ptr_array_index(sigaction_oldact__captured, oldact_idx); \ + struct sigaction *_act = (struct sigaction *) g_ptr_array_index(sigaction_act__captured, act_idx); \ + ck_assert_msg (memcmp(_oldact, _act, sizeof(struct sigaction)) == 0, \ + "sigaction(): oldact[%d] should be equals to act[%d]", oldact_idx, act_idx); \ +} + +/* @Verify */ +#define VERIFY_SIGACTION_CALLS() { \ + ck_assert_int_eq (sigaction_signum__captured->len, 6); \ +\ + ck_assert_int_eq (*((int *) g_ptr_array_index(sigaction_signum__captured, 0)), SIGINT); \ + ck_assert_int_eq (*((int *) g_ptr_array_index(sigaction_signum__captured, 1)), SIGQUIT); \ + ck_assert_int_eq (*((int *) g_ptr_array_index(sigaction_signum__captured, 2)), SIGTSTP); \ + ck_assert_int_eq (*((int *) g_ptr_array_index(sigaction_signum__captured, 3)), SIGINT); \ + ck_assert_int_eq (*((int *) g_ptr_array_index(sigaction_signum__captured, 4)), SIGQUIT); \ + ck_assert_int_eq (*((int *) g_ptr_array_index(sigaction_signum__captured, 5)), SIGTSTP); \ +\ + VERIFY_SIGACTION__ACT_IGNORED(g_ptr_array_index(sigaction_act__captured, 0)); \ + VERIFY_SIGACTION__ACT_IGNORED(g_ptr_array_index(sigaction_act__captured, 1)); \ + { \ + struct sigaction *_act = g_ptr_array_index(sigaction_act__captured, 2); \ + ck_assert_msg (memcmp (_act, &startup_handler, sizeof(struct sigaction)) == 0, \ + "The 'act' in third call to sigaction() should be equals to startup_handler"); \ + } \ +\ + VERIFY_SIGACTION__IS_RESTORED (0, 3); \ + VERIFY_SIGACTION__IS_RESTORED (1, 4); \ + VERIFY_SIGACTION__IS_RESTORED (2, 5); \ +\ + ck_assert_msg (g_ptr_array_index(sigaction_oldact__captured, 3) == NULL, \ + "oldact in fourth call to sigaction() should be NULL"); \ + ck_assert_msg (g_ptr_array_index(sigaction_oldact__captured, 4) == NULL, \ + "oldact in fifth call to sigaction() should be NULL"); \ + ck_assert_msg (g_ptr_array_index(sigaction_oldact__captured, 5) == NULL, \ + "oldact in sixth call to sigaction() should be NULL"); \ +} + +/* --------------------------------------------------------------------------------------------- */ + +#define VERIFY_SIGNAL_HANDLER_IS_SIG_DFL(_idx) { \ + sighandler_t *tmp_handler = (sighandler_t *) g_ptr_array_index(signal_handler__captured, _idx);\ + mctest_assert_ptr_eq (tmp_handler, (sighandler_t *) SIG_DFL); \ +} + +/* @Verify */ +#define VERIFY_SIGNAL_CALLS() { \ + ck_assert_int_eq (signal_signum__captured->len, 4); \ + ck_assert_int_eq (*((int *) g_ptr_array_index(signal_signum__captured, 0)), SIGINT); \ + ck_assert_int_eq (*((int *) g_ptr_array_index(signal_signum__captured, 1)), SIGQUIT); \ + ck_assert_int_eq (*((int *) g_ptr_array_index(signal_signum__captured, 2)), SIGTSTP); \ + ck_assert_int_eq (*((int *) g_ptr_array_index(signal_signum__captured, 3)), SIGCHLD); \ + \ + VERIFY_SIGNAL_HANDLER_IS_SIG_DFL (0); \ + VERIFY_SIGNAL_HANDLER_IS_SIG_DFL (1); \ + VERIFY_SIGNAL_HANDLER_IS_SIG_DFL (2); \ + VERIFY_SIGNAL_HANDLER_IS_SIG_DFL (3); \ +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ + signal__return_value = NULL; + + sigaction__init (); + signal__init (); + execvp__init (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ + execvp__deinit (); + signal__deinit (); + sigaction__deinit (); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/utilunix__my_system-fork_child.c b/tests/lib/utilunix__my_system-fork_child.c new file mode 100644 index 0000000..b34217b --- /dev/null +++ b/tests/lib/utilunix__my_system-fork_child.c @@ -0,0 +1,85 @@ +/* + lib - tests lib/utilinux:my_system() function + + Copyright (C) 2013-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib/utilunix" + +#include "tests/mctest.h" + +#include "lib/util.h" +#include "lib/utilunix.h" + +#include "utilunix__my_system-common.c" + +/* --------------------------------------------------------------------------------------------- */ + +/* *INDENT-OFF* */ +START_TEST (fork_child) +/* *INDENT-ON* */ +{ + int actual_value; + /* given */ + fork__return_value = 0; + + /* when */ + actual_value = my_system (0, "/bin/some-command", "some parameter"); + + /* then */ + ck_assert_int_eq (actual_value, 0); + + VERIFY_SIGACTION_CALLS (); + VERIFY_SIGNAL_CALLS (); + + mctest_assert_str_eq (execvp__file__captured, "/bin/some-command"); + ck_assert_int_eq (execvp__args__captured->len, 2); + + mctest_assert_str_eq (g_ptr_array_index (execvp__args__captured, 0), "/bin/some-command"); + mctest_assert_str_eq (g_ptr_array_index (execvp__args__captured, 1), "some parameter"); + + /* All exec* calls is mocked, so call to _exit() function with 127 status code it's a normal situation */ + ck_assert_int_eq (my_exit__status__captured, 127); +} +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + tcase_add_test (tc_core, fork_child); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/utilunix__my_system-fork_child_shell.c b/tests/lib/utilunix__my_system-fork_child_shell.c new file mode 100644 index 0000000..4c062bf --- /dev/null +++ b/tests/lib/utilunix__my_system-fork_child_shell.c @@ -0,0 +1,86 @@ +/* + lib - tests lib/utilinux:my_system() function + + Copyright (C) 2013-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib/utilunix" + +#include "tests/mctest.h" + +#include "lib/util.h" +#include "lib/utilunix.h" + +#include "utilunix__my_system-common.c" + +/* --------------------------------------------------------------------------------------------- */ + +/* *INDENT-OFF* */ +START_TEST (fork_child_as_shell) +/* *INDENT-ON* */ +{ + int actual_value; + /* given */ + fork__return_value = 0; + + /* when */ + actual_value = my_system (EXECUTE_AS_SHELL, "/bin/shell", "some command"); + + /* then */ + ck_assert_int_eq (actual_value, 0); + + VERIFY_SIGACTION_CALLS (); + VERIFY_SIGNAL_CALLS (); + + mctest_assert_str_eq (execvp__file__captured, "/bin/shell"); + ck_assert_int_eq (execvp__args__captured->len, 3); + + mctest_assert_str_eq (g_ptr_array_index (execvp__args__captured, 0), "/bin/shell"); + mctest_assert_str_eq (g_ptr_array_index (execvp__args__captured, 1), "-c"); + mctest_assert_str_eq (g_ptr_array_index (execvp__args__captured, 2), "some command"); + + /* All exec* calls is mocked, so call to _exit() function with 127 status code it's a normal situation */ + ck_assert_int_eq (my_exit__status__captured, 127); +} +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + tcase_add_test (tc_core, fork_child_as_shell); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/utilunix__my_system-fork_fail.c b/tests/lib/utilunix__my_system-fork_fail.c new file mode 100644 index 0000000..638c952 --- /dev/null +++ b/tests/lib/utilunix__my_system-fork_fail.c @@ -0,0 +1,81 @@ +/* + lib - tests lib/utilinux:my_system() function + + Copyright (C) 2013-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib/utilunix" + +#include "tests/mctest.h" + +#include <signal.h> +#include <unistd.h> + +#include "lib/util.h" +#include "lib/utilunix.h" + +#include "utilunix__my_system-common.c" + +/* --------------------------------------------------------------------------------------------- */ + +/* *INDENT-OFF* */ +START_TEST (fork_fail) +/* *INDENT-ON* */ +{ + int actual_value; + + /* given */ + fork__return_value = -1; + + /* when */ + actual_value = my_system (0, NULL, NULL); + + /* then */ + ck_assert_int_eq (actual_value, -1); + + VERIFY_SIGACTION_CALLS (); + + ck_assert_int_eq (signal_signum__captured->len, 0); +} +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + tcase_add_test (tc_core, fork_fail); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/vfs/Makefile.am b/tests/lib/vfs/Makefile.am new file mode 100644 index 0000000..e5e78f8 --- /dev/null +++ b/tests/lib/vfs/Makefile.am @@ -0,0 +1,99 @@ +PACKAGE_STRING = "/lib/vfs" + +AM_CPPFLAGS = \ + -DTEST_SHARE_DIR=\"$(abs_srcdir)\" \ + $(GLIB_CFLAGS) \ + -I$(top_srcdir) \ + -I$(top_srcdir)/lib/vfs \ + @CHECK_CFLAGS@ + +AM_LDFLAGS = @TESTS_LDFLAGS@ + +EXTRA_DIST = mc.charsets + +LIBS = @CHECK_LIBS@ \ + $(top_builddir)/lib/libmc.la + +if ENABLE_MCLIB +LIBS += $(GLIB_LIBS) \ + @E2P_LIBS@ +endif + +TESTS = \ + canonicalize_pathname \ + current_dir \ + path_cmp \ + path_len \ + path_manipulations \ + path_serialize \ + relative_cd \ + tempdir \ + vfs_adjust_stat \ + vfs_parse_ls_lga \ + vfs_path_from_str_flags \ + vfs_path_string_convert \ + vfs_prefix_to_class \ + vfs_setup_cwd \ + vfs_split \ + vfs_s_get_path + +if CHARSET +TESTS += path_recode \ + vfs_get_encoding +endif + +check_PROGRAMS = $(TESTS) + +canonicalize_pathname_SOURCES = \ + canonicalize_pathname.c + +current_dir_SOURCES = \ + current_dir.c + +path_cmp_SOURCES = \ + path_cmp.c + +path_len_SOURCES = \ + path_len.c + +path_manipulations_SOURCES = \ + path_manipulations.c + +path_recode_SOURCES = \ + path_recode.c + +path_serialize_SOURCES = \ + path_serialize.c + +relative_cd_SOURCES = \ + relative_cd.c + +tempdir_SOURCES = \ + tempdir.c + +vfs_adjust_stat_SOURCES = \ + vfs_adjust_stat.c + +vfs_get_encoding_SOURCES = \ + vfs_get_encoding.c + +vfs_setup_cwd_SOURCES = \ + vfs_setup_cwd.c + +vfs_split_SOURCES = \ + vfs_split.c + +vfs_parse_ls_lga_SOURCES = \ + vfs_parse_ls_lga.c + +vfs_prefix_to_class_SOURCES = \ + vfs_prefix_to_class.c + +vfs_path_from_str_flags_SOURCES = \ + vfs_path_from_str_flags.c + +vfs_path_string_convert_SOURCES = \ + vfs_path_string_convert.c + +vfs_s_get_path_SOURCES = \ + vfs_s_get_path.c diff --git a/tests/lib/vfs/Makefile.in b/tests/lib/vfs/Makefile.in new file mode 100644 index 0000000..e88f2af --- /dev/null +++ b/tests/lib/vfs/Makefile.in @@ -0,0 +1,1511 @@ +# Makefile.in generated by automake 1.16.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2021 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@ENABLE_MCLIB_TRUE@am__append_1 = $(GLIB_LIBS) \ +@ENABLE_MCLIB_TRUE@ @E2P_LIBS@ + +TESTS = canonicalize_pathname$(EXEEXT) current_dir$(EXEEXT) \ + path_cmp$(EXEEXT) path_len$(EXEEXT) \ + path_manipulations$(EXEEXT) path_serialize$(EXEEXT) \ + relative_cd$(EXEEXT) tempdir$(EXEEXT) vfs_adjust_stat$(EXEEXT) \ + vfs_parse_ls_lga$(EXEEXT) vfs_path_from_str_flags$(EXEEXT) \ + vfs_path_string_convert$(EXEEXT) vfs_prefix_to_class$(EXEEXT) \ + vfs_setup_cwd$(EXEEXT) vfs_split$(EXEEXT) \ + vfs_s_get_path$(EXEEXT) $(am__EXEEXT_1) +@CHARSET_TRUE@am__append_2 = path_recode \ +@CHARSET_TRUE@ vfs_get_encoding + +check_PROGRAMS = $(am__EXEEXT_2) +subdir = tests/lib/vfs +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/m4.include/gnulib/mode_t.m4 \ + $(top_srcdir)/m4.include/gnulib/stat-size.m4 \ + $(top_srcdir)/m4.include/gnulib/fstypename.m4 \ + $(top_srcdir)/m4.include/gnulib/fsusage.m4 \ + $(top_srcdir)/m4.include/gnulib/mountlist.m4 \ + $(top_srcdir)/m4.include/gnulib/windows-stat-inodes.m4 \ + $(top_srcdir)/m4.include/gnulib/sys_types_h.m4 \ + $(top_srcdir)/m4.include/ax_path_lib_pcre.m4 \ + $(top_srcdir)/m4.include/ax_check_pcre2.m4 \ + $(top_srcdir)/m4.include/dx_doxygen.m4 \ + $(top_srcdir)/m4.include/ax_require_defined.m4 \ + $(top_srcdir)/m4.include/ax_check_compile_flag.m4 \ + $(top_srcdir)/m4.include/ax_append_flag.m4 \ + $(top_srcdir)/m4.include/ax_append_compile_flags.m4 \ + $(top_srcdir)/m4.include/mc-cflags.m4 \ + $(top_srcdir)/m4.include/ax_gcc_func_attribute.m4 \ + $(top_srcdir)/m4.include/mc-check-search-type.m4 \ + $(top_srcdir)/m4.include/mc-get-fs-info.m4 \ + $(top_srcdir)/m4.include/mc-with-x.m4 \ + $(top_srcdir)/m4.include/mc-use-termcap.m4 \ + $(top_srcdir)/m4.include/mc-with-screen.m4 \ + $(top_srcdir)/m4.include/mc-with-screen-ncurses.m4 \ + $(top_srcdir)/m4.include/mc-with-screen-slang.m4 \ + $(top_srcdir)/m4.include/mc-with-internal-edit.m4 \ + $(top_srcdir)/m4.include/mc-subshell.m4 \ + $(top_srcdir)/m4.include/mc-background.m4 \ + $(top_srcdir)/m4.include/mc-ext2fs-attr.m4 \ + $(top_srcdir)/m4.include/mc-glib.m4 \ + $(top_srcdir)/m4.include/mc-vfs.m4 \ + $(top_srcdir)/m4.include/vfs/rpc.m4 \ + $(top_srcdir)/m4.include/vfs/socket.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-extfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-sfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-ftp.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-sftp.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-fish.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-undelfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-tarfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-cpiofs.m4 \ + $(top_srcdir)/m4.include/mc-version.m4 \ + $(top_srcdir)/m4.include/mc-tests.m4 \ + $(top_srcdir)/m4.include/mc-i18n.m4 \ + $(top_srcdir)/m4.include/mc-assert.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +@CHARSET_TRUE@am__EXEEXT_1 = path_recode$(EXEEXT) \ +@CHARSET_TRUE@ vfs_get_encoding$(EXEEXT) +am__EXEEXT_2 = canonicalize_pathname$(EXEEXT) current_dir$(EXEEXT) \ + path_cmp$(EXEEXT) path_len$(EXEEXT) \ + path_manipulations$(EXEEXT) path_serialize$(EXEEXT) \ + relative_cd$(EXEEXT) tempdir$(EXEEXT) vfs_adjust_stat$(EXEEXT) \ + vfs_parse_ls_lga$(EXEEXT) vfs_path_from_str_flags$(EXEEXT) \ + vfs_path_string_convert$(EXEEXT) vfs_prefix_to_class$(EXEEXT) \ + vfs_setup_cwd$(EXEEXT) vfs_split$(EXEEXT) \ + vfs_s_get_path$(EXEEXT) $(am__EXEEXT_1) +am_canonicalize_pathname_OBJECTS = canonicalize_pathname.$(OBJEXT) +canonicalize_pathname_OBJECTS = $(am_canonicalize_pathname_OBJECTS) +canonicalize_pathname_LDADD = $(LDADD) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +am_current_dir_OBJECTS = current_dir.$(OBJEXT) +current_dir_OBJECTS = $(am_current_dir_OBJECTS) +current_dir_LDADD = $(LDADD) +am_path_cmp_OBJECTS = path_cmp.$(OBJEXT) +path_cmp_OBJECTS = $(am_path_cmp_OBJECTS) +path_cmp_LDADD = $(LDADD) +am_path_len_OBJECTS = path_len.$(OBJEXT) +path_len_OBJECTS = $(am_path_len_OBJECTS) +path_len_LDADD = $(LDADD) +am_path_manipulations_OBJECTS = path_manipulations.$(OBJEXT) +path_manipulations_OBJECTS = $(am_path_manipulations_OBJECTS) +path_manipulations_LDADD = $(LDADD) +am_path_recode_OBJECTS = path_recode.$(OBJEXT) +path_recode_OBJECTS = $(am_path_recode_OBJECTS) +path_recode_LDADD = $(LDADD) +am_path_serialize_OBJECTS = path_serialize.$(OBJEXT) +path_serialize_OBJECTS = $(am_path_serialize_OBJECTS) +path_serialize_LDADD = $(LDADD) +am_relative_cd_OBJECTS = relative_cd.$(OBJEXT) +relative_cd_OBJECTS = $(am_relative_cd_OBJECTS) +relative_cd_LDADD = $(LDADD) +am_tempdir_OBJECTS = tempdir.$(OBJEXT) +tempdir_OBJECTS = $(am_tempdir_OBJECTS) +tempdir_LDADD = $(LDADD) +am_vfs_adjust_stat_OBJECTS = vfs_adjust_stat.$(OBJEXT) +vfs_adjust_stat_OBJECTS = $(am_vfs_adjust_stat_OBJECTS) +vfs_adjust_stat_LDADD = $(LDADD) +am_vfs_get_encoding_OBJECTS = vfs_get_encoding.$(OBJEXT) +vfs_get_encoding_OBJECTS = $(am_vfs_get_encoding_OBJECTS) +vfs_get_encoding_LDADD = $(LDADD) +am_vfs_parse_ls_lga_OBJECTS = vfs_parse_ls_lga.$(OBJEXT) +vfs_parse_ls_lga_OBJECTS = $(am_vfs_parse_ls_lga_OBJECTS) +vfs_parse_ls_lga_LDADD = $(LDADD) +am_vfs_path_from_str_flags_OBJECTS = \ + vfs_path_from_str_flags.$(OBJEXT) +vfs_path_from_str_flags_OBJECTS = \ + $(am_vfs_path_from_str_flags_OBJECTS) +vfs_path_from_str_flags_LDADD = $(LDADD) +am_vfs_path_string_convert_OBJECTS = \ + vfs_path_string_convert.$(OBJEXT) +vfs_path_string_convert_OBJECTS = \ + $(am_vfs_path_string_convert_OBJECTS) +vfs_path_string_convert_LDADD = $(LDADD) +am_vfs_prefix_to_class_OBJECTS = vfs_prefix_to_class.$(OBJEXT) +vfs_prefix_to_class_OBJECTS = $(am_vfs_prefix_to_class_OBJECTS) +vfs_prefix_to_class_LDADD = $(LDADD) +am_vfs_s_get_path_OBJECTS = vfs_s_get_path.$(OBJEXT) +vfs_s_get_path_OBJECTS = $(am_vfs_s_get_path_OBJECTS) +vfs_s_get_path_LDADD = $(LDADD) +am_vfs_setup_cwd_OBJECTS = vfs_setup_cwd.$(OBJEXT) +vfs_setup_cwd_OBJECTS = $(am_vfs_setup_cwd_OBJECTS) +vfs_setup_cwd_LDADD = $(LDADD) +am_vfs_split_OBJECTS = vfs_split.$(OBJEXT) +vfs_split_OBJECTS = $(am_vfs_split_OBJECTS) +vfs_split_LDADD = $(LDADD) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/canonicalize_pathname.Po \ + ./$(DEPDIR)/current_dir.Po ./$(DEPDIR)/path_cmp.Po \ + ./$(DEPDIR)/path_len.Po ./$(DEPDIR)/path_manipulations.Po \ + ./$(DEPDIR)/path_recode.Po ./$(DEPDIR)/path_serialize.Po \ + ./$(DEPDIR)/relative_cd.Po ./$(DEPDIR)/tempdir.Po \ + ./$(DEPDIR)/vfs_adjust_stat.Po ./$(DEPDIR)/vfs_get_encoding.Po \ + ./$(DEPDIR)/vfs_parse_ls_lga.Po \ + ./$(DEPDIR)/vfs_path_from_str_flags.Po \ + ./$(DEPDIR)/vfs_path_string_convert.Po \ + ./$(DEPDIR)/vfs_prefix_to_class.Po \ + ./$(DEPDIR)/vfs_s_get_path.Po ./$(DEPDIR)/vfs_setup_cwd.Po \ + ./$(DEPDIR)/vfs_split.Po +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(canonicalize_pathname_SOURCES) $(current_dir_SOURCES) \ + $(path_cmp_SOURCES) $(path_len_SOURCES) \ + $(path_manipulations_SOURCES) $(path_recode_SOURCES) \ + $(path_serialize_SOURCES) $(relative_cd_SOURCES) \ + $(tempdir_SOURCES) $(vfs_adjust_stat_SOURCES) \ + $(vfs_get_encoding_SOURCES) $(vfs_parse_ls_lga_SOURCES) \ + $(vfs_path_from_str_flags_SOURCES) \ + $(vfs_path_string_convert_SOURCES) \ + $(vfs_prefix_to_class_SOURCES) $(vfs_s_get_path_SOURCES) \ + $(vfs_setup_cwd_SOURCES) $(vfs_split_SOURCES) +DIST_SOURCES = $(canonicalize_pathname_SOURCES) $(current_dir_SOURCES) \ + $(path_cmp_SOURCES) $(path_len_SOURCES) \ + $(path_manipulations_SOURCES) $(path_recode_SOURCES) \ + $(path_serialize_SOURCES) $(relative_cd_SOURCES) \ + $(tempdir_SOURCES) $(vfs_adjust_stat_SOURCES) \ + $(vfs_get_encoding_SOURCES) $(vfs_parse_ls_lga_SOURCES) \ + $(vfs_path_from_str_flags_SOURCES) \ + $(vfs_path_string_convert_SOURCES) \ + $(vfs_prefix_to_class_SOURCES) $(vfs_s_get_path_SOURCES) \ + $(vfs_setup_cwd_SOURCES) $(vfs_split_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red='[0;31m'; \ + grn='[0;32m'; \ + lgn='[1;32m'; \ + blu='[1;34m'; \ + mgn='[0;35m'; \ + brg='[1m'; \ + std='[m'; \ + fi; \ +} +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ + $(top_srcdir)/config/test-driver +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +COM_ERR_CFLAGS = @COM_ERR_CFLAGS@ +COM_ERR_LIBS = @COM_ERR_LIBS@ +CP1251 = @CP1251@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DOC_LINGUAS = @DOC_LINGUAS@ +DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +DX_CONFIG = @DX_CONFIG@ +DX_DOCDIR = @DX_DOCDIR@ +DX_DOT = @DX_DOT@ +DX_DOXYGEN = @DX_DOXYGEN@ +DX_DVIPS = @DX_DVIPS@ +DX_EGREP = @DX_EGREP@ +DX_ENV = @DX_ENV@ +DX_FLAG_chi = @DX_FLAG_chi@ +DX_FLAG_chm = @DX_FLAG_chm@ +DX_FLAG_doc = @DX_FLAG_doc@ +DX_FLAG_dot = @DX_FLAG_dot@ +DX_FLAG_html = @DX_FLAG_html@ +DX_FLAG_man = @DX_FLAG_man@ +DX_FLAG_pdf = @DX_FLAG_pdf@ +DX_FLAG_ps = @DX_FLAG_ps@ +DX_FLAG_rtf = @DX_FLAG_rtf@ +DX_FLAG_xml = @DX_FLAG_xml@ +DX_HHC = @DX_HHC@ +DX_LATEX = @DX_LATEX@ +DX_MAKEINDEX = @DX_MAKEINDEX@ +DX_PDFLATEX = @DX_PDFLATEX@ +DX_PERL = @DX_PERL@ +DX_PROJECT = @DX_PROJECT@ +E2P_CFLAGS = @E2P_CFLAGS@ +E2P_LIBS = @E2P_LIBS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ETAGS = @ETAGS@ +EXEEXT = @EXEEXT@ +EXT2FS_CFLAGS = @EXT2FS_CFLAGS@ +EXT2FS_LIBS = @EXT2FS_LIBS@ +EXTHELPERSDIR = @EXTHELPERSDIR@ +FGREP = @FGREP@ +FILECMD = @FILECMD@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ +GMODULE_CFLAGS = @GMODULE_CFLAGS@ +GMODULE_LIBS = @GMODULE_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +HAVE_FILECMD = @HAVE_FILECMD@ +HAVE_ZIPINFO = @HAVE_ZIPINFO@ +HAVE_nroff = @HAVE_nroff@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBMC_RELEASE = @LIBMC_RELEASE@ +LIBMC_VERSION = @LIBMC_VERSION@ +LIBOBJS = @LIBOBJS@ +LIBS = @CHECK_LIBS@ $(top_builddir)/lib/libmc.la $(am__append_1) +LIBSSH_CFLAGS = @LIBSSH_CFLAGS@ +LIBSSH_LIBS = @LIBSSH_LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANDOC = @MANDOC@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_DATE = @MAN_DATE@ +MAN_FLAGS = @MAN_FLAGS@ +MAN_VERSION = @MAN_VERSION@ +MCLIBS = @MCLIBS@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = "/lib/vfs" +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCRE_CFLAGS = @PCRE_CFLAGS@ +PCRE_LIBS = @PCRE_LIBS@ +PERL = @PERL@ +PERL_FOR_BUILD = @PERL_FOR_BUILD@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POSUB = @POSUB@ +PYTHON = @PYTHON@ +RANLIB = @RANLIB@ +RUBY = @RUBY@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SLANG_CFLAGS = @SLANG_CFLAGS@ +SLANG_LIBS = @SLANG_LIBS@ +STRIP = @STRIP@ +TESTS_LDFLAGS = @TESTS_LDFLAGS@ +UNZIP = @UNZIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +X11_WWW = @X11_WWW@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +ZIP = @ZIP@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AM_CPPFLAGS = \ + -DTEST_SHARE_DIR=\"$(abs_srcdir)\" \ + $(GLIB_CFLAGS) \ + -I$(top_srcdir) \ + -I$(top_srcdir)/lib/vfs \ + @CHECK_CFLAGS@ + +AM_LDFLAGS = @TESTS_LDFLAGS@ +EXTRA_DIST = mc.charsets +canonicalize_pathname_SOURCES = \ + canonicalize_pathname.c + +current_dir_SOURCES = \ + current_dir.c + +path_cmp_SOURCES = \ + path_cmp.c + +path_len_SOURCES = \ + path_len.c + +path_manipulations_SOURCES = \ + path_manipulations.c + +path_recode_SOURCES = \ + path_recode.c + +path_serialize_SOURCES = \ + path_serialize.c + +relative_cd_SOURCES = \ + relative_cd.c + +tempdir_SOURCES = \ + tempdir.c + +vfs_adjust_stat_SOURCES = \ + vfs_adjust_stat.c + +vfs_get_encoding_SOURCES = \ + vfs_get_encoding.c + +vfs_setup_cwd_SOURCES = \ + vfs_setup_cwd.c + +vfs_split_SOURCES = \ + vfs_split.c + +vfs_parse_ls_lga_SOURCES = \ + vfs_parse_ls_lga.c + +vfs_prefix_to_class_SOURCES = \ + vfs_prefix_to_class.c + +vfs_path_from_str_flags_SOURCES = \ + vfs_path_from_str_flags.c + +vfs_path_string_convert_SOURCES = \ + vfs_path_string_convert.c + +vfs_s_get_path_SOURCES = \ + vfs_s_get_path.c + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/lib/vfs/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu tests/lib/vfs/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +canonicalize_pathname$(EXEEXT): $(canonicalize_pathname_OBJECTS) $(canonicalize_pathname_DEPENDENCIES) $(EXTRA_canonicalize_pathname_DEPENDENCIES) + @rm -f canonicalize_pathname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(canonicalize_pathname_OBJECTS) $(canonicalize_pathname_LDADD) $(LIBS) + +current_dir$(EXEEXT): $(current_dir_OBJECTS) $(current_dir_DEPENDENCIES) $(EXTRA_current_dir_DEPENDENCIES) + @rm -f current_dir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(current_dir_OBJECTS) $(current_dir_LDADD) $(LIBS) + +path_cmp$(EXEEXT): $(path_cmp_OBJECTS) $(path_cmp_DEPENDENCIES) $(EXTRA_path_cmp_DEPENDENCIES) + @rm -f path_cmp$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(path_cmp_OBJECTS) $(path_cmp_LDADD) $(LIBS) + +path_len$(EXEEXT): $(path_len_OBJECTS) $(path_len_DEPENDENCIES) $(EXTRA_path_len_DEPENDENCIES) + @rm -f path_len$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(path_len_OBJECTS) $(path_len_LDADD) $(LIBS) + +path_manipulations$(EXEEXT): $(path_manipulations_OBJECTS) $(path_manipulations_DEPENDENCIES) $(EXTRA_path_manipulations_DEPENDENCIES) + @rm -f path_manipulations$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(path_manipulations_OBJECTS) $(path_manipulations_LDADD) $(LIBS) + +path_recode$(EXEEXT): $(path_recode_OBJECTS) $(path_recode_DEPENDENCIES) $(EXTRA_path_recode_DEPENDENCIES) + @rm -f path_recode$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(path_recode_OBJECTS) $(path_recode_LDADD) $(LIBS) + +path_serialize$(EXEEXT): $(path_serialize_OBJECTS) $(path_serialize_DEPENDENCIES) $(EXTRA_path_serialize_DEPENDENCIES) + @rm -f path_serialize$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(path_serialize_OBJECTS) $(path_serialize_LDADD) $(LIBS) + +relative_cd$(EXEEXT): $(relative_cd_OBJECTS) $(relative_cd_DEPENDENCIES) $(EXTRA_relative_cd_DEPENDENCIES) + @rm -f relative_cd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(relative_cd_OBJECTS) $(relative_cd_LDADD) $(LIBS) + +tempdir$(EXEEXT): $(tempdir_OBJECTS) $(tempdir_DEPENDENCIES) $(EXTRA_tempdir_DEPENDENCIES) + @rm -f tempdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(tempdir_OBJECTS) $(tempdir_LDADD) $(LIBS) + +vfs_adjust_stat$(EXEEXT): $(vfs_adjust_stat_OBJECTS) $(vfs_adjust_stat_DEPENDENCIES) $(EXTRA_vfs_adjust_stat_DEPENDENCIES) + @rm -f vfs_adjust_stat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vfs_adjust_stat_OBJECTS) $(vfs_adjust_stat_LDADD) $(LIBS) + +vfs_get_encoding$(EXEEXT): $(vfs_get_encoding_OBJECTS) $(vfs_get_encoding_DEPENDENCIES) $(EXTRA_vfs_get_encoding_DEPENDENCIES) + @rm -f vfs_get_encoding$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vfs_get_encoding_OBJECTS) $(vfs_get_encoding_LDADD) $(LIBS) + +vfs_parse_ls_lga$(EXEEXT): $(vfs_parse_ls_lga_OBJECTS) $(vfs_parse_ls_lga_DEPENDENCIES) $(EXTRA_vfs_parse_ls_lga_DEPENDENCIES) + @rm -f vfs_parse_ls_lga$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vfs_parse_ls_lga_OBJECTS) $(vfs_parse_ls_lga_LDADD) $(LIBS) + +vfs_path_from_str_flags$(EXEEXT): $(vfs_path_from_str_flags_OBJECTS) $(vfs_path_from_str_flags_DEPENDENCIES) $(EXTRA_vfs_path_from_str_flags_DEPENDENCIES) + @rm -f vfs_path_from_str_flags$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vfs_path_from_str_flags_OBJECTS) $(vfs_path_from_str_flags_LDADD) $(LIBS) + +vfs_path_string_convert$(EXEEXT): $(vfs_path_string_convert_OBJECTS) $(vfs_path_string_convert_DEPENDENCIES) $(EXTRA_vfs_path_string_convert_DEPENDENCIES) + @rm -f vfs_path_string_convert$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vfs_path_string_convert_OBJECTS) $(vfs_path_string_convert_LDADD) $(LIBS) + +vfs_prefix_to_class$(EXEEXT): $(vfs_prefix_to_class_OBJECTS) $(vfs_prefix_to_class_DEPENDENCIES) $(EXTRA_vfs_prefix_to_class_DEPENDENCIES) + @rm -f vfs_prefix_to_class$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vfs_prefix_to_class_OBJECTS) $(vfs_prefix_to_class_LDADD) $(LIBS) + +vfs_s_get_path$(EXEEXT): $(vfs_s_get_path_OBJECTS) $(vfs_s_get_path_DEPENDENCIES) $(EXTRA_vfs_s_get_path_DEPENDENCIES) + @rm -f vfs_s_get_path$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vfs_s_get_path_OBJECTS) $(vfs_s_get_path_LDADD) $(LIBS) + +vfs_setup_cwd$(EXEEXT): $(vfs_setup_cwd_OBJECTS) $(vfs_setup_cwd_DEPENDENCIES) $(EXTRA_vfs_setup_cwd_DEPENDENCIES) + @rm -f vfs_setup_cwd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vfs_setup_cwd_OBJECTS) $(vfs_setup_cwd_LDADD) $(LIBS) + +vfs_split$(EXEEXT): $(vfs_split_OBJECTS) $(vfs_split_DEPENDENCIES) $(EXTRA_vfs_split_DEPENDENCIES) + @rm -f vfs_split$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vfs_split_OBJECTS) $(vfs_split_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/canonicalize_pathname.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/current_dir.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/path_cmp.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/path_len.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/path_manipulations.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/path_recode.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/path_serialize.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/relative_cd.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tempdir.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vfs_adjust_stat.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vfs_get_encoding.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vfs_parse_ls_lga.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vfs_path_from_str_flags.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vfs_path_string_convert.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vfs_prefix_to_class.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vfs_s_get_path.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vfs_setup_cwd.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vfs_split.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + elif test -n "$$redo_logs"; then \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: $(check_PROGRAMS) + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +canonicalize_pathname.log: canonicalize_pathname$(EXEEXT) + @p='canonicalize_pathname$(EXEEXT)'; \ + b='canonicalize_pathname'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +current_dir.log: current_dir$(EXEEXT) + @p='current_dir$(EXEEXT)'; \ + b='current_dir'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +path_cmp.log: path_cmp$(EXEEXT) + @p='path_cmp$(EXEEXT)'; \ + b='path_cmp'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +path_len.log: path_len$(EXEEXT) + @p='path_len$(EXEEXT)'; \ + b='path_len'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +path_manipulations.log: path_manipulations$(EXEEXT) + @p='path_manipulations$(EXEEXT)'; \ + b='path_manipulations'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +path_serialize.log: path_serialize$(EXEEXT) + @p='path_serialize$(EXEEXT)'; \ + b='path_serialize'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +relative_cd.log: relative_cd$(EXEEXT) + @p='relative_cd$(EXEEXT)'; \ + b='relative_cd'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tempdir.log: tempdir$(EXEEXT) + @p='tempdir$(EXEEXT)'; \ + b='tempdir'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +vfs_adjust_stat.log: vfs_adjust_stat$(EXEEXT) + @p='vfs_adjust_stat$(EXEEXT)'; \ + b='vfs_adjust_stat'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +vfs_parse_ls_lga.log: vfs_parse_ls_lga$(EXEEXT) + @p='vfs_parse_ls_lga$(EXEEXT)'; \ + b='vfs_parse_ls_lga'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +vfs_path_from_str_flags.log: vfs_path_from_str_flags$(EXEEXT) + @p='vfs_path_from_str_flags$(EXEEXT)'; \ + b='vfs_path_from_str_flags'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +vfs_path_string_convert.log: vfs_path_string_convert$(EXEEXT) + @p='vfs_path_string_convert$(EXEEXT)'; \ + b='vfs_path_string_convert'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +vfs_prefix_to_class.log: vfs_prefix_to_class$(EXEEXT) + @p='vfs_prefix_to_class$(EXEEXT)'; \ + b='vfs_prefix_to_class'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +vfs_setup_cwd.log: vfs_setup_cwd$(EXEEXT) + @p='vfs_setup_cwd$(EXEEXT)'; \ + b='vfs_setup_cwd'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +vfs_split.log: vfs_split$(EXEEXT) + @p='vfs_split$(EXEEXT)'; \ + b='vfs_split'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +vfs_s_get_path.log: vfs_s_get_path$(EXEEXT) + @p='vfs_s_get_path$(EXEEXT)'; \ + b='vfs_s_get_path'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +path_recode.log: path_recode$(EXEEXT) + @p='path_recode$(EXEEXT)'; \ + b='path_recode'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +vfs_get_encoding.log: vfs_get_encoding$(EXEEXT) + @p='vfs_get_encoding$(EXEEXT)'; \ + b='vfs_get_encoding'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/canonicalize_pathname.Po + -rm -f ./$(DEPDIR)/current_dir.Po + -rm -f ./$(DEPDIR)/path_cmp.Po + -rm -f ./$(DEPDIR)/path_len.Po + -rm -f ./$(DEPDIR)/path_manipulations.Po + -rm -f ./$(DEPDIR)/path_recode.Po + -rm -f ./$(DEPDIR)/path_serialize.Po + -rm -f ./$(DEPDIR)/relative_cd.Po + -rm -f ./$(DEPDIR)/tempdir.Po + -rm -f ./$(DEPDIR)/vfs_adjust_stat.Po + -rm -f ./$(DEPDIR)/vfs_get_encoding.Po + -rm -f ./$(DEPDIR)/vfs_parse_ls_lga.Po + -rm -f ./$(DEPDIR)/vfs_path_from_str_flags.Po + -rm -f ./$(DEPDIR)/vfs_path_string_convert.Po + -rm -f ./$(DEPDIR)/vfs_prefix_to_class.Po + -rm -f ./$(DEPDIR)/vfs_s_get_path.Po + -rm -f ./$(DEPDIR)/vfs_setup_cwd.Po + -rm -f ./$(DEPDIR)/vfs_split.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/canonicalize_pathname.Po + -rm -f ./$(DEPDIR)/current_dir.Po + -rm -f ./$(DEPDIR)/path_cmp.Po + -rm -f ./$(DEPDIR)/path_len.Po + -rm -f ./$(DEPDIR)/path_manipulations.Po + -rm -f ./$(DEPDIR)/path_recode.Po + -rm -f ./$(DEPDIR)/path_serialize.Po + -rm -f ./$(DEPDIR)/relative_cd.Po + -rm -f ./$(DEPDIR)/tempdir.Po + -rm -f ./$(DEPDIR)/vfs_adjust_stat.Po + -rm -f ./$(DEPDIR)/vfs_get_encoding.Po + -rm -f ./$(DEPDIR)/vfs_parse_ls_lga.Po + -rm -f ./$(DEPDIR)/vfs_path_from_str_flags.Po + -rm -f ./$(DEPDIR)/vfs_path_string_convert.Po + -rm -f ./$(DEPDIR)/vfs_prefix_to_class.Po + -rm -f ./$(DEPDIR)/vfs_s_get_path.Po + -rm -f ./$(DEPDIR)/vfs_setup_cwd.Po + -rm -f ./$(DEPDIR)/vfs_split.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \ + check-am clean clean-checkPROGRAMS clean-generic clean-libtool \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + recheck tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/tests/lib/vfs/canonicalize_pathname.c b/tests/lib/vfs/canonicalize_pathname.c new file mode 100644 index 0000000..8d890c4 --- /dev/null +++ b/tests/lib/vfs/canonicalize_pathname.c @@ -0,0 +1,203 @@ +/* + lib - canonicalize path + + Copyright (C) 2011-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2011, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib/vfs" + +#include "tests/mctest.h" + +#ifdef HAVE_CHARSET +#include "lib/charsets.h" +#endif + +#include "lib/strutil.h" +#include "lib/util.h" +#include "lib/vfs/xdirentry.h" + +#include "src/vfs/local/local.c" + +static struct vfs_class vfs_test_ops; + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ + str_init_strings (NULL); + + vfs_init (); + vfs_init_localfs (); + vfs_setup_work_dir (); + +#ifdef HAVE_CHARSET + mc_global.sysconfig_dir = (char *) TEST_SHARE_DIR; + load_codepages_list (); +#endif + + vfs_init_class (&vfs_test_ops, "testfs", VFSF_NOLINKS | VFSF_REMOTE, "ftp"); + vfs_register_class (&vfs_test_ops); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ +#ifdef HAVE_CHARSET + free_codepages_list (); +#endif + + vfs_shut (); + + str_uninit_strings (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_canonicalize_path_ds") */ +/* *INDENT-OFF* */ +static const struct test_canonicalize_path_ds +{ + const char *input_path; + const char *expected_path; +} test_canonicalize_path_ds[] = +{ + { /* 0. UNC path */ + "//some_server/ww", + "//some_server/ww" + }, + { /* 1. join slashes */ + "///some_server/////////ww", + "/some_server/ww" + }, + { /* 2. Collapse "/./" -> "/" */ + "//some_server//.///////ww/./././.", + "//some_server/ww" + }, + {/* 3. Remove leading "./" */ + "./some_server/ww", + "some_server/ww" + }, + { /* 4. some/.. -> . */ + "some_server/..", + "." + }, + { /* 5. Collapse "/.." with the previous part of path */ + "/some_server/ww/some_server/../ww/../some_server/..//ww/some_server/ww", + "/some_server/ww/ww/some_server/ww" + }, + { /* 6. URI style */ + "/some_server/ww/ftp://user:pass@host.net/path/", + "/some_server/ww/ftp://user:pass@host.net/path" + }, + { /* 7. */ + "/some_server/ww/ftp://user:pass@host.net/path/../../", + "/some_server/ww" + }, + { /* 8. */ + "ftp://user:pass@host.net/path/../../", + "." + }, + { /* 9. */ + "ftp://user/../../", + ".." + }, +#ifdef HAVE_CHARSET + { /* 10. Supported encoding */ + "/b/#enc:utf-8/../c", + "/c" + }, + { /* 11. Unsupported encoding */ + "/b/#enc:aaaa/../c", + "/b/c" + }, + { /* 12. Supported encoding */ + "/b/../#enc:utf-8/c", + "/#enc:utf-8/c" + }, + { /* 13. Unsupported encoding */ + "/b/../#enc:aaaa/c", + "/#enc:aaaa/c" + }, + { /* 14. Supported encoding */ + "/b/c/#enc:utf-8/..", + "/b" + }, + { /* 15. Unsupported encoding */ + "/b/c/#enc:aaaa/..", + "/b/c" + }, + { /* 16. Supported encoding */ + "/b/c/../#enc:utf-8", + "/b/#enc:utf-8" + }, + { /* 17. Unsupported encoding */ + "/b/c/../#enc:aaaa", + "/b/#enc:aaaa" + }, +#endif /* HAVE_CHARSET */ +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_canonicalize_path_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_canonicalize_path, test_canonicalize_path_ds) +/* *INDENT-ON* */ +{ + /* given */ + char *actual_path; + + actual_path = g_strdup (data->input_path); + + /* when */ + canonicalize_pathname (actual_path); + + /* then */ + mctest_assert_str_eq (actual_path, data->expected_path) g_free (actual_path); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, test_canonicalize_path, test_canonicalize_path_ds); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/vfs/current_dir.c b/tests/lib/vfs/current_dir.c new file mode 100644 index 0000000..3814886 --- /dev/null +++ b/tests/lib/vfs/current_dir.c @@ -0,0 +1,207 @@ +/* + lib/vfs - manipulate with current directory + + Copyright (C) 2011-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2011, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib/vfs" + +#include "tests/mctest.h" + +#include <string.h> /* memset() */ + +#include "lib/global.h" +#include "lib/strutil.h" +#include "lib/vfs/xdirentry.h" + +#include "src/vfs/local/local.c" + +static struct vfs_s_subclass vfs_test_subclass; +static struct vfs_class *vfs_test_ops = VFS_CLASS (&vfs_test_subclass); + +/* --------------------------------------------------------------------------------------------- */ + +/* @Mock */ +static int +test_chdir (const vfs_path_t * vpath) +{ + (void) vpath; + + return 0; +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ + str_init_strings (NULL); + + vfs_init (); + vfs_init_localfs (); + vfs_setup_work_dir (); + + memset (&vfs_test_subclass, 0, sizeof (vfs_test_subclass)); + vfs_init_class (vfs_test_ops, "testfs", VFSF_UNKNOWN, "test"); + vfs_test_ops->chdir = test_chdir; +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ + vfs_shut (); + str_uninit_strings (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_cd_ds") */ +/* *INDENT-OFF* */ +static const struct test_cd_ds +{ + const char *input_initial_path; + const char *input_cd_path; + const vfs_flags_t input_class_flags; + + const char *expected_cd_path; +} test_cd_ds[] = +{ + { /* 0. */ + "/", + "/dev/some.file/test://", + VFSF_NOLINKS, + "/dev/some.file/test://" + }, + { /* 1. */ + "/", + "/dev/some.file/test://bla-bla", + VFSF_NOLINKS, + "/dev/some.file/test://bla-bla" + }, + { /* 2. */ + "/dev/some.file/test://bla-bla", + "..", + VFSF_NOLINKS, + "/dev/some.file/test://" + }, + { /* 3. */ + "/dev/some.file/test://", + "..", + VFSF_NOLINKS, + "/dev" + }, + { /* 4. */ + "/dev", + "..", + VFSF_NOLINKS, + "/" + }, + { /* 5. */ + "/", + "..", + VFSF_NOLINKS, + "/" + }, + { /* 6. */ + "/", + "/test://user:pass@host.net/path", + VFSF_NOLINKS | VFSF_REMOTE, + "/test://user:pass@host.net/path" + }, + { /* 7. */ + "/test://user:pass@host.net/path", + "..", + VFSF_NOLINKS | VFSF_REMOTE, + "/test://user:pass@host.net/" + }, + { /* 8. */ + "/test://user:pass@host.net/", + "..", + VFSF_NOLINKS | VFSF_REMOTE, + "/" + }, +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_cd_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_cd, test_cd_ds) +/* *INDENT-ON* */ +{ + /* given */ + vfs_path_t *vpath; + + vfs_test_ops->flags = data->input_class_flags; + vfs_register_class (vfs_test_ops); + + vfs_set_raw_current_dir (vfs_path_from_str (data->input_initial_path)); + + vpath = vfs_path_from_str (data->input_cd_path); + + /* when */ + mc_chdir (vpath); + + /* then */ + { + char *actual_cd_path; + + actual_cd_path = vfs_get_cwd (); + mctest_assert_str_eq (actual_cd_path, data->expected_cd_path); + g_free (actual_cd_path); + } + vfs_path_free (vpath, TRUE); + + vfs_unregister_class (vfs_test_ops); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + char *cwd; + + tc_core = tcase_create ("Core"); + + /* writable directory where check creates temporary files */ + cwd = g_get_current_dir (); + g_setenv ("TEMP", cwd, TRUE); + g_free (cwd); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, test_cd, test_cd_ds); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/vfs/mc.charsets b/tests/lib/vfs/mc.charsets new file mode 100644 index 0000000..f51ee2a --- /dev/null +++ b/tests/lib/vfs/mc.charsets @@ -0,0 +1,5 @@ +ASCII 7-bit ASCII +IBM866 CP 866 +KOI8-R KOI8-R +KOI8-U KOI8-U +UTF-8 UTF-8 diff --git a/tests/lib/vfs/path_cmp.c b/tests/lib/vfs/path_cmp.c new file mode 100644 index 0000000..9df1e0e --- /dev/null +++ b/tests/lib/vfs/path_cmp.c @@ -0,0 +1,254 @@ +/* lib/vfs - vfs_path_t compare functions + + Copyright (C) 2011-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2011, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib/vfs" + +#include "tests/mctest.h" + +#ifdef HAVE_CHARSET +#include "lib/charsets.h" +#endif + +#include "lib/strutil.h" +#include "lib/vfs/xdirentry.h" +#include "lib/vfs/path.h" + +#include "src/vfs/local/local.c" + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ + str_init_strings (NULL); + + vfs_init (); + vfs_init_localfs (); + vfs_setup_work_dir (); + + mc_global.sysconfig_dir = (char *) TEST_SHARE_DIR; +#ifdef HAVE_CHARSET + load_codepages_list (); +#endif +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ +#ifdef HAVE_CHARSET + free_codepages_list (); +#endif + + vfs_shut (); + str_uninit_strings (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_path_equal_ds") */ +/* *INDENT-OFF* */ +static const struct test_path_equal_ds +{ + const char *input_path1; + const char *input_path2; + const gboolean expected_result; +} test_path_equal_ds[] = +{ + { /* 0. */ + NULL, + NULL, + FALSE + }, + { /* 1. */ + NULL, + "/test/path", + FALSE + }, + { /* 2. */ + "/test/path", + NULL, + FALSE + }, + { /* 3. */ + "/test/path", + "/test/path", + TRUE + }, +#ifdef HAVE_CHARSET + { /* 4. */ + "/#enc:KOI8-R/теÑтовый/путь", + "/теÑтовый/путь", + FALSE + }, + { /* 5. */ + "/теÑтовый/путь", + "/#enc:KOI8-R/теÑтовый/путь", + FALSE + }, + { /* 6. */ + "/#enc:KOI8-R/теÑтовый/путь", + "/#enc:KOI8-R/теÑтовый/путь", + TRUE + }, +#endif +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_path_equal_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_path_equal, test_path_equal_ds) +/* *INDENT-ON* */ +{ + /* given */ + vfs_path_t *vpath1, *vpath2; + gboolean actual_result; + + vpath1 = vfs_path_from_str (data->input_path1); + vpath2 = vfs_path_from_str (data->input_path2); + + /* when */ + actual_result = vfs_path_equal (vpath1, vpath2); + + /* then */ + ck_assert_int_eq (actual_result, data->expected_result); + + vfs_path_free (vpath1, TRUE); + vfs_path_free (vpath2, TRUE); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_path_equal_len_ds") */ +/* *INDENT-OFF* */ +static const struct test_path_equal_len_ds +{ + const char *input_path1; + const char *input_path2; + const size_t input_length; + const gboolean expected_result; +} test_path_equal_len_ds[] = +{ + { /* 0. */ + NULL, + NULL, + 0, + FALSE + }, + { /* 1. */ + NULL, + NULL, + 100, + FALSE + }, + { /* 2. */ + NULL, + "/теÑтовый/путь", + 10, + FALSE + }, + { /* 3. */ + "/теÑтовый/путь", + NULL, + 10, + FALSE + }, + { /* 4. */ + "/теÑтовый/путь", + "/теÑтовый/путь", + 10, + TRUE + }, + { /* 5. */ + "/теÑÑ‚/овый/путь", + "/теÑтовый/путь", + 8, + TRUE + }, + { /* 6. */ + "/теÑÑ‚/овый/путь", + "/теÑтовый/путь", + 10, + FALSE + }, + { /* 7. */ + "/теÑтовый/путь", + "/теÑÑ‚/овый/путь", + 10, + FALSE + }, +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_path_equal_len_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_path_equal_len, test_path_equal_len_ds) +/* *INDENT-ON* */ +{ + /* given */ + vfs_path_t *vpath1, *vpath2; + gboolean actual_result; + + vpath1 = vfs_path_from_str (data->input_path1); + vpath2 = vfs_path_from_str (data->input_path2); + + /* when */ + actual_result = vfs_path_equal_len (vpath1, vpath2, data->input_length); + + /* then */ + ck_assert_int_eq (actual_result, data->expected_result); + + vfs_path_free (vpath1, TRUE); + vfs_path_free (vpath2, TRUE); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, test_path_equal, test_path_equal_ds); + mctest_add_parameterized_test (tc_core, test_path_equal_len, test_path_equal_len_ds); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/vfs/path_len.c b/tests/lib/vfs/path_len.c new file mode 100644 index 0000000..cb6a782 --- /dev/null +++ b/tests/lib/vfs/path_len.c @@ -0,0 +1,142 @@ +/* lib/vfs - tests for vfspath_len() function. + + Copyright (C) 2011-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2011, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib/vfs" + +#include "tests/mctest.h" + +#ifdef HAVE_CHARSET +#include "lib/charsets.h" +#endif + +#include "lib/strutil.h" +#include "lib/vfs/xdirentry.h" +#include "lib/vfs/path.h" + +#include "src/vfs/local/local.c" + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ + str_init_strings (NULL); + + vfs_init (); + vfs_init_localfs (); + vfs_setup_work_dir (); + + mc_global.sysconfig_dir = (char *) TEST_SHARE_DIR; +#ifdef HAVE_CHARSET + load_codepages_list (); +#endif +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ +#ifdef HAVE_CHARSET + free_codepages_list (); +#endif + + vfs_shut (); + str_uninit_strings (); +} + +/* --------------------------------------------------------------------------------------------- */ +/* @DataSource("test_path_length_ds") */ +/* *INDENT-OFF* */ +static const struct test_path_length_ds +{ + const char *input_path; + const size_t expected_length; +} test_path_length_ds[] = +{ + { /* 0. */ + NULL, + 0 + }, + { /* 1. */ + "/", + 1 + }, + { /* 2. */ + "/теÑтовый/путь", + 26 + }, +#ifdef HAVE_CHARSET + { /* 3. */ + "/#enc:KOI8-R/теÑтовый/путь", + 38 + }, +#endif /* HAVE_CHARSET */ +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_path_length_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_path_length, test_path_length_ds) +/* *INDENT-ON* */ +{ + /* given */ + vfs_path_t *vpath; + size_t actual_length; + + vpath = vfs_path_from_str (data->input_path); + + /* when */ + actual_length = vfs_path_len (vpath); + + /* then */ + ck_assert_int_eq (actual_length, data->expected_length); + + vfs_path_free (vpath, TRUE); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, test_path_length, test_path_length_ds); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/vfs/path_manipulations.c b/tests/lib/vfs/path_manipulations.c new file mode 100644 index 0000000..9857e82 --- /dev/null +++ b/tests/lib/vfs/path_manipulations.c @@ -0,0 +1,458 @@ +/* lib/vfs - test vfs_path_t manipulation functions + + Copyright (C) 2011-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2011, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib/vfs" + +#include "tests/mctest.h" + +#ifdef HAVE_CHARSET +#include "lib/charsets.h" +#endif + +#include "lib/strutil.h" +#include "lib/vfs/xdirentry.h" +#include "lib/vfs/path.h" + +#include "src/vfs/local/local.c" + + +static struct vfs_class vfs_test_ops1, vfs_test_ops2, vfs_test_ops3; + +/* --------------------------------------------------------------------------------------------- */ + +static void +init_test_classes (void) +{ + vfs_init_class (&vfs_test_ops1, "testfs1", VFSF_NOLINKS | VFSF_REMOTE, "test1"); + vfs_register_class (&vfs_test_ops1); + + vfs_init_class (&vfs_test_ops2, "testfs2", VFSF_UNKNOWN, "test2"); + vfs_register_class (&vfs_test_ops2); + + vfs_init_class (&vfs_test_ops3, "testfs3", VFSF_LOCAL, "test3"); + vfs_register_class (&vfs_test_ops3); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ + str_init_strings (NULL); + + vfs_init (); + vfs_init_localfs (); + vfs_setup_work_dir (); + + init_test_classes (); + + mc_global.sysconfig_dir = (char *) TEST_SHARE_DIR; +#ifdef HAVE_CHARSET + load_codepages_list (); +#endif +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ +#ifdef HAVE_CHARSET + free_codepages_list (); +#endif + + vfs_shut (); + str_uninit_strings (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_vfs_path_tokens_count_ds") */ +/* *INDENT-OFF* */ +static const struct test_vfs_path_tokens_count_ds +{ + const char *input_path; + const vfs_path_flag_t input_flags; + const size_t expected_token_count; +} test_vfs_path_tokens_count_ds[] = +{ + { /* 0. */ + "/", + VPF_NONE, + 0 + }, + { /* 1. */ + "/path", + VPF_NONE, + 1 + }, + { /* 2. */ + "/path1/path2/path3", + VPF_NONE, + 3 + }, + { /* 3. */ + "test3://path1/path2/path3/path4", + VPF_NO_CANON, + 4 + }, + { /* 4. */ + "path1/path2/path3", + VPF_NO_CANON, + 3 + }, + { /* 5. */ + "/path1/path2/path3/", + VPF_NONE, + 3 + }, + { /* 6. */ + "/local/path/test1://user:pass@some.host:12345/bla-bla/some/path/", + VPF_NONE, + 5 + }, +#ifdef HAVE_CHARSET + { /* 7. */ + "/local/path/test1://user:pass@some.host:12345/bla-bla/some/path/" + "test2://#enc:KOI8-R/bla-bla/some/path/test3://111/22/33", + VPF_NONE, + 11 + }, +#endif +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_vfs_path_tokens_count_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_vfs_path_tokens_count, test_vfs_path_tokens_count_ds) +/* *INDENT-ON* */ +{ + /* given */ + size_t tokens_count; + vfs_path_t *vpath; + + vpath = vfs_path_from_str_flags (data->input_path, data->input_flags); + + /* when */ + tokens_count = vfs_path_tokens_count (vpath); + + /* then */ + ck_assert_int_eq (tokens_count, data->expected_token_count); + + vfs_path_free (vpath, TRUE); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_vfs_path_tokens_get_ds") */ +/* *INDENT-OFF* */ +static const struct test_vfs_path_tokens_get_ds +{ + const char *input_path; + const ssize_t input_start_position; + const ssize_t input_length; + + const char *expected_path; +} test_vfs_path_tokens_get_ds[] = +{ + { /* 0. Invalid start position */ + "/", + 2, + 1, + NULL + }, + { /* 1. Invalid negative position */ + "/path", + -3, + 1, + NULL + }, + { /* 2. Count of tokens is zero. Count should be autocorrected */ + "/path", + 0, + 0, + "path" + }, + { /* 3. get 'path2/path3' by 1,2 */ + "/path1/path2/path3/path4", + 1, + 2, + "path2/path3" + }, + { /* 4. get 'path2/path3' by 1,2 from LOCAL VFS */ + "test3://path1/path2/path3/path4", + 1, + 2, + "path2/path3" + }, + { /* 5. get 'path2/path3' by 1,2 from non-LOCAL VFS */ + "test2://path1/path2/path3/path4", + 1, + 2, + "test2://path2/path3" + }, + { /* 6. get 'path2/path3' by 1,2 through non-LOCAL VFS */ + "/path1/path2/test1://user:pass@some.host:12345/path3/path4", + 1, + 2, + "path2/test1://user:pass@some.host:12345/path3" + }, + { /* 7. get 'path2/path3' by 1,2 where path2 it's LOCAL VFS */ + "test3://path1/path2/test2://path3/path4", + 1, + 2, + "path2/test2://path3" + }, + { /* 8. get 'path2/path3' by 1,2 where path3 it's LOCAL VFS */ + "test2://path1/path2/test3://path3/path4", + 1, + 2, + "test2://path2/test3://path3" + }, + { /* 9. get 'path4' by -1,1 */ + "/path1/path2/path3/path4", + -1, + 1, + "path4" + }, + { /* 10. get 'path2/path3/path4' by -3,0 */ + "/path1/path2/path3/path4", + -3, + 0, + "path2/path3/path4" + }, +#ifdef HAVE_CHARSET + { /* 11. get 'path2/path3' by 1,2 from LOCAL VFS with encoding */ + "test3://path1/path2/test3://#enc:KOI8-R/path3/path4", + 1, + 2, + "path2/test3://#enc:KOI8-R/path3" + }, + { /* 12. get 'path2/path3' by 1,2 with encoding */ + "#enc:KOI8-R/path1/path2/path3/path4", + 1, + 2, + "#enc:KOI8-R/path2/path3" + }, +#endif +/* TODO: currently this test don't passed. Probably broken string URI parser + { *//* 13. get 'path2/path3' by 1,2 from LOCAL VFS *//* + + "test3://path1/path2/test2://test3://path3/path4", + 1, + 2, + "path2/path3" + }, +*/ +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_vfs_path_tokens_get_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_vfs_path_tokens_get, test_vfs_path_tokens_get_ds) +/* *INDENT-ON* */ +{ + /* given */ + vfs_path_t *vpath; + char *actual_path; + + vpath = vfs_path_from_str_flags (data->input_path, VPF_NO_CANON); + + /* when */ + actual_path = vfs_path_tokens_get (vpath, data->input_start_position, data->input_length); + + /* then */ + mctest_assert_str_eq (actual_path, data->expected_path); + + g_free (actual_path); + vfs_path_free (vpath, TRUE); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_vfs_path_append_vpath_ds") */ +/* *INDENT-OFF* */ +static const struct test_vfs_path_append_vpath_ds +{ + const char *input_path1; + const char *input_path2; + const int expected_element_count; + const char *expected_path; +} test_vfs_path_append_vpath_ds[] = +{ + { /* 0. */ + "/local/path/test1://user:pass@some.host:12345/bla-bla/some/path/test2://bla-bla/some/path/test3://111/22/33", + "/local/path/test1://user:pass@some.host:12345/bla-bla/some/path/", + 6, + "/local/path/test1://user:pass@some.host:12345/bla-bla/some/path/test2://bla-bla/some/path/test3://111/22/33" + "/local/path/test1://user:pass@some.host:12345/bla-bla/some/path", + }, +#ifdef HAVE_CHARSET + { /* 1. */ + "/local/path/test1://user:pass@some.host:12345/bla-bla/some/path/test2://#enc:KOI8-R/bla-bla/some/path/test3://111/22/33", + "/local/path/test1://user:pass@some.host:12345/bla-bla/some/path/", + 6, + "/local/path/test1://user:pass@some.host:12345/bla-bla/some/path/test2://#enc:KOI8-R/bla-bla/some/path/test3://111/22/33" + "/local/path/test1://user:pass@some.host:12345/bla-bla/some/path", + }, +#endif /* HAVE_CHARSET */ +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_vfs_path_append_vpath_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_vfs_path_append_vpath, test_vfs_path_append_vpath_ds) +/* *INDENT-ON* */ +{ + /* given */ + vfs_path_t *vpath1, *vpath2, *vpath3; + + vpath1 = vfs_path_from_str (data->input_path1); + vpath2 = vfs_path_from_str (data->input_path2); + + /* when */ + vpath3 = vfs_path_append_vpath_new (vpath1, vpath2, NULL); + + /* then */ + ck_assert_int_eq (vfs_path_elements_count (vpath3), data->expected_element_count); + mctest_assert_str_eq (vfs_path_as_str (vpath3), data->expected_path); + + vfs_path_free (vpath1, TRUE); + vfs_path_free (vpath2, TRUE); + vfs_path_free (vpath3, TRUE); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_vfs_path_relative_ds") */ +/* *INDENT-OFF* */ +static const struct test_vfs_path_relative_ds +{ + const char *input_path; + const char *expected_path; + const char *expected_last_path_in_element; +} test_vfs_path_relative_ds[] = +{ + { /* 0. */ + "../bla-bla", + "../bla-bla", + "../bla-bla" + }, + { /* 1. */ + "../path/test1://user:pass@some.host:12345/bla-bla/some/path/", + "../path/test1://user:pass@some.host:12345/bla-bla/some/path/", + "bla-bla/some/path/" + }, +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_vfs_path_relative_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_vfs_path_relative, test_vfs_path_relative_ds) +/* *INDENT-ON* */ +{ + /* given */ + vfs_path_t *vpath; + + /* when */ + + vpath = vfs_path_from_str_flags (data->input_path, VPF_NO_CANON); + + /* then */ + mctest_assert_true (vpath->relative); + mctest_assert_str_eq (vfs_path_get_last_path_str (vpath), data->expected_last_path_in_element); + mctest_assert_str_eq (vfs_path_as_str (vpath), data->expected_path); + + vfs_path_free (vpath, TRUE); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +/* @Test(dataSource = "test_vfs_path_relative_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_vfs_path_relative_clone, test_vfs_path_relative_ds) +/* *INDENT-ON* */ +{ + /* given */ + vfs_path_t *vpath, *cloned_vpath; + + vpath = vfs_path_from_str_flags (data->input_path, VPF_NO_CANON); + + /* when */ + + cloned_vpath = vfs_path_clone (vpath); + + /* then */ + mctest_assert_true (cloned_vpath->relative); + mctest_assert_str_eq (vfs_path_get_last_path_str (cloned_vpath), + data->expected_last_path_in_element); + mctest_assert_str_eq (vfs_path_as_str (cloned_vpath), data->expected_path); + + vfs_path_free (vpath, TRUE); + vfs_path_free (cloned_vpath, TRUE); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, test_vfs_path_tokens_count, + test_vfs_path_tokens_count_ds); + mctest_add_parameterized_test (tc_core, test_vfs_path_tokens_get, test_vfs_path_tokens_get_ds); + mctest_add_parameterized_test (tc_core, test_vfs_path_append_vpath, + test_vfs_path_append_vpath_ds); + mctest_add_parameterized_test (tc_core, test_vfs_path_relative, test_vfs_path_relative_ds); + mctest_add_parameterized_test (tc_core, test_vfs_path_relative_clone, + test_vfs_path_relative_ds); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/vfs/path_recode.c b/tests/lib/vfs/path_recode.c new file mode 100644 index 0000000..da31f1c --- /dev/null +++ b/tests/lib/vfs/path_recode.c @@ -0,0 +1,285 @@ +/* + lib/vfs - vfs_path_t charset recode functions + + Copyright (C) 2011-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2011, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib/vfs" + +#include "tests/mctest.h" + +#include "lib/charsets.h" + +#include "lib/strutil.h" +#include "lib/vfs/xdirentry.h" +#include "lib/vfs/path.h" + +#include "src/vfs/local/local.c" + +/* --------------------------------------------------------------------------------------------- */ + +/* @Mock */ +const char * +mc_config_get_home_dir (void) +{ + return "/mock/home"; +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ +} + +/* --------------------------------------------------------------------------------------------- */ + +static void +test_init_vfs (const char *encoding) +{ + str_init_strings (encoding); + + vfs_init (); + vfs_init_localfs (); + vfs_setup_work_dir (); + + mc_global.sysconfig_dir = (char *) TEST_SHARE_DIR; + + mc_global.sysconfig_dir = (char *) TEST_SHARE_DIR; + load_codepages_list (); +} + +/* --------------------------------------------------------------------------------------------- */ + +static void +test_deinit_vfs (void) +{ + free_codepages_list (); + str_uninit_strings (); + vfs_shut (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_path_recode_ds") */ +/* *INDENT-OFF* */ +static const struct test_path_recode_ds +{ + const char *input_codepage; + const char *input_path; + const char *expected_element_path; + const char *expected_recoded_path; +} test_path_recode_ds[] = +{ + { /* 0. */ + "UTF-8", + "/ÔÅÓÔÏ×ÙÊ/ÐÕÔØ", + "/ÔÅÓÔÏ×ÙÊ/ÐÕÔØ", + "/ÔÅÓÔÏ×ÙÊ/ÐÕÔØ" + }, + { /* 1. */ + "UTF-8", + "/#enc:KOI8-R/теÑтовый/путь", + "/ÔÅÓÔÏ×ÙÊ/ÐÕÔØ", + "/#enc:KOI8-R/теÑтовый/путь" + }, + { /* 2. */ + "KOI8-R", + "/теÑтовый/путь", + "/теÑтовый/путь", + "/теÑтовый/путь" + }, + { /* 3. */ + "KOI8-R", + "/#enc:UTF-8/ÔÅÓÔÏ×ÙÊ/ÐÕÔØ", + "/теÑтовый/путь", + "/#enc:UTF-8/ÔÅÓÔÏ×ÙÊ/ÐÕÔØ" + }, + { /* 4. Test encode info at start */ + "UTF-8", + "#enc:KOI8-R/bla-bla/some/path", + "/bla-bla/some/path", + "/#enc:KOI8-R/bla-bla/some/path" + }, +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_path_recode_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_path_recode, test_path_recode_ds) +/* *INDENT-ON* */ +{ + /* given */ + vfs_path_t *vpath; + const char *element_path; + const char *vpath_str; + + test_init_vfs (data->input_codepage); + + /* when */ + vpath = vfs_path_from_str (data->input_path); + element_path = vfs_path_get_last_path_str (vpath); + + /* then */ + vpath_str = vfs_path_as_str (vpath); + mctest_assert_ptr_ne (vpath, NULL); + mctest_assert_str_eq (element_path, data->expected_element_path); + mctest_assert_str_eq (vpath_str, data->expected_recoded_path); + + vfs_path_free (vpath, TRUE); + test_deinit_vfs (); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + + +/* --------------------------------------------------------------------------------------------- */ + +static struct vfs_class vfs_test_ops1; + +/* @DataSource("test_path_to_str_flags_ds") */ +/* *INDENT-OFF* */ +static const struct test_path_to_str_flags_ds +{ + const char *input_path; + const vfs_path_flag_t input_from_str_flags; + const vfs_path_flag_t input_to_str_flags; + const char *expected_path; +} test_path_to_str_flags_ds[] = +{ + { /* 0. */ + "test1://user:passwd@127.0.0.1", + VPF_NO_CANON, + VPF_STRIP_PASSWORD, + "test1://user@127.0.0.1/" + }, + { /* 1. */ + "/test1://user:passwd@host.name/#enc:KOI8-R/теÑтовый/путь", + VPF_NONE, + VPF_STRIP_PASSWORD, + "/test1://user@host.name/#enc:KOI8-R/теÑтовый/путь" + }, + { /* 2. */ + "/test1://user:passwd@host.name/#enc:KOI8-R/теÑтовый/путь", + VPF_NONE, + VPF_RECODE, + "/test1://user:passwd@host.name/ÔÅÓÔÏ×ÙÊ/ÐÕÔØ" + }, + { /* 3. */ + "/test1://user:passwd@host.name/#enc:KOI8-R/теÑтовый/путь", + VPF_NONE, + VPF_RECODE | VPF_STRIP_PASSWORD, + "/test1://user@host.name/ÔÅÓÔÏ×ÙÊ/ÐÕÔØ" + }, + { /* 4. */ + "/mock/home/test/dir", + VPF_NONE, + VPF_STRIP_HOME, + "~/test/dir" + }, + { /* 5. */ + "/mock/home/test1://user:passwd@host.name/#enc:KOI8-R/теÑтовый/путь", + VPF_NONE, + VPF_STRIP_HOME | VPF_STRIP_PASSWORD, + "~/test1://user@host.name/#enc:KOI8-R/теÑтовый/путь" + }, + { /* 6. */ + "/mock/home/test1://user:passwd@host.name/#enc:KOI8-R/теÑтовый/путь", + VPF_NONE, + VPF_STRIP_HOME | VPF_STRIP_PASSWORD | VPF_HIDE_CHARSET, + "~/test1://user@host.name/теÑтовый/путь" + }, + { /* 7. */ + "/mock/home/test1://user:passwd@host.name/#enc:KOI8-R/теÑтовый/путь", + VPF_NONE, + VPF_STRIP_HOME | VPF_RECODE, + "~/test1://user:passwd@host.name/ÔÅÓÔÏ×ÙÊ/ÐÕÔØ" + }, + { /* 8. */ + "/mock/home/test1://user:passwd@host.name/#enc:KOI8-R/теÑтовый/путь", + VPF_NONE, + VPF_STRIP_HOME | VPF_RECODE | VPF_STRIP_PASSWORD, + "~/test1://user@host.name/ÔÅÓÔÏ×ÙÊ/ÐÕÔØ" + }, +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_path_to_str_flags_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_path_to_str_flags, test_path_to_str_flags_ds) +/* *INDENT-ON* */ +{ + /* given */ + vfs_path_t *vpath; + char *str_path; + + test_init_vfs ("UTF-8"); + + vfs_init_class (&vfs_test_ops1, "testfs1", VFSF_NOLINKS | VFSF_REMOTE, "test1"); + vfs_register_class (&vfs_test_ops1); + + /* when */ + + vpath = vfs_path_from_str_flags (data->input_path, data->input_from_str_flags); + str_path = vfs_path_to_str_flags (vpath, 0, data->input_to_str_flags); + + /* then */ + mctest_assert_str_eq (str_path, data->expected_path); + + g_free (str_path); + vfs_path_free (vpath, TRUE); + test_deinit_vfs (); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, test_path_recode, test_path_recode_ds); + mctest_add_parameterized_test (tc_core, test_path_to_str_flags, test_path_to_str_flags_ds); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/vfs/path_serialize.c b/tests/lib/vfs/path_serialize.c new file mode 100644 index 0000000..a56db8d --- /dev/null +++ b/tests/lib/vfs/path_serialize.c @@ -0,0 +1,203 @@ +/* + lib/vfs - vfs_path_t serialize/deserialize functions + + Copyright (C) 2011-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2011, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib/vfs" + +#include "tests/mctest.h" + +#ifdef HAVE_CHARSET +#include "lib/charsets.h" +#endif + +#include "lib/strutil.h" +#include "lib/vfs/xdirentry.h" +#include "lib/vfs/path.h" + +#include "src/vfs/local/local.c" + +static struct vfs_class vfs_test_ops1, vfs_test_ops2, vfs_test_ops3; + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ + str_init_strings (NULL); + + vfs_init (); + vfs_init_localfs (); + vfs_setup_work_dir (); + + vfs_init_class (&vfs_test_ops1, "testfs1", VFSF_NOLINKS | VFSF_REMOTE, "test1"); + vfs_register_class (&vfs_test_ops1); + + vfs_init_class (&vfs_test_ops2, "testfs2", VFSF_UNKNOWN, "test2"); + vfs_register_class (&vfs_test_ops2); + + vfs_init_class (&vfs_test_ops3, "testfs3", VFSF_UNKNOWN, "test3"); + vfs_register_class (&vfs_test_ops3); + + mc_global.sysconfig_dir = (char *) TEST_SHARE_DIR; +#ifdef HAVE_CHARSET + load_codepages_list (); +#endif +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ +#ifdef HAVE_CHARSET + free_codepages_list (); +#endif + + vfs_shut (); + str_uninit_strings (); +} + +/* --------------------------------------------------------------------------------------------- */ + +#ifdef HAVE_CHARSET +#define ETALON_PATH_STR "/local/path/#test1:user:pass@some.host:12345/bla-bla/some/path/#test2/#enc:KOI8-R/bla-bla/some/path#test3/111/22/33" +#define ETALON_PATH_URL_STR "/local/path/test1://user:pass@some.host:12345/bla-bla/some/path/test2://#enc:KOI8-R/bla-bla/some/path/test3://111/22/33" +#define ETALON_SERIALIZED_PATH \ + "g14:path-element-0" \ + "p4:pathv12:/local/path/" \ + "p10:class-namev7:localfs" \ + "g14:path-element-1" \ + "p4:pathv18:bla-bla/some/path/" \ + "p10:class-namev7:testfs1" \ + "p10:vfs_prefixv5:test1" \ + "p4:userv4:user" \ + "p8:passwordv4:pass" \ + "p4:hostv9:some.host" \ + "p4:portv5:12345" \ + "g14:path-element-2" \ + "p4:pathv17:bla-bla/some/path" \ + "p10:class-namev7:testfs2" \ + "p8:encodingv6:KOI8-R" \ + "p10:vfs_prefixv5:test2" \ + "g14:path-element-3" \ + "p4:pathv9:111/22/33" \ + "p10:class-namev7:testfs3" \ + "p10:vfs_prefixv5:test3" +#else +#define ETALON_PATH_STR "/local/path/#test1:user:pass@some.host:12345/bla-bla/some/path/#test2/bla-bla/some/path#test3/111/22/33" +#define ETALON_PATH_URL_STR "/local/path/test1://user:pass@some.host:12345/bla-bla/some/path/test2://bla-bla/some/path/test3://111/22/33" +#define ETALON_SERIALIZED_PATH \ + "g14:path-element-0" \ + "p4:pathv12:/local/path/" \ + "p10:class-namev7:localfs" \ + "g14:path-element-1" \ + "p4:pathv18:bla-bla/some/path/" \ + "p10:class-namev7:testfs1" \ + "p10:vfs_prefixv5:test1" \ + "p4:userv4:user" \ + "p8:passwordv4:pass" \ + "p4:hostv9:some.host" \ + "p4:portv5:12345" \ + "g14:path-element-2" \ + "p4:pathv17:bla-bla/some/path" \ + "p10:class-namev7:testfs2" \ + "p10:vfs_prefixv5:test2" \ + "g14:path-element-3" \ + "p4:pathv9:111/22/33" \ + "p10:class-namev7:testfs3" \ + "p10:vfs_prefixv5:test3" +#endif + +/* *INDENT-OFF* */ +START_TEST (test_path_serialize) +/* *INDENT-ON* */ +{ + /* given */ + vfs_path_t *vpath; + char *serialized_vpath; + GError *error = NULL; + + /* when */ + vpath = vfs_path_from_str_flags (ETALON_PATH_STR, VPF_USE_DEPRECATED_PARSER); + serialized_vpath = vfs_path_serialize (vpath, &error); + + vfs_path_free (vpath, TRUE); + + if (error != NULL) + g_error_free (error); + + /* then */ + mctest_assert_ptr_ne (serialized_vpath, NULL); + mctest_assert_str_eq (serialized_vpath, ETALON_SERIALIZED_PATH); +} +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +/* *INDENT-OFF* */ +START_TEST (test_path_deserialize) +/* *INDENT-ON* */ +{ + /* given */ + vfs_path_t *vpath; + GError *error = NULL; + + /* when */ + vpath = vfs_path_deserialize (ETALON_SERIALIZED_PATH, &error); + + /* then */ + mctest_assert_ptr_ne (vpath, NULL); + mctest_assert_str_eq (vfs_path_as_str (vpath), ETALON_PATH_URL_STR); + + vfs_path_free (vpath, TRUE); + +} +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + tcase_add_test (tc_core, test_path_serialize); + tcase_add_test (tc_core, test_path_deserialize); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/vfs/relative_cd.c b/tests/lib/vfs/relative_cd.c new file mode 100644 index 0000000..8eaa1ff --- /dev/null +++ b/tests/lib/vfs/relative_cd.c @@ -0,0 +1,220 @@ +/* lib/vfs - test vfs_path_t manipulation functions + + Copyright (C) 2011-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2011, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib/vfs" + +#include "tests/mctest.h" + +#include <string.h> /* memset() */ + +#include "lib/strutil.h" +#include "lib/vfs/xdirentry.h" +#include "lib/vfs/path.h" + +#include "src/vfs/local/local.c" + + +static struct vfs_s_subclass vfs_test_subclass1; +static struct vfs_class *vfs_test_ops1 = VFS_CLASS (&vfs_test_subclass1); + +static int test_chdir (const vfs_path_t * vpath); + +/* --------------------------------------------------------------------------------------------- */ + +/* @CapturedValue */ +static vfs_path_t *test_chdir__vpath__captured; +/* @ThenReturnValue */ +static int test_chdir__return_value; + +/* @Mock */ +static int +test_chdir (const vfs_path_t * vpath) +{ + test_chdir__vpath__captured = vfs_path_clone (vpath); + return test_chdir__return_value; +} + +static void +test_chdir__init (void) +{ + test_chdir__vpath__captured = NULL; +} + +static void +test_chdir__deinit (void) +{ + vfs_path_free (test_chdir__vpath__captured, TRUE); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ + str_init_strings (NULL); + + vfs_init (); + vfs_init_localfs (); + vfs_setup_work_dir (); + + memset (&vfs_test_subclass1, 0, sizeof (vfs_test_subclass1)); + vfs_init_class (vfs_test_ops1, "testfs1", VFSF_NOLINKS | VFSF_REMOTE, "test1"); + vfs_test_ops1->chdir = test_chdir; + vfs_register_class (vfs_test_ops1); + + mc_global.sysconfig_dir = (char *) TEST_SHARE_DIR; + + vfs_local_ops->chdir = test_chdir; + + test_chdir__init (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ + test_chdir__deinit (); + + vfs_shut (); + str_uninit_strings (); +} + +/* --------------------------------------------------------------------------------------------- */ +/* @DataSource("test_relative_cd_ds") */ +/* *INDENT-OFF* */ +static const struct test_relative_cd_ds +{ + const char *input_string; + const vfs_path_flag_t input_flags; + const char *expected_element_path; +} test_relative_cd_ds[] = +{ + { /* 0. */ + "/test1://user:pass@some.host:12345/path/to/dir", + VPF_NONE, + "path/to/dir" + }, + { /* 1. */ + "some-non-exists-dir", + VPF_NO_CANON, + "some-non-exists-dir" + }, +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_relative_cd_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_relative_cd, test_relative_cd_ds) +/* *INDENT-ON* */ +{ + /* given */ + vfs_path_t *vpath; + int actual_result; + + test_chdir__return_value = 0; + + vpath = vfs_path_from_str_flags (data->input_string, data->input_flags); + + /* when */ + actual_result = mc_chdir (vpath); + + /* then */ + { + const char *element_path; + + ck_assert_int_eq (actual_result, 0); + element_path = vfs_path_get_last_path_str (vpath); + mctest_assert_str_eq (element_path, data->expected_element_path); + vfs_path_free (vpath, TRUE); + } +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +/* Relative to panel_correct_path_to_show() */ + +/* @Test */ +/* *INDENT-OFF* */ +START_TEST (test_vpath_to_str_filter) +/* *INDENT-ON* */ +{ + /* given */ + vfs_path_t *vpath, *last_vpath; + char *filtered_path; + const vfs_path_element_t *path_element; + + /* when */ + vpath = vfs_path_from_str ("/test1://some.host/dir"); + path_element = vfs_path_element_clone (vfs_path_get_by_index (vpath, -1)); + vfs_path_free (vpath, TRUE); + + last_vpath = vfs_path_new (TRUE); + + vfs_path_add_element (last_vpath, path_element); + + filtered_path = vfs_path_to_str_flags (last_vpath, 0, + VPF_STRIP_HOME | VPF_STRIP_PASSWORD | VPF_HIDE_CHARSET); + + /* then */ + mctest_assert_str_eq (filtered_path, "test1://some.host/dir"); + + vfs_path_free (last_vpath, TRUE); + g_free (filtered_path); +} +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + char *cwd; + + tc_core = tcase_create ("Core"); + + /* writable directory where check creates temporary files */ + cwd = g_get_current_dir (); + g_setenv ("TEMP", cwd, TRUE); + g_free (cwd); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, test_relative_cd, test_relative_cd_ds); + tcase_add_test (tc_core, test_vpath_to_str_filter); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/vfs/tempdir.c b/tests/lib/vfs/tempdir.c new file mode 100644 index 0000000..7795e9b --- /dev/null +++ b/tests/lib/vfs/tempdir.c @@ -0,0 +1,140 @@ +/* + lib/vfs - manipulations with temp files and dirs + + Copyright (C) 2012-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2012, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib/vfs" + +#include "tests/mctest.h" + +#ifndef HAVE_CHARSET +#define HAVE_CHARSET 1 +#endif + +#include "lib/charsets.h" + +#include "lib/strutil.h" +#include "lib/vfs/xdirentry.h" +#include "lib/vfs/path.h" + +#include "src/vfs/local/local.c" + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ + str_init_strings (NULL); + + vfs_init (); + vfs_init_localfs (); + vfs_setup_work_dir (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ + vfs_shut (); + str_uninit_strings (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @Test */ +/* *INDENT-OFF* */ +START_TEST (test_mc_tmpdir) +/* *INDENT-ON* */ +{ + /* given */ + const char *tmpdir; + const char *env_tmpdir; + + /* when */ + tmpdir = mc_tmpdir (); + env_tmpdir = g_getenv ("MC_TMPDIR"); + + /* then */ + ck_assert_msg (g_file_test (tmpdir, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR), + "\nNo such directory: %s\n", tmpdir); + mctest_assert_str_eq (env_tmpdir, tmpdir); +} +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +/* @Test */ +/* *INDENT-OFF* */ +START_TEST (test_mc_mkstemps) +/* *INDENT-ON* */ +{ + /* given */ + vfs_path_t *pname_vpath = NULL; + char *begin_pname; + int fd; + + /* when */ + fd = mc_mkstemps (&pname_vpath, "mctest-", NULL); + begin_pname = g_build_filename (mc_tmpdir (), "mctest-", (char *) NULL); + + /* then */ + close (fd); + ck_assert_int_ne (fd, -1); + ck_assert_msg (g_file_test + (vfs_path_as_str (pname_vpath), G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR), + "\nNo such file: %s\n", vfs_path_as_str (pname_vpath)); + unlink (vfs_path_as_str (pname_vpath)); + ck_assert_msg (strncmp (vfs_path_as_str (pname_vpath), begin_pname, strlen (begin_pname)) == 0, + "\nstart of %s should be equal to %s\n", vfs_path_as_str (pname_vpath), + begin_pname); + vfs_path_free (pname_vpath, TRUE); +} +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + tcase_add_test (tc_core, test_mc_tmpdir); + tcase_add_test (tc_core, test_mc_mkstemps); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/vfs/vfs_adjust_stat.c b/tests/lib/vfs/vfs_adjust_stat.c new file mode 100644 index 0000000..9fb56ee --- /dev/null +++ b/tests/lib/vfs/vfs_adjust_stat.c @@ -0,0 +1,205 @@ +/* + lib/vfs - test vfs_adjust_stat() functionality + + Copyright (C) 2017-2023 + Free Software Foundation, Inc. + + Written by: + Andrew Borodin <aborodin@vmail.ru>, 2017 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib/vfs" + +#include "tests/mctest.h" + +#include <sys/stat.h> + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_test_vfs_adjust_stat_ds") */ +/* *INDENT-OFF* */ +static const struct test_vfs_adjust_stat_ds +{ + struct stat etalon_stat; +} test_vfs_adjust_stat_ds[] = +{ + /* 0 */ + { + .etalon_stat = + { + .st_size = 0, +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE + .st_blksize = 512, +#endif +#ifdef HAVE_STRUCT_STAT_ST_BLOCKS + .st_blocks = 0 +#endif + } + }, + /* 1 */ + { + .etalon_stat = + { + .st_size = 4096, +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE + .st_blksize = 512, +#endif +#ifdef HAVE_STRUCT_STAT_ST_BLOCKS + .st_blocks = 8 +#endif + } + }, + /* 2 */ + { + .etalon_stat = + { + .st_size = 4096, +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE + .st_blksize = 1024, +#endif +#ifdef HAVE_STRUCT_STAT_ST_BLOCKS + .st_blocks = 8 +#endif + } + }, + /* 3 */ + { + .etalon_stat = + { + .st_size = 4096, +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE + .st_blksize = 2048, +#endif +#ifdef HAVE_STRUCT_STAT_ST_BLOCKS + .st_blocks = 8 +#endif + } + }, + /* 4 */ + { + .etalon_stat = + { + .st_size = 4096, +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE + .st_blksize = 4096, +#endif +#ifdef HAVE_STRUCT_STAT_ST_BLOCKS + .st_blocks = 8 +#endif + } + }, + /* 5 */ + { + .etalon_stat = + { + .st_size = 5000, +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE + .st_blksize = 512, +#endif +#ifdef HAVE_STRUCT_STAT_ST_BLOCKS + .st_blocks = 10 +#endif + } + }, + /* 6 */ + { + .etalon_stat = + { + .st_size = 5000, +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE + .st_blksize = 1024, +#endif +#ifdef HAVE_STRUCT_STAT_ST_BLOCKS + .st_blocks = 10 +#endif + } + }, + /* 7 */ + { + .etalon_stat = + { + .st_size = 5000, +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE + .st_blksize = 2048, +#endif +#ifdef HAVE_STRUCT_STAT_ST_BLOCKS + .st_blocks = 12 +#endif + } + }, + /* 8 */ + { + .etalon_stat = + { + .st_size = 5000, +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE + .st_blksize = 4096, +#endif +#ifdef HAVE_STRUCT_STAT_ST_BLOCKS + .st_blocks = 16 +#endif + } + } +}; +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +/* @Test(dataSource = "test_vfs_adjust_stat_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_vfs_adjust_stat, test_vfs_adjust_stat_ds) +/* *INDENT-ON* */ +{ +#ifdef HAVE_STRUCT_STAT_ST_BLOCKS + /* given */ + struct stat expected_stat; + + expected_stat.st_size = data->etalon_stat.st_size; +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE + expected_stat.st_blksize = data->etalon_stat.st_blksize; +#endif /* HAVE_STRUCT_STAT_ST_BLKSIZE */ + /* when */ + vfs_adjust_stat (&expected_stat); + + /* then */ + ck_assert_int_eq (data->etalon_stat.st_blocks, expected_stat.st_blocks); +#else + ck_assert_int_eq (0, 0); +#endif /* HAVE_STRUCT_STAT_ST_BLOCKS */ +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, test_vfs_adjust_stat, test_vfs_adjust_stat_ds); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/vfs/vfs_get_encoding.c b/tests/lib/vfs/vfs_get_encoding.c new file mode 100644 index 0000000..a7503ca --- /dev/null +++ b/tests/lib/vfs/vfs_get_encoding.c @@ -0,0 +1,159 @@ +/* + lib/vfs - test vfs_get_encoding() functionality + + Copyright (C) 2013-2023 + Free Software Foundation, Inc. + + Written by: + Andrew Borodin <aborodin@vmail.ru>, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib/vfs" + +#include "tests/mctest.h" + +#include "lib/vfs/path.c" /* for testing of static vfs_get_encoding() */ + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_vfs_get_encoding_ds") */ +/* *INDENT-OFF* */ +static const struct test_vfs_get_encoding_ds +{ + const char *path; + const char *expected_encoding; +} test_vfs_get_encoding_ds[] = +{ + { /* 0 */ + "", + NULL + }, + { /* 1 */ + "aaaa", + NULL + }, + { /* 2 */ + "/aaaa", + NULL + }, + { /* 3 */ + "aaaa/bbbb", + NULL + }, + { /* 4 */ + "/aaaa/bbbb", + NULL + }, + { /* 5 */ + "#enc:UTF-8/aaaa", + "UTF-8" + }, + { /* 6 */ + "/#enc:UTF-8/aaaa", + "UTF-8" + }, + { /* 7 */ + "/aaaa/#enc:UTF-8/bbbb", + "UTF-8" + }, + { /* 8 */ + "/aaaa/#enc:UTF-8/bbbb/#enc:KOI8-R", + "KOI8-R" + }, + { /* 9 */ + "/aaaa/#enc:UTF-8/bbbb/#enc:KOI8-R/cccc", + "KOI8-R" + }, + { /* 10 */ + "/aaaa/#enc:UTF-8/bbbb/cccc#enc:KOI8-R/dddd", + "UTF-8" + }, + { /* 11 */ + "/#enc:UTF-8/bbbb/cccc#enc:KOI8-R/dddd", + "UTF-8" + }, + { /* 12 */ + "#enc:UTF-8/bbbb/cccc#enc:KOI8-R/dddd", + "UTF-8" + }, + { /* 13 */ + "aaaa#enc:UTF-8/bbbb/cccc#enc:KOI8-R/dddd", + NULL + }, + { /* 14 */ + "/aaaa/#enc:UTF-8/bbbb/#enc:KOI8-R#enc:IBM866/cccc", + "KOI8-R#enc:IBM866" + } +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_vfs_get_encoding_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_vfs_get_encoding, test_vfs_get_encoding_ds) +/* *INDENT-ON* */ +{ + /* given */ + char *actual_encoding; + + /* when */ + actual_encoding = vfs_get_encoding (data->path, -1); + + /* then */ + mctest_assert_str_eq (actual_encoding, data->expected_encoding); + + g_free (actual_encoding); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, test_vfs_get_encoding, test_vfs_get_encoding_ds); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/vfs/vfs_parse_ls_lga.c b/tests/lib/vfs/vfs_parse_ls_lga.c new file mode 100644 index 0000000..3d51f82 --- /dev/null +++ b/tests/lib/vfs/vfs_parse_ls_lga.c @@ -0,0 +1,426 @@ +/* + lib/vfs - test vfs_parse_ls_lga() functionality + + Copyright (C) 2011-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2011, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib/vfs" + +#include "tests/mctest.h" + +#include <stdio.h> + +#include "lib/vfs/utilvfs.h" +#include "lib/vfs/xdirentry.h" +#include "lib/strutil.h" + +#include "src/vfs/local/local.c" + + +struct vfs_s_subclass test_subclass1; +static struct vfs_class *vfs_test_ops1 = VFS_CLASS (&test_subclass1); + +struct vfs_s_entry *vfs_root_entry; +static struct vfs_s_inode *vfs_root_inode; +static struct vfs_s_super *vfs_test_super; + +/* *INDENT-OFF* */ +void message (int flags, const char *title, const char *text, ...) G_GNUC_PRINTF (3, 4); +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ + static struct stat initstat; + + str_init_strings (NULL); + + vfs_init (); + vfs_init_localfs (); + vfs_setup_work_dir (); + + vfs_init_subclass (&test_subclass1, "testfs1", VFSF_NOLINKS | VFSF_REMOTE, "test1"); + vfs_register_class (vfs_test_ops1); + + vfs_test_super = g_new0 (struct vfs_s_super, 1); + vfs_test_super->me = vfs_test_ops1; + + vfs_root_inode = vfs_s_new_inode (vfs_test_ops1, vfs_test_super, &initstat); + vfs_root_entry = vfs_s_new_entry (vfs_test_ops1, "/", vfs_root_inode); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ + vfs_s_free_entry (vfs_test_ops1, vfs_root_entry); + vfs_shut (); + str_uninit_strings (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @Mock */ +void +message (int flags, const char *title, const char *text, ...) +{ + char *p; + va_list ap; + + (void) flags; + (void) title; + + va_start (ap, text); + p = g_strdup_vprintf (text, ap); + va_end (ap); + printf ("message(): %s\n", p); + g_free (p); +} + +/* --------------------------------------------------------------------------------------------- */ + +static void +fill_stat_struct (struct stat *etalon_stat, int iterator) +{ + +#ifdef HAVE_STRUCT_STAT_ST_MTIM + etalon_stat->st_atim.tv_nsec = etalon_stat->st_mtim.tv_nsec = etalon_stat->st_ctim.tv_nsec = 0; +#endif + + switch (iterator) + { + case 0: + etalon_stat->st_dev = 0; + etalon_stat->st_ino = 0; + etalon_stat->st_mode = 0x41fd; + etalon_stat->st_nlink = 10; + etalon_stat->st_uid = 500; + etalon_stat->st_gid = 500; +#ifdef HAVE_STRUCT_STAT_ST_RDEV + etalon_stat->st_rdev = 0; +#endif + etalon_stat->st_size = 4096; +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE + etalon_stat->st_blksize = 512; +#endif +#ifdef HAVE_STRUCT_STAT_ST_BLOCKS + etalon_stat->st_blocks = 8; +#endif + etalon_stat->st_atime = 1308838140; + etalon_stat->st_mtime = 1308838140; + etalon_stat->st_ctime = 1308838140; + break; + case 1: + etalon_stat->st_dev = 0; + etalon_stat->st_ino = 0; + etalon_stat->st_mode = 0xa1ff; + etalon_stat->st_nlink = 10; + etalon_stat->st_uid = 500; + etalon_stat->st_gid = 500; +#ifdef HAVE_STRUCT_STAT_ST_RDEV + etalon_stat->st_rdev = 0; +#endif + etalon_stat->st_size = 11; +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE + etalon_stat->st_blksize = 512; +#endif +#ifdef HAVE_STRUCT_STAT_ST_BLOCKS + etalon_stat->st_blocks = 1; +#endif + etalon_stat->st_atime = 1268431200; + etalon_stat->st_mtime = 1268431200; + etalon_stat->st_ctime = 1268431200; + break; + case 2: + etalon_stat->st_dev = 0; + etalon_stat->st_ino = 0; + etalon_stat->st_mode = 0x41fd; + etalon_stat->st_nlink = 10; + etalon_stat->st_uid = 500; + etalon_stat->st_gid = 500; +#ifdef HAVE_STRUCT_STAT_ST_RDEV + etalon_stat->st_rdev = 0; +#endif + etalon_stat->st_size = 4096; +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE + etalon_stat->st_blksize = 512; +#endif +#ifdef HAVE_STRUCT_STAT_ST_BLOCKS + etalon_stat->st_blocks = 8; +#endif + etalon_stat->st_atime = 1308838140; + etalon_stat->st_mtime = 1308838140; + etalon_stat->st_ctime = 1308838140; + break; + case 3: + etalon_stat->st_dev = 0; + etalon_stat->st_ino = 0; + etalon_stat->st_mode = 0x41fd; + etalon_stat->st_nlink = 10; + etalon_stat->st_uid = 500; + etalon_stat->st_gid = 500; +#ifdef HAVE_STRUCT_STAT_ST_RDEV + etalon_stat->st_rdev = 0; +#endif + etalon_stat->st_size = 4096; +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE + etalon_stat->st_blksize = 512; +#endif +#ifdef HAVE_STRUCT_STAT_ST_BLOCKS + etalon_stat->st_blocks = 8; +#endif + etalon_stat->st_atime = 1308838140; + etalon_stat->st_mtime = 1308838140; + etalon_stat->st_ctime = 1308838140; + break; + default: + break; + } +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_vfs_parse_ls_lga_ds") */ +/* *INDENT-OFF* */ +static const struct test_vfs_parse_ls_lga_ds +{ + const char *input_string; + int expected_result; + const char *expected_filename; + const char *expected_linkname; + const size_t expected_filepos; +} test_vfs_parse_ls_lga_ds[] = +{ + { /* 0. */ + "drwxrwxr-x 10 500 500 4096 Jun 23 17:09 build_root", + 1, + "build_root", + NULL, + 0 + }, + { /* 1. */ + "lrwxrwxrwx 1 500 500 11 Mar 13 2010 COPYING -> doc/COPYING", + 1, + "COPYING", + "doc/COPYING", + 0 + }, + { /* 2. */ + "drwxrwxr-x 10 500 500 4096 Jun 23 17:09 ..", + 1, + "..", + NULL, + 0 + }, + { /* 3. */ + "drwxrwxr-x 10 500 500 4096 Jun 23 17:09 build_root", + 1, + "build_root", + NULL, + 0 + }, +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_vfs_parse_ls_lga_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_vfs_parse_ls_lga, test_vfs_parse_ls_lga_ds) +/* *INDENT-ON* */ + +{ + /* given */ + size_t filepos = 0; + struct stat etalon_stat; + static struct stat test_stat; + char *filename = NULL; + char *linkname = NULL; + gboolean actual_result; + + vfs_parse_ls_lga_init (); + +#ifdef HAVE_STRUCT_STAT_ST_BLOCKS + etalon_stat.st_blocks = 0; +#endif + etalon_stat.st_size = 0; + etalon_stat.st_mode = 0; + fill_stat_struct (&etalon_stat, _i); + + /* when */ + actual_result = + vfs_parse_ls_lga (data->input_string, &test_stat, &filename, &linkname, &filepos); + + /* then */ + ck_assert_int_eq (actual_result, data->expected_result); + + mctest_assert_str_eq (filename, data->expected_filename); + mctest_assert_str_eq (linkname, data->expected_linkname); + + ck_assert_int_eq (etalon_stat.st_dev, test_stat.st_dev); + ck_assert_int_eq (etalon_stat.st_ino, test_stat.st_ino); + ck_assert_int_eq (etalon_stat.st_mode, test_stat.st_mode); + ck_assert_int_eq (etalon_stat.st_uid, test_stat.st_uid); + ck_assert_int_eq (etalon_stat.st_gid, test_stat.st_gid); +#ifdef HAVE_STRUCT_STAT_ST_RDEV + ck_assert_int_eq (etalon_stat.st_rdev, test_stat.st_rdev); +#endif + ck_assert_int_eq (etalon_stat.st_size, test_stat.st_size); +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE + ck_assert_int_eq (etalon_stat.st_blksize, test_stat.st_blksize); +#endif +#ifdef HAVE_STRUCT_STAT_ST_BLOCKS + ck_assert_int_eq (etalon_stat.st_blocks, test_stat.st_blocks); +#endif + + /* FIXME: these commented checks are related to time zone! + ck_assert_int_eq (etalon_stat.st_atime, test_stat.st_atime); + ck_assert_int_eq (etalon_stat.st_mtime, test_stat.st_mtime); + ck_assert_int_eq (etalon_stat.st_ctime, test_stat.st_ctime); + */ + +#ifdef HAVE_STRUCT_STAT_ST_MTIM + ck_assert_int_eq (0, test_stat.st_atim.tv_nsec); + ck_assert_int_eq (0, test_stat.st_mtim.tv_nsec); + ck_assert_int_eq (0, test_stat.st_ctim.tv_nsec); +#endif + +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +/* @Test */ +/* *INDENT-OFF* */ +START_TEST (test_vfs_parse_ls_lga_reorder) +/* *INDENT-ON* */ +{ + /* given */ + size_t filepos = 0; + struct vfs_s_entry *ent1, *ent2, *ent3; + + vfs_parse_ls_lga_init (); + + /* init ent1 */ + ent1 = vfs_s_generate_entry (vfs_test_ops1, NULL, vfs_root_inode, 0); + vfs_parse_ls_lga + ("drwxrwxr-x 10 500 500 4096 Jun 23 17:09 build_root1", &ent1->ino->st, + &ent1->name, &ent1->ino->linkname, &filepos); + vfs_s_store_filename_leading_spaces (ent1, filepos); + vfs_s_insert_entry (vfs_test_ops1, vfs_root_inode, ent1); + + + /* init ent2 */ + ent2 = vfs_s_generate_entry (vfs_test_ops1, NULL, vfs_root_inode, 0); + vfs_parse_ls_lga ("drwxrwxr-x 10 500 500 4096 Jun 23 17:09 build_root2", + &ent2->ino->st, &ent2->name, &ent2->ino->linkname, &filepos); + vfs_s_store_filename_leading_spaces (ent2, filepos); + vfs_s_insert_entry (vfs_test_ops1, vfs_root_inode, ent2); + + /* init ent3 */ + ent3 = vfs_s_generate_entry (vfs_test_ops1, NULL, vfs_root_inode, 0); + vfs_parse_ls_lga ("drwxrwxr-x 10 500 500 4096 Jun 23 17:09 ..", + &ent3->ino->st, &ent3->name, &ent3->ino->linkname, &filepos); + vfs_s_store_filename_leading_spaces (ent3, filepos); + vfs_s_insert_entry (vfs_test_ops1, vfs_root_inode, ent3); + + /* when */ + vfs_s_normalize_filename_leading_spaces (vfs_root_inode, vfs_parse_ls_lga_get_final_spaces ()); + + /* then */ + mctest_assert_str_eq (ent1->name, " build_root1"); + mctest_assert_str_eq (ent2->name, " build_root2"); +} +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ +#define parce_one_line(ent_index, ls_output) {\ + ent[ent_index] = vfs_s_generate_entry (vfs_test_ops1, NULL, vfs_root_inode, 0);\ + if (! vfs_parse_ls_lga (ls_output,\ + &ent[ent_index]->ino->st, &ent[ent_index]->name, &ent[ent_index]->ino->linkname, &filepos))\ + {\ + ck_abort_msg ("An error occurred while parse ls output");\ + return;\ + }\ + vfs_s_store_filename_leading_spaces (ent[ent_index], filepos);\ + vfs_s_insert_entry (vfs_test_ops1, vfs_root_inode, ent[ent_index]);\ + \ +} + +/* @Test */ +/* *INDENT-OFF* */ +START_TEST (test_vfs_parse_ls_lga_unaligned) +/* *INDENT-ON* */ +{ + /* given */ + size_t filepos = 0; + struct vfs_s_entry *ent[4]; + + vfs_parse_ls_lga_init (); + + parce_one_line (0, "drwxrwxr-x 10 500 500 4096 Jun 23 17:09 build_root1"); + parce_one_line (1, "drwxrwxr-x 10 500 500 4096 Jun 23 17:09 build_root2"); + parce_one_line (2, "drwxrwxr-x 10 500 500 4096 Jun 23 17:09 .."); + parce_one_line (3, + "drwxrwxr-x 10 500 500 4096 Jun 23 17:09 build_root 0"); + + /* when */ + vfs_s_normalize_filename_leading_spaces (vfs_root_inode, vfs_parse_ls_lga_get_final_spaces ()); + + /* then */ + mctest_assert_str_eq (ent[0]->name, "build_root1"); + mctest_assert_str_eq (ent[0]->name, "build_root1"); + mctest_assert_str_eq (ent[1]->name, " build_root2"); + mctest_assert_str_eq (ent[3]->name, " build_root 0"); +} +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, test_vfs_parse_ls_lga, test_vfs_parse_ls_lga_ds); + tcase_add_test (tc_core, test_vfs_parse_ls_lga_reorder); + tcase_add_test (tc_core, test_vfs_parse_ls_lga_unaligned); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/vfs/vfs_path_from_str_flags.c b/tests/lib/vfs/vfs_path_from_str_flags.c new file mode 100644 index 0000000..1f1c29d --- /dev/null +++ b/tests/lib/vfs/vfs_path_from_str_flags.c @@ -0,0 +1,125 @@ +/* lib/vfs - test vfs_path_from_str_flags() function + + Copyright (C) 2013-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib/vfs" + +#include "tests/mctest.h" + +#include "lib/strutil.h" +#include "lib/vfs/xdirentry.h" +#include "lib/vfs/path.h" + +#include "src/vfs/local/local.c" + +/* --------------------------------------------------------------------------------------------- */ + +/* @Mock */ +const char * +mc_config_get_home_dir (void) +{ + return "/mock/test"; +} + +/* --------------------------------------------------------------------------------------------- */ +/* @Before */ +static void +setup (void) +{ + str_init_strings (NULL); + + vfs_init (); + vfs_init_localfs (); + vfs_setup_work_dir (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ + vfs_shut (); + str_uninit_strings (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_from_to_string_ds") */ +/* *INDENT-OFF* */ +static const struct test_strip_home_ds +{ + const char *input_string; + const char *expected_result; +} test_strip_home_ds[] = +{ + { /* 0. */ + "/mock/test/some/path", + "~/some/path" + }, + { /* 1. */ + "/mock/testttt/some/path", + "/mock/testttt/some/path" + }, +}; +/* *INDENT-ON* */ + +/* @Test */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_strip_home, test_strip_home_ds) +/* *INDENT-ON* */ +{ + /* given */ + vfs_path_t *actual_result; + + /* when */ + actual_result = vfs_path_from_str_flags (data->input_string, VPF_STRIP_HOME); + + /* then */ + mctest_assert_str_eq (actual_result->str, data->expected_result); + + vfs_path_free (actual_result, TRUE); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, test_strip_home, test_strip_home_ds); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/vfs/vfs_path_string_convert.c b/tests/lib/vfs/vfs_path_string_convert.c new file mode 100644 index 0000000..4a79249 --- /dev/null +++ b/tests/lib/vfs/vfs_path_string_convert.c @@ -0,0 +1,335 @@ +/* + lib/vfs - get vfs_path_t from string + + Copyright (C) 2011-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2011, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib/vfs" + +#include "tests/mctest.h" + +#ifdef HAVE_CHARSET +#include "lib/charsets.h" +#endif + +#include "lib/strutil.h" +#include "lib/vfs/xdirentry.h" +#include "lib/vfs/path.c" /* for testing static methods */ + +#include "src/vfs/local/local.c" + +static struct vfs_class vfs_test_ops1, vfs_test_ops2, vfs_test_ops3; + +#define ETALON_PATH_STR "/#test1/bla-bla/some/path/#test2/bla-bla/some/path#test3/111/22/33" +#define ETALON_PATH_URL_STR "/test1://bla-bla/some/path/test2://bla-bla/some/path/test3://111/22/33" + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ + str_init_strings (NULL); + + vfs_init (); + vfs_init_localfs (); + vfs_setup_work_dir (); + + vfs_init_class (&vfs_test_ops1, "testfs1", VFSF_NOLINKS, "test1"); + vfs_register_class (&vfs_test_ops1); + + vfs_init_class (&vfs_test_ops2, "testfs2", VFSF_REMOTE, "test2"); + vfs_register_class (&vfs_test_ops2); + + vfs_init_class (&vfs_test_ops3, "testfs3", VFSF_UNKNOWN, "test3"); + vfs_register_class (&vfs_test_ops3); + +#ifdef HAVE_CHARSET + mc_global.sysconfig_dir = (char *) TEST_SHARE_DIR; + load_codepages_list (); +#endif /* HAVE_CHARSET */ +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ +#ifdef HAVE_CHARSET + free_codepages_list (); +#endif /* HAVE_CHARSET */ + + vfs_shut (); + str_uninit_strings (); +} + +/* --------------------------------------------------------------------------------------------- */ +/* @DataSource("test_from_to_string_ds") */ +/* *INDENT-OFF* */ +static const struct test_from_to_string_ds +{ + const char *input_string; + const char *expected_result; + const char *expected_element_path; + const size_t expected_elements_count; + struct vfs_class *expected_vfs_class; +} test_from_to_string_ds[] = +{ + { /* 0. */ + ETALON_PATH_STR, + ETALON_PATH_URL_STR, + "111/22/33", + 4, + &vfs_test_ops3 + }, + { /* 1. */ + "/", + "/", + "/", + 1, + VFS_CLASS (&local_subclass) + }, + { /* 2. */ + "/test1://bla-bla/some/path/test2://user:passwd@some.host:1234/bla-bla/some/path/test3://111/22/33", + "/test1://bla-bla/some/path/test2://user:passwd@some.host:1234/bla-bla/some/path/test3://111/22/33", + "111/22/33", + 4, + &vfs_test_ops3 + }, +#ifdef HAVE_CHARSET + { /* 3. */ + "/#test1/bla-bla1/some/path/#test2/bla-bla2/#enc:KOI8-R/some/path#test3/111/22/33", + "/test1://bla-bla1/some/path/test2://#enc:KOI8-R/bla-bla2/some/path/test3://111/22/33", + "111/22/33", + 4, + &vfs_test_ops3 + }, + { /* 4. */ + "/#test1/bla-bla1/#enc:IBM866/some/path/#test2/bla-bla2/#enc:KOI8-R/some/path#test3/111/22/33", + "/test1://#enc:IBM866/bla-bla1/some/path/test2://#enc:KOI8-R/bla-bla2/some/path/test3://111/22/33", + "111/22/33", + 4, + &vfs_test_ops3 + }, + { /* 5. */ + "/#test1/bla-bla1/some/path/#test2/bla-bla2/#enc:IBM866/#enc:KOI8-R/some/path#test3/111/22/33", + "/test1://bla-bla1/some/path/test2://#enc:KOI8-R/bla-bla2/some/path/test3://111/22/33", + "111/22/33", + 4, + &vfs_test_ops3 + }, + { /* 6. */ + "/#test1/bla-bla1/some/path/#test2/bla-bla2/#enc:IBM866/some/#enc:KOI8-R/path#test3/111/22/33", + "/test1://bla-bla1/some/path/test2://#enc:KOI8-R/bla-bla2/some/path/test3://111/22/33", + "111/22/33", + 4, + &vfs_test_ops3 + }, + { /* 7. */ + "/#test1/bla-bla1/some/path/#test2/#enc:IBM866/bla-bla2/#enc:KOI8-R/some/path#test3/111/22/33", + "/test1://bla-bla1/some/path/test2://#enc:KOI8-R/bla-bla2/some/path/test3://111/22/33", + "111/22/33", + 4, + &vfs_test_ops3 + }, + { /* 8. */ + "/#test1/bla-bla1/some/path/#enc:IBM866/#test2/bla-bla2/#enc:KOI8-R/some/path#test3/111/22/33", + "/test1://#enc:IBM866/bla-bla1/some/path/test2://#enc:KOI8-R/bla-bla2/some/path/test3://111/22/33", + "111/22/33", + 4, + &vfs_test_ops3 + }, +#endif /* HAVE_CHARSET */ +}; +/* *INDENT-ON* */ + +/* @Test */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_from_to_string, test_from_to_string_ds) +/* *INDENT-ON* */ +{ + /* given */ + vfs_path_t *vpath; + size_t vpath_len; + const vfs_path_element_t *path_element; + const char *actual_result; + + vpath = vfs_path_from_str_flags (data->input_string, VPF_USE_DEPRECATED_PARSER); + + /* when */ + vpath_len = vfs_path_elements_count (vpath); + actual_result = vfs_path_as_str (vpath); + path_element = vfs_path_get_by_index (vpath, -1); + + /* then */ + ck_assert_int_eq (vpath_len, data->expected_elements_count); + mctest_assert_str_eq (actual_result, data->expected_result); + mctest_assert_ptr_eq (path_element->class, data->expected_vfs_class); + mctest_assert_str_eq (path_element->path, data->expected_element_path); + + vfs_path_free (vpath, TRUE); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_partial_string_by_index_ds") */ +/* *INDENT-OFF* */ +static const struct test_partial_string_by_index_ds +{ + const char *input_string; + const off_t element_index; + const char *expected_result; +} test_partial_string_by_index_ds[] = +{ + { /* 0. */ + ETALON_PATH_STR, + -1, + "/test1://bla-bla/some/path/test2://bla-bla/some/path" + }, + { /* 1. */ + ETALON_PATH_STR, + -2, + "/test1://bla-bla/some/path/" + }, + { /* 2. */ + ETALON_PATH_STR, + -3, + "/" + }, + { /* 3. Index out of bound */ + ETALON_PATH_STR, + -4, + "" + }, + { /* 4. */ + ETALON_PATH_STR, + 1, + "/" + }, + { /* 5. */ + ETALON_PATH_STR, + 2, + "/test1://bla-bla/some/path/" + }, + { /* 6. */ + ETALON_PATH_STR, + 3, + "/test1://bla-bla/some/path/test2://bla-bla/some/path" + }, + { /* 6. */ + ETALON_PATH_STR, + 4, + ETALON_PATH_URL_STR + }, + { /* 7. Index out of bound */ + ETALON_PATH_STR, + 5, + ETALON_PATH_URL_STR + }, +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_partial_string_by_index_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_partial_string_by_index, test_partial_string_by_index_ds) +/* *INDENT-ON* */ +{ + /* given */ + vfs_path_t *vpath; + char *actual_result; + vpath = vfs_path_from_str_flags (data->input_string, VPF_USE_DEPRECATED_PARSER); + + /* when */ + actual_result = vfs_path_to_str_elements_count (vpath, data->element_index); + + /* then */ + mctest_assert_str_eq (actual_result, data->expected_result); + g_free (actual_result); + + vfs_path_free (vpath, TRUE); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ +#ifdef HAVE_CHARSET +/* --------------------------------------------------------------------------------------------- */ + +#define ETALON_STR "/path/to/file.ext/test1://#enc:KOI8-R" +/* @Test */ +/* *INDENT-OFF* */ +START_TEST (test_vfs_path_encoding_at_end) +/* *INDENT-ON* */ +{ + /* given */ + vfs_path_t *vpath; + const char *result; + const vfs_path_element_t *element; + + vpath = + vfs_path_from_str_flags ("/path/to/file.ext#test1:/#enc:KOI8-R", VPF_USE_DEPRECATED_PARSER); + + /* when */ + result = vfs_path_as_str (vpath); + element = vfs_path_get_by_index (vpath, -1); + + /* then */ + mctest_assert_str_eq (element->path, ""); + mctest_assert_not_null (element->encoding); + mctest_assert_str_eq (result, ETALON_STR); + + vfs_path_free (vpath, TRUE); +} + +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ +#endif /* HAVE_CHARSET */ +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, test_from_to_string, test_from_to_string_ds); + mctest_add_parameterized_test (tc_core, test_partial_string_by_index, + test_partial_string_by_index_ds); +#ifdef HAVE_CHARSET + tcase_add_test (tc_core, test_vfs_path_encoding_at_end); +#endif + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/vfs/vfs_prefix_to_class.c b/tests/lib/vfs/vfs_prefix_to_class.c new file mode 100644 index 0000000..414d52d --- /dev/null +++ b/tests/lib/vfs/vfs_prefix_to_class.c @@ -0,0 +1,170 @@ +/* + lib/vfs - test vfs_prefix_to_class() functionality + + Copyright (C) 2011-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2011, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib/vfs" + +#include "tests/mctest.h" + +#include "lib/strutil.h" +#include "lib/vfs/xdirentry.h" +#include "lib/vfs/vfs.c" /* for testing static methods */ + +#include "src/vfs/local/local.c" + +static struct vfs_class vfs_test_ops1, vfs_test_ops2, vfs_test_ops3; + +/* --------------------------------------------------------------------------------------------- */ + +static int +test_which (struct vfs_class *me, const char *path) +{ + (void) me; + + if ((strcmp (path, "test_1:") == 0) || + (strcmp (path, "test_2:") == 0) || + (strcmp (path, "test_3:") == 0) || (strcmp (path, "test_4:") == 0)) + return 1; + return -1; +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ + str_init_strings (NULL); + + vfs_init (); + vfs_init_localfs (); + vfs_setup_work_dir (); + + vfs_init_class (&vfs_test_ops1, "testfs1", VFSF_NOLINKS | VFSF_REMOTE, "test1"); + vfs_test_ops1.which = test_which; + vfs_register_class (&vfs_test_ops1); + + vfs_init_class (&vfs_test_ops2, "testfs2", VFSF_UNKNOWN, "test2"); + vfs_register_class (&vfs_test_ops2); + + vfs_init_class (&vfs_test_ops3, "testfs3", VFSF_UNKNOWN, "test3"); + vfs_register_class (&vfs_test_ops3); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ + vfs_shut (); + str_uninit_strings (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_vfs_prefix_to_class_ds") */ +/* *INDENT-OFF* */ +static const struct test_vfs_prefix_to_class_ds +{ + const char *input_string; + const struct vfs_class *expected_result; +} test_vfs_prefix_to_class_ds[] = +{ + { /* 0 */ + "test_1:", + &vfs_test_ops1 + }, + { /* 1 */ + "test_2:", + &vfs_test_ops1 + }, + { /* 2 */ + "test_3:", + &vfs_test_ops1 + }, + { /* 3 */ + "test_4:", + &vfs_test_ops1 + }, + { /* 4 */ + "test2:", + &vfs_test_ops2 + }, + { /* 5 */ + "test3:", + &vfs_test_ops3 + }, + { + "test1:", + NULL + }, + { /* 6 */ + "test_5:", + NULL + }, + { /* 7 */ + "test4:", + NULL + }, +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_vfs_prefix_to_class_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_vfs_prefix_to_class, test_vfs_prefix_to_class_ds) +/* *INDENT-ON* */ +{ + /* given */ + struct vfs_class *actual_result; + + /* when */ + actual_result = vfs_prefix_to_class ((char *) data->input_string); + + /* then */ + mctest_assert_ptr_eq (actual_result, data->expected_result); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, test_vfs_prefix_to_class, test_vfs_prefix_to_class_ds); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/vfs/vfs_s_get_path.c b/tests/lib/vfs/vfs_s_get_path.c new file mode 100644 index 0000000..382b6ef --- /dev/null +++ b/tests/lib/vfs/vfs_s_get_path.c @@ -0,0 +1,166 @@ +/* + lib/vfs - test vfs_s_get_path() function + + Copyright (C) 2011-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2011, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib/vfs" + +#include "tests/mctest.h" + +#include "lib/strutil.h" +#include "lib/vfs/direntry.c" /* for testing static methods */ + +#include "src/vfs/local/local.c" + +#define ARCH_NAME "/path/to/some/file.ext" +#define ETALON_PATH "path/to/test1_file.ext" +#define ETALON_VFS_NAME "#test2:user:pass@host.net" +#define ETALON_VFS_URL_NAME "test2://user:pass@host.net" + +struct vfs_s_subclass test_subclass1, test_subclass2, test_subclass3; +static struct vfs_class *vfs_test_ops1 = VFS_CLASS (&test_subclass1); +static struct vfs_class *vfs_test_ops2 = VFS_CLASS (&test_subclass2); +static struct vfs_class *vfs_test_ops3 = VFS_CLASS (&test_subclass3); + +/* --------------------------------------------------------------------------------------------- */ + +static int +test1_mock_open_archive (struct vfs_s_super *super, const vfs_path_t * vpath, + const vfs_path_element_t * vpath_element) +{ + struct vfs_s_inode *root; + + mctest_assert_str_eq (vfs_path_as_str (vpath), "/" ETALON_VFS_URL_NAME ARCH_NAME); + + super->name = g_strdup (vfs_path_as_str (vpath)); + root = vfs_s_new_inode (vpath_element->class, super, NULL); + super->root = root; + return 0; +} + +/* --------------------------------------------------------------------------------------------- */ + +static int +test1_mock_archive_same (const vfs_path_element_t * vpath_element, struct vfs_s_super *super, + const vfs_path_t * vpath, void *cookie) +{ + const char *path; + + (void) vpath_element; + (void) super; + (void) cookie; + + path = vfs_path_get_last_path_str (vpath); + return (strcmp (ARCH_NAME, path) != 0 ? 0 : 1); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ + str_init_strings (NULL); + + vfs_init (); + vfs_init_localfs (); + vfs_setup_work_dir (); + + vfs_init_subclass (&test_subclass1, "testfs1", VFSF_NOLINKS | VFSF_REMOTE, "test1"); + test_subclass1.open_archive = test1_mock_open_archive; + test_subclass1.archive_same = test1_mock_archive_same; + test_subclass1.archive_check = NULL; + vfs_register_class (vfs_test_ops1); + + vfs_init_subclass (&test_subclass2, "testfs2", VFSF_UNKNOWN, "test2"); + vfs_register_class (vfs_test_ops2); + + vfs_init_subclass (&test_subclass3, "testfs3", VFSF_UNKNOWN, "test3"); + vfs_register_class (vfs_test_ops3); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ + vfs_shut (); + str_uninit_strings (); +} + + +void +vfs_die (const char *m) +{ + printf ("VFS_DIE: '%s'\n", m); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @Test */ +/* *INDENT-OFF* */ +START_TEST (test_vfs_s_get_path) +/* *INDENT-ON* */ +{ + /* given */ + struct vfs_s_super *archive; + const char *result; + + /* when */ + vfs_path_t *vpath = + vfs_path_from_str_flags ("/" ETALON_VFS_NAME ARCH_NAME "#test1:/" ETALON_PATH, + VPF_USE_DEPRECATED_PARSER); + + result = vfs_s_get_path (vpath, &archive, 0); + + /* then */ + mctest_assert_str_eq (result, ETALON_PATH); + mctest_assert_str_eq (archive->name, "/" ETALON_VFS_URL_NAME ARCH_NAME); + + g_free (vpath); + +} +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + tcase_add_test (tc_core, test_vfs_s_get_path); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/vfs/vfs_setup_cwd.c b/tests/lib/vfs/vfs_setup_cwd.c new file mode 100644 index 0000000..9acfb92 --- /dev/null +++ b/tests/lib/vfs/vfs_setup_cwd.c @@ -0,0 +1,157 @@ +/* + lib/vfs - test vfs_setup_cwd() functionality + + Copyright (C) 2013-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib/vfs" + +#include "tests/mctest.h" + +#include <stdlib.h> + +#include "lib/strutil.h" +#include "lib/vfs/xdirentry.h" +#include "src/vfs/local/local.c" + +/* --------------------------------------------------------------------------------------------- */ + +/* @Mock */ +char * +g_get_current_dir (void) +{ + return g_strdup ("/some/path"); +} + +/* --------------------------------------------------------------------------------------------- */ + +static gboolean mc_stat__is_2nd_call_different = FALSE; +static gboolean mc_stat__call_count = 0; + +/* @Mock */ +int +mc_stat (const vfs_path_t * vpath, struct stat *my_stat) +{ + (void) vpath; + + if (mc_stat__call_count++ > 1 && mc_stat__is_2nd_call_different) + { + my_stat->st_ino = 2; + my_stat->st_dev = 22; + } + else + { + my_stat->st_ino = 1; + my_stat->st_dev = 11; + } + if (mc_stat__call_count > 2) + { + mc_stat__call_count = 0; + } + return 0; +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ + str_init_strings (NULL); + + vfs_init (); + vfs_init_localfs (); + vfs_setup_work_dir (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ + vfs_shut (); + str_uninit_strings (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_vfs_setup_cwd_symlink_ds") */ +/* *INDENT-OFF* */ +static const struct test_vfs_setup_cwd_symlink_ds +{ + gboolean is_2nd_call_different; + const char *expected_result; +} test_vfs_setup_cwd_symlink_ds[] = +{ + { /* 0. */ + TRUE, + "/some/path" + }, + { /* 1. */ + FALSE, + "/some/path2" + }, +}; +/* *INDENT-ON* */ + +/* @Test */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_vfs_setup_cwd_symlink, test_vfs_setup_cwd_symlink_ds) +/* *INDENT-ON* */ +{ + /* given */ + vfs_set_raw_current_dir (NULL); + mc_stat__is_2nd_call_different = data->is_2nd_call_different; + mc_stat__call_count = 0; + setenv ("PWD", "/some/path2", 1); + + /* when */ + vfs_setup_cwd (); + + /* then */ + mctest_assert_str_eq (vfs_get_current_dir (), data->expected_result); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, test_vfs_setup_cwd_symlink, + test_vfs_setup_cwd_symlink_ds); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/vfs/vfs_split.c b/tests/lib/vfs/vfs_split.c new file mode 100644 index 0000000..cafa855 --- /dev/null +++ b/tests/lib/vfs/vfs_split.c @@ -0,0 +1,207 @@ +/* + lib/vfs - test vfs_split() functionality + + Copyright (C) 2011-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2011, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib/vfs" + +#include "tests/mctest.h" + +#include "lib/strutil.h" +#include "lib/vfs/xdirentry.h" +#include "lib/vfs/path.c" /* for testing static methods */ + +#include "src/vfs/local/local.c" + +static struct vfs_class vfs_test_ops1, vfs_test_ops2, vfs_test_ops3; + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ + str_init_strings (NULL); + + vfs_init (); + vfs_init_localfs (); + vfs_setup_work_dir (); + + vfs_init_class (&vfs_test_ops1, "testfs1", VFSF_NOLINKS | VFSF_REMOTE, "test1"); + vfs_register_class (&vfs_test_ops1); + + vfs_init_class (&vfs_test_ops2, "testfs2", VFSF_UNKNOWN, "test2"); + vfs_register_class (&vfs_test_ops2); + + vfs_init_class (&vfs_test_ops3, "testfs3", VFSF_UNKNOWN, "test3"); + vfs_register_class (&vfs_test_ops3); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ + vfs_shut (); + str_uninit_strings (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_vfs_split_ds") */ +/* *INDENT-OFF* */ +static const struct test_vfs_split_ds +{ + const char *input_string; + const char *expected_path; + const char *expected_local; + const char *expected_op; + const struct vfs_class *expected_result; +} test_vfs_split_ds[] = +{ + { /* 0. */ + "#test1:/bla-bla/some/path/#test2:/bla-bla/some/path2/#test3:/qqq/www/eee.rr", + "#test1:/bla-bla/some/path/#test2:/bla-bla/some/path2/", + "qqq/www/eee.rr", + "test3:", + &vfs_test_ops3 + }, + { /* 1. */ + "#test1:/bla-bla/some/path/#test2:/bla-bla/some/path2/", + "#test1:/bla-bla/some/path/", + "bla-bla/some/path2/", + "test2:", + &vfs_test_ops2 + }, + { /* 2. */ + "#test1:/bla-bla/some/path/", + "", + "bla-bla/some/path/", + "test1:", + &vfs_test_ops1 + }, + { /* 3. */ + "", + "", + NULL, + NULL, + NULL + }, + { /* 4. split with local */ + "/local/path/#test1:/bla-bla/some/path/#test2:/bla-bla/some/path2#test3:/qqq/www/eee.rr", + "/local/path/#test1:/bla-bla/some/path/#test2:/bla-bla/some/path2", + "qqq/www/eee.rr", + "test3:", + &vfs_test_ops3 + }, + { /* 5. split with local */ + "/local/path/#test1:/bla-bla/some/path/#test2:/bla-bla/some/path2", + "/local/path/#test1:/bla-bla/some/path/", + "bla-bla/some/path2", + "test2:", + &vfs_test_ops2 + }, + { /* 6. split with local */ + "/local/path/#test1:/bla-bla/some/path/", + "/local/path/", + "bla-bla/some/path/", + "test1:", + &vfs_test_ops1 + }, + { /* 7. split with local */ + "/local/path/", + "/local/path/", + NULL, + NULL, + NULL + }, + { /* 8. split with URL */ + "#test2:username:passwd@somehost.net/bla-bla/some/path2", + "", + "bla-bla/some/path2", + "test2:username:passwd@somehost.net", + &vfs_test_ops2 + }, + { /* 9. split URL with semi */ + "/local/path/#test1:/bla-bla/some/path/#test2:username:p!a@s#s$w%d@somehost.net/bla-bla/some/path2", + "/local/path/#test1:/bla-bla/some/path/", + "bla-bla/some/path2", + "test2:username:p!a@s#s$w%d@somehost.net", + &vfs_test_ops2 + }, + { /* 10. split with semi in path */ + "#test2:/bl#a-bl#a/so#me/pa#th2", + "", + "bl#a-bl#a/so#me/pa#th2", + "test2:", + &vfs_test_ops2 + } +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_vfs_split_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_vfs_split, test_vfs_split_ds) +/* *INDENT-ON* */ +{ + /* given */ + const char *local = NULL, *op = NULL; + struct vfs_class *actual_result; + char *path; + + path = g_strdup (data->input_string); + + /* when */ + actual_result = _vfs_split_with_semi_skip_count (path, &local, &op, 0); + + /* then */ + mctest_assert_ptr_eq (actual_result, data->expected_result); + mctest_assert_str_eq (path, data->expected_path); + mctest_assert_str_eq (local, data->expected_local); + mctest_assert_str_eq (op, data->expected_op); + g_free (path); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, test_vfs_split, test_vfs_split_ds); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/widget/Makefile.am b/tests/lib/widget/Makefile.am new file mode 100644 index 0000000..0cf0c75 --- /dev/null +++ b/tests/lib/widget/Makefile.am @@ -0,0 +1,40 @@ +PACKAGE_STRING = "/lib/widget" + +AM_CPPFLAGS = \ + $(GLIB_CFLAGS) \ + -I$(top_srcdir) \ + -I$(top_srcdir)/lib/vfs \ + @CHECK_CFLAGS@ + +AM_LDFLAGS = @TESTS_LDFLAGS@ + +LIBS = @CHECK_LIBS@ \ + $(top_builddir)/lib/libmc.la + +if ENABLE_MCLIB +LIBS += $(GLIB_LIBS) +endif + +TESTS = \ + complete_engine \ + hotkey_equal \ + group_init_destroy \ + widget_find_by_id \ + widget_make_global_local + +check_PROGRAMS = $(TESTS) + +complete_engine_SOURCES = \ + complete_engine.c + +hotkey_equal_SOURCES = \ + hotkey_equal.c + +group_init_destroy_SOURCES = \ + group_init_destroy.c + +widget_find_by_id_SOURCES = \ + widget_find_by_id.c + +widget_make_global_local_SOURCES = \ + widget_make_global_local.c diff --git a/tests/lib/widget/Makefile.in b/tests/lib/widget/Makefile.in new file mode 100644 index 0000000..8e08664 --- /dev/null +++ b/tests/lib/widget/Makefile.in @@ -0,0 +1,1209 @@ +# Makefile.in generated by automake 1.16.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2021 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@ENABLE_MCLIB_TRUE@am__append_1 = $(GLIB_LIBS) +TESTS = complete_engine$(EXEEXT) hotkey_equal$(EXEEXT) \ + group_init_destroy$(EXEEXT) widget_find_by_id$(EXEEXT) \ + widget_make_global_local$(EXEEXT) +check_PROGRAMS = $(am__EXEEXT_1) +subdir = tests/lib/widget +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/m4.include/gnulib/mode_t.m4 \ + $(top_srcdir)/m4.include/gnulib/stat-size.m4 \ + $(top_srcdir)/m4.include/gnulib/fstypename.m4 \ + $(top_srcdir)/m4.include/gnulib/fsusage.m4 \ + $(top_srcdir)/m4.include/gnulib/mountlist.m4 \ + $(top_srcdir)/m4.include/gnulib/windows-stat-inodes.m4 \ + $(top_srcdir)/m4.include/gnulib/sys_types_h.m4 \ + $(top_srcdir)/m4.include/ax_path_lib_pcre.m4 \ + $(top_srcdir)/m4.include/ax_check_pcre2.m4 \ + $(top_srcdir)/m4.include/dx_doxygen.m4 \ + $(top_srcdir)/m4.include/ax_require_defined.m4 \ + $(top_srcdir)/m4.include/ax_check_compile_flag.m4 \ + $(top_srcdir)/m4.include/ax_append_flag.m4 \ + $(top_srcdir)/m4.include/ax_append_compile_flags.m4 \ + $(top_srcdir)/m4.include/mc-cflags.m4 \ + $(top_srcdir)/m4.include/ax_gcc_func_attribute.m4 \ + $(top_srcdir)/m4.include/mc-check-search-type.m4 \ + $(top_srcdir)/m4.include/mc-get-fs-info.m4 \ + $(top_srcdir)/m4.include/mc-with-x.m4 \ + $(top_srcdir)/m4.include/mc-use-termcap.m4 \ + $(top_srcdir)/m4.include/mc-with-screen.m4 \ + $(top_srcdir)/m4.include/mc-with-screen-ncurses.m4 \ + $(top_srcdir)/m4.include/mc-with-screen-slang.m4 \ + $(top_srcdir)/m4.include/mc-with-internal-edit.m4 \ + $(top_srcdir)/m4.include/mc-subshell.m4 \ + $(top_srcdir)/m4.include/mc-background.m4 \ + $(top_srcdir)/m4.include/mc-ext2fs-attr.m4 \ + $(top_srcdir)/m4.include/mc-glib.m4 \ + $(top_srcdir)/m4.include/mc-vfs.m4 \ + $(top_srcdir)/m4.include/vfs/rpc.m4 \ + $(top_srcdir)/m4.include/vfs/socket.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-extfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-sfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-ftp.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-sftp.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-fish.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-undelfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-tarfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-cpiofs.m4 \ + $(top_srcdir)/m4.include/mc-version.m4 \ + $(top_srcdir)/m4.include/mc-tests.m4 \ + $(top_srcdir)/m4.include/mc-i18n.m4 \ + $(top_srcdir)/m4.include/mc-assert.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__EXEEXT_1 = complete_engine$(EXEEXT) hotkey_equal$(EXEEXT) \ + group_init_destroy$(EXEEXT) widget_find_by_id$(EXEEXT) \ + widget_make_global_local$(EXEEXT) +am_complete_engine_OBJECTS = complete_engine.$(OBJEXT) +complete_engine_OBJECTS = $(am_complete_engine_OBJECTS) +complete_engine_LDADD = $(LDADD) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +am_group_init_destroy_OBJECTS = group_init_destroy.$(OBJEXT) +group_init_destroy_OBJECTS = $(am_group_init_destroy_OBJECTS) +group_init_destroy_LDADD = $(LDADD) +am_hotkey_equal_OBJECTS = hotkey_equal.$(OBJEXT) +hotkey_equal_OBJECTS = $(am_hotkey_equal_OBJECTS) +hotkey_equal_LDADD = $(LDADD) +am_widget_find_by_id_OBJECTS = widget_find_by_id.$(OBJEXT) +widget_find_by_id_OBJECTS = $(am_widget_find_by_id_OBJECTS) +widget_find_by_id_LDADD = $(LDADD) +am_widget_make_global_local_OBJECTS = \ + widget_make_global_local.$(OBJEXT) +widget_make_global_local_OBJECTS = \ + $(am_widget_make_global_local_OBJECTS) +widget_make_global_local_LDADD = $(LDADD) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/complete_engine.Po \ + ./$(DEPDIR)/group_init_destroy.Po ./$(DEPDIR)/hotkey_equal.Po \ + ./$(DEPDIR)/widget_find_by_id.Po \ + ./$(DEPDIR)/widget_make_global_local.Po +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(complete_engine_SOURCES) $(group_init_destroy_SOURCES) \ + $(hotkey_equal_SOURCES) $(widget_find_by_id_SOURCES) \ + $(widget_make_global_local_SOURCES) +DIST_SOURCES = $(complete_engine_SOURCES) \ + $(group_init_destroy_SOURCES) $(hotkey_equal_SOURCES) \ + $(widget_find_by_id_SOURCES) \ + $(widget_make_global_local_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red='[0;31m'; \ + grn='[0;32m'; \ + lgn='[1;32m'; \ + blu='[1;34m'; \ + mgn='[0;35m'; \ + brg='[1m'; \ + std='[m'; \ + fi; \ +} +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ + $(top_srcdir)/config/test-driver +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +COM_ERR_CFLAGS = @COM_ERR_CFLAGS@ +COM_ERR_LIBS = @COM_ERR_LIBS@ +CP1251 = @CP1251@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DOC_LINGUAS = @DOC_LINGUAS@ +DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +DX_CONFIG = @DX_CONFIG@ +DX_DOCDIR = @DX_DOCDIR@ +DX_DOT = @DX_DOT@ +DX_DOXYGEN = @DX_DOXYGEN@ +DX_DVIPS = @DX_DVIPS@ +DX_EGREP = @DX_EGREP@ +DX_ENV = @DX_ENV@ +DX_FLAG_chi = @DX_FLAG_chi@ +DX_FLAG_chm = @DX_FLAG_chm@ +DX_FLAG_doc = @DX_FLAG_doc@ +DX_FLAG_dot = @DX_FLAG_dot@ +DX_FLAG_html = @DX_FLAG_html@ +DX_FLAG_man = @DX_FLAG_man@ +DX_FLAG_pdf = @DX_FLAG_pdf@ +DX_FLAG_ps = @DX_FLAG_ps@ +DX_FLAG_rtf = @DX_FLAG_rtf@ +DX_FLAG_xml = @DX_FLAG_xml@ +DX_HHC = @DX_HHC@ +DX_LATEX = @DX_LATEX@ +DX_MAKEINDEX = @DX_MAKEINDEX@ +DX_PDFLATEX = @DX_PDFLATEX@ +DX_PERL = @DX_PERL@ +DX_PROJECT = @DX_PROJECT@ +E2P_CFLAGS = @E2P_CFLAGS@ +E2P_LIBS = @E2P_LIBS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ETAGS = @ETAGS@ +EXEEXT = @EXEEXT@ +EXT2FS_CFLAGS = @EXT2FS_CFLAGS@ +EXT2FS_LIBS = @EXT2FS_LIBS@ +EXTHELPERSDIR = @EXTHELPERSDIR@ +FGREP = @FGREP@ +FILECMD = @FILECMD@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ +GMODULE_CFLAGS = @GMODULE_CFLAGS@ +GMODULE_LIBS = @GMODULE_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +HAVE_FILECMD = @HAVE_FILECMD@ +HAVE_ZIPINFO = @HAVE_ZIPINFO@ +HAVE_nroff = @HAVE_nroff@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBMC_RELEASE = @LIBMC_RELEASE@ +LIBMC_VERSION = @LIBMC_VERSION@ +LIBOBJS = @LIBOBJS@ +LIBS = @CHECK_LIBS@ $(top_builddir)/lib/libmc.la $(am__append_1) +LIBSSH_CFLAGS = @LIBSSH_CFLAGS@ +LIBSSH_LIBS = @LIBSSH_LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANDOC = @MANDOC@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_DATE = @MAN_DATE@ +MAN_FLAGS = @MAN_FLAGS@ +MAN_VERSION = @MAN_VERSION@ +MCLIBS = @MCLIBS@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = "/lib/widget" +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCRE_CFLAGS = @PCRE_CFLAGS@ +PCRE_LIBS = @PCRE_LIBS@ +PERL = @PERL@ +PERL_FOR_BUILD = @PERL_FOR_BUILD@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POSUB = @POSUB@ +PYTHON = @PYTHON@ +RANLIB = @RANLIB@ +RUBY = @RUBY@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SLANG_CFLAGS = @SLANG_CFLAGS@ +SLANG_LIBS = @SLANG_LIBS@ +STRIP = @STRIP@ +TESTS_LDFLAGS = @TESTS_LDFLAGS@ +UNZIP = @UNZIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +X11_WWW = @X11_WWW@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +ZIP = @ZIP@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AM_CPPFLAGS = \ + $(GLIB_CFLAGS) \ + -I$(top_srcdir) \ + -I$(top_srcdir)/lib/vfs \ + @CHECK_CFLAGS@ + +AM_LDFLAGS = @TESTS_LDFLAGS@ +complete_engine_SOURCES = \ + complete_engine.c + +hotkey_equal_SOURCES = \ + hotkey_equal.c + +group_init_destroy_SOURCES = \ + group_init_destroy.c + +widget_find_by_id_SOURCES = \ + widget_find_by_id.c + +widget_make_global_local_SOURCES = \ + widget_make_global_local.c + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/lib/widget/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu tests/lib/widget/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +complete_engine$(EXEEXT): $(complete_engine_OBJECTS) $(complete_engine_DEPENDENCIES) $(EXTRA_complete_engine_DEPENDENCIES) + @rm -f complete_engine$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(complete_engine_OBJECTS) $(complete_engine_LDADD) $(LIBS) + +group_init_destroy$(EXEEXT): $(group_init_destroy_OBJECTS) $(group_init_destroy_DEPENDENCIES) $(EXTRA_group_init_destroy_DEPENDENCIES) + @rm -f group_init_destroy$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(group_init_destroy_OBJECTS) $(group_init_destroy_LDADD) $(LIBS) + +hotkey_equal$(EXEEXT): $(hotkey_equal_OBJECTS) $(hotkey_equal_DEPENDENCIES) $(EXTRA_hotkey_equal_DEPENDENCIES) + @rm -f hotkey_equal$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(hotkey_equal_OBJECTS) $(hotkey_equal_LDADD) $(LIBS) + +widget_find_by_id$(EXEEXT): $(widget_find_by_id_OBJECTS) $(widget_find_by_id_DEPENDENCIES) $(EXTRA_widget_find_by_id_DEPENDENCIES) + @rm -f widget_find_by_id$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(widget_find_by_id_OBJECTS) $(widget_find_by_id_LDADD) $(LIBS) + +widget_make_global_local$(EXEEXT): $(widget_make_global_local_OBJECTS) $(widget_make_global_local_DEPENDENCIES) $(EXTRA_widget_make_global_local_DEPENDENCIES) + @rm -f widget_make_global_local$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(widget_make_global_local_OBJECTS) $(widget_make_global_local_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/complete_engine.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/group_init_destroy.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hotkey_equal.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/widget_find_by_id.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/widget_make_global_local.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + elif test -n "$$redo_logs"; then \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: $(check_PROGRAMS) + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +complete_engine.log: complete_engine$(EXEEXT) + @p='complete_engine$(EXEEXT)'; \ + b='complete_engine'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +hotkey_equal.log: hotkey_equal$(EXEEXT) + @p='hotkey_equal$(EXEEXT)'; \ + b='hotkey_equal'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +group_init_destroy.log: group_init_destroy$(EXEEXT) + @p='group_init_destroy$(EXEEXT)'; \ + b='group_init_destroy'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +widget_find_by_id.log: widget_find_by_id$(EXEEXT) + @p='widget_find_by_id$(EXEEXT)'; \ + b='widget_find_by_id'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +widget_make_global_local.log: widget_make_global_local$(EXEEXT) + @p='widget_make_global_local$(EXEEXT)'; \ + b='widget_make_global_local'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/complete_engine.Po + -rm -f ./$(DEPDIR)/group_init_destroy.Po + -rm -f ./$(DEPDIR)/hotkey_equal.Po + -rm -f ./$(DEPDIR)/widget_find_by_id.Po + -rm -f ./$(DEPDIR)/widget_make_global_local.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/complete_engine.Po + -rm -f ./$(DEPDIR)/group_init_destroy.Po + -rm -f ./$(DEPDIR)/hotkey_equal.Po + -rm -f ./$(DEPDIR)/widget_find_by_id.Po + -rm -f ./$(DEPDIR)/widget_make_global_local.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \ + check-am clean clean-checkPROGRAMS clean-generic clean-libtool \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + recheck tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/tests/lib/widget/complete_engine.c b/tests/lib/widget/complete_engine.c new file mode 100644 index 0000000..b16a4d9 --- /dev/null +++ b/tests/lib/widget/complete_engine.c @@ -0,0 +1,236 @@ +/* + lib/widget - tests for autocomplete feature + + Copyright (C) 2013-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib/widget" + +#include "tests/mctest.h" + +#include "lib/strutil.h" +#include "lib/widget.h" + +/* --------------------------------------------------------------------------------------------- */ + +void complete_engine_fill_completions (WInput * in); +char **try_complete (char *text, int *lc_start, int *lc_end, input_complete_t flags); + +/* --------------------------------------------------------------------------------------------- */ + +/* @CapturedValue */ +static char *try_complete__text__captured; +/* @CapturedValue */ +static int try_complete__lc_start__captured; +/* @CapturedValue */ +static int try_complete__lc_end__captured; +/* @CapturedValue */ +static input_complete_t try_complete__flags__captured; + +/* @ThenReturnValue */ +static char **try_complete__return_value; + +/* @Mock */ +char ** +try_complete (char *text, int *lc_start, int *lc_end, input_complete_t flags) +{ + try_complete__text__captured = g_strdup (text); + try_complete__lc_start__captured = *lc_start; + try_complete__lc_end__captured = *lc_end; + try_complete__flags__captured = flags; + + return try_complete__return_value; +} + +static void +try_complete__init (void) +{ + try_complete__text__captured = NULL; + try_complete__lc_start__captured = 0; + try_complete__lc_end__captured = 0; + try_complete__flags__captured = 0; +} + +static void +try_complete__deinit (void) +{ + g_free (try_complete__text__captured); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ + str_init_strings (NULL); + try_complete__init (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ + try_complete__deinit (); + str_uninit_strings (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_complete_engine_fill_completions_ds") */ +/* *INDENT-OFF* */ +static const struct test_complete_engine_fill_completions_ds +{ + const char *input_buffer; + const int input_point; + const input_complete_t input_completion_flags; + int expected_start; + int expected_end; +} test_complete_engine_fill_completions_ds[] = +{ + { + "string", + 3, + INPUT_COMPLETE_NONE, + 0, + 3 + }, + { + "some string", + 7, + INPUT_COMPLETE_NONE, + 0, + 7 + }, + { + "some string", + 7, + INPUT_COMPLETE_SHELL_ESC, + 5, + 7 + }, + { + "some\\ string111", + 9, + INPUT_COMPLETE_SHELL_ESC, + 0, + 9 + }, + { + "some\\\tstring111", + 9, + INPUT_COMPLETE_SHELL_ESC, + 0, + 9 + }, + { + "some\tstring", + 7, + INPUT_COMPLETE_NONE, + 5, + 7 + }, + { + "some;string", + 7, + INPUT_COMPLETE_NONE, + 5, + 7 + }, + { + "some|string", + 7, + INPUT_COMPLETE_NONE, + 5, + 7 + }, + { + "some<string", + 7, + INPUT_COMPLETE_NONE, + 5, + 7 + }, + { + "some>string", + 7, + INPUT_COMPLETE_NONE, + 5, + 7 + }, + { + "some!@#$%^&*()_\\+~`\"',./?:string", + 30, + INPUT_COMPLETE_NONE, + 0, + 30 + }, +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_complete_engine_fill_completions_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_complete_engine_fill_completions, + test_complete_engine_fill_completions_ds) +/* *INDENT-ON* */ +{ + /* given */ + WInput *w_input; + + w_input = input_new (1, 1, NULL, 100, data->input_buffer, NULL, data->input_completion_flags); + w_input->point = data->input_point; + + /* when */ + complete_engine_fill_completions (w_input); + + /* then */ + mctest_assert_str_eq (try_complete__text__captured, data->input_buffer); + ck_assert_int_eq (try_complete__lc_start__captured, data->expected_start); + ck_assert_int_eq (try_complete__lc_end__captured, data->expected_end); + ck_assert_int_eq (try_complete__flags__captured, data->input_completion_flags); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, test_complete_engine_fill_completions, + test_complete_engine_fill_completions_ds); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/widget/group_init_destroy.c b/tests/lib/widget/group_init_destroy.c new file mode 100644 index 0000000..0da2821 --- /dev/null +++ b/tests/lib/widget/group_init_destroy.c @@ -0,0 +1,159 @@ +/* + libmc - checks for initialization and deinitialization of WGroup widget + + Copyright (C) 2020-2023 + The Free Software Foundation, Inc. + + Written by: + Andrew Borodin <aborodin@vmail.ru>, 2020-2022 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "lib/widget/group" + +#include <config.h> + +#include <check.h> + +#include "lib/widget.h" + +#include "tests/mctest.h" + +/* --------------------------------------------------------------------------------------------- */ + +static int ref = 0; + +/* --------------------------------------------------------------------------------------------- */ + +static cb_ret_t +widget_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +{ + switch (msg) + { + case MSG_INIT: + ref++; + return widget_default_callback (w, NULL, MSG_INIT, 0, NULL); + + case MSG_DESTROY: + ref--; + return widget_default_callback (w, NULL, MSG_DESTROY, 0, NULL); + + default: + return widget_default_callback (w, sender, msg, parm, data); + } +} + +/* --------------------------------------------------------------------------------------------- */ + +static cb_ret_t +group_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +{ + switch (msg) + { + case MSG_INIT: + ref++; + return group_default_callback (w, NULL, MSG_INIT, 0, NULL); + + case MSG_DESTROY: + ref--; + return group_default_callback (w, NULL, MSG_DESTROY, 0, NULL); + + default: + return group_default_callback (w, sender, msg, parm, data); + } +} + +/* --------------------------------------------------------------------------------------------- */ + +/* *INDENT-OFF* */ +START_TEST (test_group_init_deinit) +/* *INDENT-ON* */ +{ + WGroup *g, *g0; + Widget *w0; + WRect r; + + g = g_new0 (WGroup, 1); + rect_init (&r, 0, 0, 20, 20); + group_init (g, &r, group_callback, NULL); + + g0 = g_new0 (WGroup, 1); + rect_init (&r, 0, 0, 10, 10); + group_init (g0, &r, group_callback, NULL); + group_add_widget (g, g0); + + w0 = g_new0 (Widget, 1); + rect_init (&r, 0, 0, 5, 5); + widget_init (w0, &r, widget_callback, NULL); + group_add_widget (g0, w0); + + w0 = g_new0 (Widget, 1); + rect_init (&r, 5, 5, 5, 5); + widget_init (w0, &r, widget_callback, NULL); + group_add_widget (g0, w0); + + g0 = g_new0 (WGroup, 1); + rect_init (&r, 10, 10, 10, 10); + group_init (g0, &r, group_callback, NULL); + group_add_widget (g, g0); + + w0 = g_new0 (Widget, 1); + rect_init (&r, 10, 10, 5, 5); + widget_init (w0, &r, widget_callback, NULL); + group_add_widget (g0, w0); + + w0 = g_new0 (Widget, 1); + rect_init (&r, 15, 15, 5, 5); + widget_init (w0, &r, widget_callback, NULL); + group_add_widget (g0, w0); + + w0 = g_new0 (Widget, 1); + rect_init (&r, 5, 5, 10, 10); + widget_init (w0, &r, widget_callback, NULL); + group_add_widget (g, w0); + + ck_assert_msg (w0->id == 7, "last id (%d) != 7", ref); + + send_message (g, NULL, MSG_INIT, 0, NULL); + + ck_assert_msg (ref == 8, "ref (%d) != 8", ref); + + widget_destroy (WIDGET (g)); + + ck_assert_msg (ref == 0, "ref (%d) != 0", ref); +} +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + /* Add new tests here: *************** */ + tcase_add_test (tc_core, test_group_init_deinit); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/widget/hotkey_equal.c b/tests/lib/widget/hotkey_equal.c new file mode 100644 index 0000000..a455d84 --- /dev/null +++ b/tests/lib/widget/hotkey_equal.c @@ -0,0 +1,167 @@ +/* + lib/widget - tests for hotkey comparison + + Copyright (C) 2019-2023 + Free Software Foundation, Inc. + + Written by: + Andrew Borodin <aborodin@vmail.ru>, 2019 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib/widget" + +#include "tests/mctest.h" + +#include "lib/widget.h" + +#define C(x) ((char *) x) + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_hotkey_equal_ds") */ +/* *INDENT-OFF* */ +static const struct test_hotkey_equal_ds +{ + const hotkey_t hotkey1; + const hotkey_t hotkey2; + gboolean expected_result; +} test_hotkey_equal_ds[] = +{ + /* 0 */ + { + { .start = C ("abc"), .hotkey = NULL, .end = NULL }, + { .start = C ("abc"), .hotkey = NULL, .end = NULL }, + TRUE + }, + /* 1 */ + { + { .start = C (""), .hotkey = C (""), .end = C ("") }, + { .start = C (""), .hotkey = C (""), .end = C ("") }, + TRUE + }, + /* 2 */ + { + { .start = C ("abc"), .hotkey = C ("d"), .end = C ("efg") }, + { .start = C ("abc"), .hotkey = C ("d"), .end = C ("efg") }, + TRUE + }, + /* 3 */ + { + { .start = C ("abc"), .hotkey = NULL, .end = C ("efg") }, + { .start = C ("abc"), .hotkey = NULL, .end = C ("efg") }, + TRUE + }, + /* 4 */ + { + { .start = C ("abc"), .hotkey = C ("d"), .end = NULL }, + { .start = C ("abc"), .hotkey = C ("d"), .end = NULL }, + TRUE + }, + /* 5 */ + { + { .start = C ("abc"), .hotkey = C ("d"), .end = C ("efg") }, + { .start = C ("_bc"), .hotkey = C ("d"), .end = C ("efg") }, + FALSE + }, + /* 6 */ + { + { .start = C ("abc"), .hotkey = C ("d"), .end = C ("efg") }, + { .start = C ("abc"), .hotkey = C ("_"), .end = C ("efg") }, + FALSE + }, + /* 7 */ + { + { .start = C ("abc"), .hotkey = C ("d"), .end = C ("efg") }, + { .start = C ("abc"), .hotkey = C ("d"), .end = C ("_fg") }, + FALSE + }, + /* 8 */ + { + { .start = C ("abc"), .hotkey = C ("d"), .end = C ("efg") }, + { .start = C ("adc"), .hotkey = NULL, .end = C ("efg") }, + FALSE + }, + /* 9 */ + { + { .start = C ("abc"), .hotkey = C ("d"), .end = C ("efg") }, + { .start = C ("abc"), .hotkey = C ("d"), .end = NULL }, + FALSE + }, + /* 10 */ + { + { .start = C ("abc"), .hotkey = C ("d"), .end = C ("efg") }, + { .start = C ("abc"), .hotkey = NULL, .end = NULL }, + FALSE + } +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_hotkey_equal_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_hotkey_equal, + test_hotkey_equal_ds) +/* *INDENT-ON* */ +{ + /* given */ + gboolean result; + + /* when */ + result = hotkey_equal (data->hotkey1, data->hotkey2); + + /* then */ + ck_assert_int_eq (result, data->expected_result); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, test_hotkey_equal, test_hotkey_equal_ds); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/widget/widget_find_by_id.c b/tests/lib/widget/widget_find_by_id.c new file mode 100644 index 0000000..2477c02 --- /dev/null +++ b/tests/lib/widget/widget_find_by_id.c @@ -0,0 +1,120 @@ +/* + libmc - checks for search widget with requested ID + + Copyright (C) 2020-2023 + The Free Software Foundation, Inc. + + Written by: + Andrew Borodin <aborodin@vmail.ru>, 2020-2022 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "lib/widget" + +#include <config.h> + +#include <check.h> + +#include "lib/widget.h" + +#include "tests/mctest.h" + +/* --------------------------------------------------------------------------------------------- */ + +/* *INDENT-OFF* */ +START_TEST (test_widget_find_by_id) +/* *INDENT-ON* */ +{ + WGroup *g, *g0; + Widget *w0; + WRect r; + + g = g_new0 (WGroup, 1); + rect_init (&r, 0, 0, 20, 20); + group_init (g, &r, NULL, NULL); /* ID = 0 */ + + g0 = g_new0 (WGroup, 1); + rect_init (&r, 0, 0, 10, 10); + group_init (g0, &r, NULL, NULL); /* ID = 1 */ + group_add_widget (g, g0); + + w0 = g_new0 (Widget, 1); + rect_init (&r, 0, 0, 5, 5); + widget_init (w0, &r, widget_default_callback, NULL); /* ID = 2 */ + group_add_widget (g0, w0); + + w0 = g_new0 (Widget, 1); + rect_init (&r, 5, 5, 5, 5); + widget_init (w0, &r, widget_default_callback, NULL); /* ID = 3 */ + group_add_widget (g0, w0); + + g0 = g_new0 (WGroup, 1); + rect_init (&r, 10, 10, 10, 10); + group_init (g0, &r, NULL, NULL); /* ID = 4 */ + group_add_widget (g, g0); + + w0 = g_new0 (Widget, 1); + rect_init (&r, 10, 10, 5, 5); + widget_init (w0, &r, widget_default_callback, NULL); /* ID = 5 */ + group_add_widget (g0, w0); + + w0 = g_new0 (Widget, 1); + rect_init (&r, 15, 15, 5, 5); + widget_init (w0, &r, widget_default_callback, NULL); /* ID = 6 */ + group_add_widget (g0, w0); + + w0 = g_new0 (Widget, 1); + rect_init (&r, 5, 5, 10, 10); + widget_init (w0, &r, widget_default_callback, NULL); /* ID = 7 */ + group_add_widget (g, w0); + + w0 = WIDGET (g); + + ck_assert_msg (widget_find_by_id (w0, 0) != NULL, "Not found ID=0"); + ck_assert_msg (widget_find_by_id (w0, 1) != NULL, "Not found ID=1"); + ck_assert_msg (widget_find_by_id (w0, 2) != NULL, "Not found ID=2"); + ck_assert_msg (widget_find_by_id (w0, 3) != NULL, "Not found ID=3"); + ck_assert_msg (widget_find_by_id (w0, 4) != NULL, "Not found ID=4"); + ck_assert_msg (widget_find_by_id (w0, 5) != NULL, "Not found ID=5"); + ck_assert_msg (widget_find_by_id (w0, 6) != NULL, "Not found ID=6"); + ck_assert_msg (widget_find_by_id (w0, 7) != NULL, "Not found ID=7"); + ck_assert_msg (widget_find_by_id (w0, 8) == NULL, "Found ID=8"); + + send_message (g, NULL, MSG_INIT, 0, NULL); + widget_destroy (w0); +} +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + /* Add new tests here: *************** */ + tcase_add_test (tc_core, test_widget_find_by_id); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/widget/widget_make_global_local.c b/tests/lib/widget/widget_make_global_local.c new file mode 100644 index 0000000..379746d --- /dev/null +++ b/tests/lib/widget/widget_make_global_local.c @@ -0,0 +1,145 @@ +/* + libmc - checks for search widget with requested ID + + Copyright (C) 2021-2023 + The Free Software Foundation, Inc. + + Written by: + Andrew Borodin <aborodin@vmail.ru>, 2021-2022 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "lib/widget" + +#include <config.h> + +#include <check.h> + +#include "lib/widget.h" + +#include "tests/mctest.h" + +/* --------------------------------------------------------------------------------------------- */ + +/* *INDENT-OFF* */ +START_TEST (test_widget_make_global_local) +/* *INDENT-ON* */ +{ + WRect r; + WGroup *g0, *g1, *g2; + Widget *w0, *w1, *w2; + + /* top level group */ + g0 = g_new0 (WGroup, 1); + rect_init (&r, 20, 20, 40, 40); + group_init (g0, &r, NULL, NULL); + + /* g0 child */ + w0 = g_new0 (Widget, 1); + rect_init (&r, 1, 1, 5, 5); + widget_init (w0, &r, widget_default_callback, NULL); + group_add_widget (g0, w0); + + /* g0 child */ + g1 = g_new0 (WGroup, 1); + rect_init (&r, 5, 5, 30, 30); + group_init (g1, &r, NULL, NULL); + + /* g1 child */ + w1 = g_new0 (Widget, 1); + rect_init (&r, 5, 5, 10, 10); + widget_init (w1, &r, widget_default_callback, NULL); + group_add_widget (g1, w1); + + /* g1 child */ + g2 = g_new0 (WGroup, 1); + rect_init (&r, 15, 15, 20, 20); + group_init (g2, &r, NULL, NULL); + group_add_widget (g1, g2); + + /* g2 child */ + w2 = g_new0 (Widget, 1); + rect_init (&r, 15, 15, 5, 5); + widget_init (w2, &r, widget_default_callback, NULL); + group_add_widget (g2, w2); + + /* g0 child */ + group_add_widget (g0, g1); + + /* test global coordinates */ + /* w0 is a member of g0 */ + ck_assert_int_eq (w0->rect.y, 21); + ck_assert_int_eq (w0->rect.x, 21); + /* g1 is a member of g0 */ + ck_assert_int_eq (WIDGET (g1)->rect.y, 25); + ck_assert_int_eq (WIDGET (g1)->rect.x, 25); + /* w1 is a member of g1 */ + ck_assert_int_eq (w1->rect.y, 30); + ck_assert_int_eq (w1->rect.x, 30); + /* g2 is a member of g1 */ + ck_assert_int_eq (WIDGET (g2)->rect.y, 40); + ck_assert_int_eq (WIDGET (g2)->rect.x, 40); + /* w2 is a member of g2 */ + ck_assert_int_eq (w2->rect.y, 55); + ck_assert_int_eq (w2->rect.x, 55); + + group_remove_widget (w0); + group_remove_widget (g1); + + /* test local coordinates */ + /* w0 is not a member of g0 */ + ck_assert_int_eq (w0->rect.y, 1); + ck_assert_int_eq (w0->rect.x, 1); + + /* g1 is not a member of g0 */ + ck_assert_int_eq (WIDGET (g1)->rect.y, 5); + ck_assert_int_eq (WIDGET (g1)->rect.x, 5); + /* w1 is a member of g1 */ + ck_assert_int_eq (w1->rect.y, 10); + ck_assert_int_eq (w1->rect.x, 10); + /* g2 is not a member of g1 */ + ck_assert_int_eq (WIDGET (g2)->rect.y, 20); + ck_assert_int_eq (WIDGET (g2)->rect.x, 20); + /* w2 is a member of g2 */ + ck_assert_int_eq (w2->rect.y, 35); + ck_assert_int_eq (w2->rect.x, 35); + + widget_destroy (w0); + widget_destroy (WIDGET (g1)); + widget_destroy (WIDGET (g0)); +} +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + /* Add new tests here: *************** */ + tcase_add_test (tc_core, test_widget_make_global_local); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/lib/x_basename.c b/tests/lib/x_basename.c new file mode 100644 index 0000000..2adce3b --- /dev/null +++ b/tests/lib/x_basename.c @@ -0,0 +1,128 @@ +/* + lib - x_basename() function testing + + Copyright (C) 2011-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2011, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/lib" + +#include "tests/mctest.h" + +#include <stdio.h> + +#include "lib/strutil.h" +#include "lib/util.h" + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_x_basename_ds") */ +/* *INDENT-OFF* */ +static const struct test_x_basename_ds +{ + const char *input_value; + const char *expected_result; +} test_x_basename_ds[] = +{ + { + "/test/path/test2/path2", + "path2" + }, + { + "/test/path/test2/path2#vfsprefix", + "path2#vfsprefix" + }, + { + "/test/path/test2/path2/vfsprefix://", + "path2/vfsprefix://" + }, + { + "/test/path/test2/path2/vfsprefix://subdir", + "subdir" + }, + { + "/test/path/test2/path2/vfsprefix://subdir/", + "subdir/" + }, + { + "/test/path/test2/path2/vfsprefix://subdir/subdir2", + "subdir2" + }, + { + "/test/path/test2/path2/vfsprefix:///", + "/" + }, +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_x_basename_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_x_basename, test_x_basename_ds) +/* *INDENT-ON* */ +{ + /* given */ + const char *actual_result; + + /* when */ + actual_result = x_basename (data->input_value); + + /* then */ + mctest_assert_str_eq (actual_result, data->expected_result); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, test_x_basename, test_x_basename_ds); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/mctest.h b/tests/mctest.h new file mode 100644 index 0000000..ae14ae3 --- /dev/null +++ b/tests/mctest.h @@ -0,0 +1,104 @@ +#ifndef MC__TEST +#define MC__TEST + +#include <config.h> +#include <stdlib.h> +#include <check.h> + +#include "lib/global.h" + +/*** typedefs(not structures) and defined constants **********************************************/ + +#define mctest_add_parameterized_test(tc_core, test_func, test_data_source) { \ + tcase_add_loop_test (tc_core, test_func, 0, G_N_ELEMENTS (test_data_source)); \ +} + +#define mctest_assert_str_eq(actual_result, etalon_result) { \ + g_assert_cmpstr (actual_result, ==, etalon_result); \ +} + +#define mctest_assert_ptr_eq(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) { \ + 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) { \ + ck_assert_msg ( \ + (void *) actual_pointer == NULL, \ + "%s(%p) variable should be NULL", #actual_pointer, actual_pointer \ + ); \ +} + +#define mctest_assert_not_null(actual_pointer) { \ + 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 FALSE", #actual_pointer \ + ); \ +} + +/** + * Define header for a parameterized test. + * Declare 'data' variable for access to the parameters in current iteration + */ +#define START_PARAMETRIZED_TEST(name_test, struct_name) \ + START_TEST (name_test) { \ + const struct struct_name *data = &struct_name[_i]; + +/** + * Define footer for a parameterized test. + */ +#define END_PARAMETRIZED_TEST \ + } END_TEST + +/*** enums ***************************************************************************************/ + +/*** structures declarations (and typedefs of structures)*****************************************/ + +/*** global variables defined in .c file *********************************************************/ + +/*** declarations of public functions ************************************************************/ + +/*** inline functions ****************************************************************************/ + +static inline int +mctest_run_all (TCase * tc_core) +{ + Suite *s; + SRunner *sr; + int number_failed; + + s = suite_create (TEST_SUITE_NAME); + suite_add_tcase (s, tc_core); + sr = srunner_create (s); + srunner_set_log (sr, "-"); + srunner_run_all (sr, CK_ENV); + number_failed = srunner_ntests_failed (sr); + srunner_free (sr); + + return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; +} + +#endif /* MC__TEST */ diff --git a/tests/src/Makefile.am b/tests/src/Makefile.am new file mode 100644 index 0000000..798f4f3 --- /dev/null +++ b/tests/src/Makefile.am @@ -0,0 +1,44 @@ +PACKAGE_STRING = "/src" + +SUBDIRS = . filemanager vfs + +if USE_INTERNAL_EDIT +SUBDIRS += editor +endif + +AM_CPPFLAGS = \ + $(GLIB_CFLAGS) \ + -I$(top_srcdir) \ + -I$(top_srcdir)/lib/vfs \ + @CHECK_CFLAGS@ + +AM_LDFLAGS = @TESTS_LDFLAGS@ + +LIBS = @CHECK_LIBS@ \ + $(top_builddir)/src/libinternal.la \ + $(top_builddir)/lib/libmc.la + +if ENABLE_MCLIB +LIBS += $(GLIB_LIBS) +endif + +EXTRA_DIST = execute__common.c + +TESTS = \ + execute__execute_with_vfs_arg \ + execute__execute_external_editor_or_viewer \ + execute__execute_get_external_cmd_opts_from_config + +check_PROGRAMS = $(TESTS) + +execute__execute_with_vfs_arg_SOURCES = \ + execute__execute_with_vfs_arg.c + + +execute__execute_external_editor_or_viewer_SOURCES = \ + execute__execute_external_editor_or_viewer.c + + +execute__execute_get_external_cmd_opts_from_config_SOURCES = \ + execute__execute_get_external_cmd_opts_from_config.c + diff --git a/tests/src/Makefile.in b/tests/src/Makefile.in new file mode 100644 index 0000000..4bb3983 --- /dev/null +++ b/tests/src/Makefile.in @@ -0,0 +1,1290 @@ +# Makefile.in generated by automake 1.16.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2021 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@USE_INTERNAL_EDIT_TRUE@am__append_1 = editor +@ENABLE_MCLIB_TRUE@am__append_2 = $(GLIB_LIBS) +TESTS = execute__execute_with_vfs_arg$(EXEEXT) \ + execute__execute_external_editor_or_viewer$(EXEEXT) \ + execute__execute_get_external_cmd_opts_from_config$(EXEEXT) +check_PROGRAMS = $(am__EXEEXT_1) +subdir = tests/src +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/m4.include/gnulib/mode_t.m4 \ + $(top_srcdir)/m4.include/gnulib/stat-size.m4 \ + $(top_srcdir)/m4.include/gnulib/fstypename.m4 \ + $(top_srcdir)/m4.include/gnulib/fsusage.m4 \ + $(top_srcdir)/m4.include/gnulib/mountlist.m4 \ + $(top_srcdir)/m4.include/gnulib/windows-stat-inodes.m4 \ + $(top_srcdir)/m4.include/gnulib/sys_types_h.m4 \ + $(top_srcdir)/m4.include/ax_path_lib_pcre.m4 \ + $(top_srcdir)/m4.include/ax_check_pcre2.m4 \ + $(top_srcdir)/m4.include/dx_doxygen.m4 \ + $(top_srcdir)/m4.include/ax_require_defined.m4 \ + $(top_srcdir)/m4.include/ax_check_compile_flag.m4 \ + $(top_srcdir)/m4.include/ax_append_flag.m4 \ + $(top_srcdir)/m4.include/ax_append_compile_flags.m4 \ + $(top_srcdir)/m4.include/mc-cflags.m4 \ + $(top_srcdir)/m4.include/ax_gcc_func_attribute.m4 \ + $(top_srcdir)/m4.include/mc-check-search-type.m4 \ + $(top_srcdir)/m4.include/mc-get-fs-info.m4 \ + $(top_srcdir)/m4.include/mc-with-x.m4 \ + $(top_srcdir)/m4.include/mc-use-termcap.m4 \ + $(top_srcdir)/m4.include/mc-with-screen.m4 \ + $(top_srcdir)/m4.include/mc-with-screen-ncurses.m4 \ + $(top_srcdir)/m4.include/mc-with-screen-slang.m4 \ + $(top_srcdir)/m4.include/mc-with-internal-edit.m4 \ + $(top_srcdir)/m4.include/mc-subshell.m4 \ + $(top_srcdir)/m4.include/mc-background.m4 \ + $(top_srcdir)/m4.include/mc-ext2fs-attr.m4 \ + $(top_srcdir)/m4.include/mc-glib.m4 \ + $(top_srcdir)/m4.include/mc-vfs.m4 \ + $(top_srcdir)/m4.include/vfs/rpc.m4 \ + $(top_srcdir)/m4.include/vfs/socket.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-extfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-sfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-ftp.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-sftp.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-fish.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-undelfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-tarfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-cpiofs.m4 \ + $(top_srcdir)/m4.include/mc-version.m4 \ + $(top_srcdir)/m4.include/mc-tests.m4 \ + $(top_srcdir)/m4.include/mc-i18n.m4 \ + $(top_srcdir)/m4.include/mc-assert.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__EXEEXT_1 = execute__execute_with_vfs_arg$(EXEEXT) \ + execute__execute_external_editor_or_viewer$(EXEEXT) \ + execute__execute_get_external_cmd_opts_from_config$(EXEEXT) +am_execute__execute_external_editor_or_viewer_OBJECTS = \ + execute__execute_external_editor_or_viewer.$(OBJEXT) +execute__execute_external_editor_or_viewer_OBJECTS = \ + $(am_execute__execute_external_editor_or_viewer_OBJECTS) +execute__execute_external_editor_or_viewer_LDADD = $(LDADD) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +am_execute__execute_get_external_cmd_opts_from_config_OBJECTS = \ + execute__execute_get_external_cmd_opts_from_config.$(OBJEXT) +execute__execute_get_external_cmd_opts_from_config_OBJECTS = $(am_execute__execute_get_external_cmd_opts_from_config_OBJECTS) +execute__execute_get_external_cmd_opts_from_config_LDADD = $(LDADD) +am_execute__execute_with_vfs_arg_OBJECTS = \ + execute__execute_with_vfs_arg.$(OBJEXT) +execute__execute_with_vfs_arg_OBJECTS = \ + $(am_execute__execute_with_vfs_arg_OBJECTS) +execute__execute_with_vfs_arg_LDADD = $(LDADD) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = \ + ./$(DEPDIR)/execute__execute_external_editor_or_viewer.Po \ + ./$(DEPDIR)/execute__execute_get_external_cmd_opts_from_config.Po \ + ./$(DEPDIR)/execute__execute_with_vfs_arg.Po +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(execute__execute_external_editor_or_viewer_SOURCES) \ + $(execute__execute_get_external_cmd_opts_from_config_SOURCES) \ + $(execute__execute_with_vfs_arg_SOURCES) +DIST_SOURCES = $(execute__execute_external_editor_or_viewer_SOURCES) \ + $(execute__execute_get_external_cmd_opts_from_config_SOURCES) \ + $(execute__execute_with_vfs_arg_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + check recheck distdir distdir-am +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red='[0;31m'; \ + grn='[0;32m'; \ + lgn='[1;32m'; \ + blu='[1;34m'; \ + mgn='[0;35m'; \ + brg='[1m'; \ + std='[m'; \ + fi; \ +} +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' +RECHECK_LOGS = $(TEST_LOGS) +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +DIST_SUBDIRS = . filemanager vfs editor +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ + $(top_srcdir)/config/test-driver +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +COM_ERR_CFLAGS = @COM_ERR_CFLAGS@ +COM_ERR_LIBS = @COM_ERR_LIBS@ +CP1251 = @CP1251@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DOC_LINGUAS = @DOC_LINGUAS@ +DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +DX_CONFIG = @DX_CONFIG@ +DX_DOCDIR = @DX_DOCDIR@ +DX_DOT = @DX_DOT@ +DX_DOXYGEN = @DX_DOXYGEN@ +DX_DVIPS = @DX_DVIPS@ +DX_EGREP = @DX_EGREP@ +DX_ENV = @DX_ENV@ +DX_FLAG_chi = @DX_FLAG_chi@ +DX_FLAG_chm = @DX_FLAG_chm@ +DX_FLAG_doc = @DX_FLAG_doc@ +DX_FLAG_dot = @DX_FLAG_dot@ +DX_FLAG_html = @DX_FLAG_html@ +DX_FLAG_man = @DX_FLAG_man@ +DX_FLAG_pdf = @DX_FLAG_pdf@ +DX_FLAG_ps = @DX_FLAG_ps@ +DX_FLAG_rtf = @DX_FLAG_rtf@ +DX_FLAG_xml = @DX_FLAG_xml@ +DX_HHC = @DX_HHC@ +DX_LATEX = @DX_LATEX@ +DX_MAKEINDEX = @DX_MAKEINDEX@ +DX_PDFLATEX = @DX_PDFLATEX@ +DX_PERL = @DX_PERL@ +DX_PROJECT = @DX_PROJECT@ +E2P_CFLAGS = @E2P_CFLAGS@ +E2P_LIBS = @E2P_LIBS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ETAGS = @ETAGS@ +EXEEXT = @EXEEXT@ +EXT2FS_CFLAGS = @EXT2FS_CFLAGS@ +EXT2FS_LIBS = @EXT2FS_LIBS@ +EXTHELPERSDIR = @EXTHELPERSDIR@ +FGREP = @FGREP@ +FILECMD = @FILECMD@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ +GMODULE_CFLAGS = @GMODULE_CFLAGS@ +GMODULE_LIBS = @GMODULE_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +HAVE_FILECMD = @HAVE_FILECMD@ +HAVE_ZIPINFO = @HAVE_ZIPINFO@ +HAVE_nroff = @HAVE_nroff@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBMC_RELEASE = @LIBMC_RELEASE@ +LIBMC_VERSION = @LIBMC_VERSION@ +LIBOBJS = @LIBOBJS@ +LIBS = @CHECK_LIBS@ $(top_builddir)/src/libinternal.la \ + $(top_builddir)/lib/libmc.la $(am__append_2) +LIBSSH_CFLAGS = @LIBSSH_CFLAGS@ +LIBSSH_LIBS = @LIBSSH_LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANDOC = @MANDOC@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_DATE = @MAN_DATE@ +MAN_FLAGS = @MAN_FLAGS@ +MAN_VERSION = @MAN_VERSION@ +MCLIBS = @MCLIBS@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = "/src" +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCRE_CFLAGS = @PCRE_CFLAGS@ +PCRE_LIBS = @PCRE_LIBS@ +PERL = @PERL@ +PERL_FOR_BUILD = @PERL_FOR_BUILD@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POSUB = @POSUB@ +PYTHON = @PYTHON@ +RANLIB = @RANLIB@ +RUBY = @RUBY@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SLANG_CFLAGS = @SLANG_CFLAGS@ +SLANG_LIBS = @SLANG_LIBS@ +STRIP = @STRIP@ +TESTS_LDFLAGS = @TESTS_LDFLAGS@ +UNZIP = @UNZIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +X11_WWW = @X11_WWW@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +ZIP = @ZIP@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = . filemanager vfs $(am__append_1) +AM_CPPFLAGS = \ + $(GLIB_CFLAGS) \ + -I$(top_srcdir) \ + -I$(top_srcdir)/lib/vfs \ + @CHECK_CFLAGS@ + +AM_LDFLAGS = @TESTS_LDFLAGS@ +EXTRA_DIST = execute__common.c +execute__execute_with_vfs_arg_SOURCES = \ + execute__execute_with_vfs_arg.c + +execute__execute_external_editor_or_viewer_SOURCES = \ + execute__execute_external_editor_or_viewer.c + +execute__execute_get_external_cmd_opts_from_config_SOURCES = \ + execute__execute_get_external_cmd_opts_from_config.c + +all: all-recursive + +.SUFFIXES: +.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/src/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu tests/src/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +execute__execute_external_editor_or_viewer$(EXEEXT): $(execute__execute_external_editor_or_viewer_OBJECTS) $(execute__execute_external_editor_or_viewer_DEPENDENCIES) $(EXTRA_execute__execute_external_editor_or_viewer_DEPENDENCIES) + @rm -f execute__execute_external_editor_or_viewer$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execute__execute_external_editor_or_viewer_OBJECTS) $(execute__execute_external_editor_or_viewer_LDADD) $(LIBS) + +execute__execute_get_external_cmd_opts_from_config$(EXEEXT): $(execute__execute_get_external_cmd_opts_from_config_OBJECTS) $(execute__execute_get_external_cmd_opts_from_config_DEPENDENCIES) $(EXTRA_execute__execute_get_external_cmd_opts_from_config_DEPENDENCIES) + @rm -f execute__execute_get_external_cmd_opts_from_config$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execute__execute_get_external_cmd_opts_from_config_OBJECTS) $(execute__execute_get_external_cmd_opts_from_config_LDADD) $(LIBS) + +execute__execute_with_vfs_arg$(EXEEXT): $(execute__execute_with_vfs_arg_OBJECTS) $(execute__execute_with_vfs_arg_DEPENDENCIES) $(EXTRA_execute__execute_with_vfs_arg_DEPENDENCIES) + @rm -f execute__execute_with_vfs_arg$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execute__execute_with_vfs_arg_OBJECTS) $(execute__execute_with_vfs_arg_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execute__execute_external_editor_or_viewer.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execute__execute_get_external_cmd_opts_from_config.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execute__execute_with_vfs_arg.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + elif test -n "$$redo_logs"; then \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: $(check_PROGRAMS) + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +execute__execute_with_vfs_arg.log: execute__execute_with_vfs_arg$(EXEEXT) + @p='execute__execute_with_vfs_arg$(EXEEXT)'; \ + b='execute__execute_with_vfs_arg'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +execute__execute_external_editor_or_viewer.log: execute__execute_external_editor_or_viewer$(EXEEXT) + @p='execute__execute_external_editor_or_viewer$(EXEEXT)'; \ + b='execute__execute_external_editor_or_viewer'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +execute__execute_get_external_cmd_opts_from_config.log: execute__execute_get_external_cmd_opts_from_config$(EXEEXT) + @p='execute__execute_get_external_cmd_opts_from_config$(EXEEXT)'; \ + b='execute__execute_get_external_cmd_opts_from_config'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-recursive + -rm -f ./$(DEPDIR)/execute__execute_external_editor_or_viewer.Po + -rm -f ./$(DEPDIR)/execute__execute_get_external_cmd_opts_from_config.Po + -rm -f ./$(DEPDIR)/execute__execute_with_vfs_arg.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f ./$(DEPDIR)/execute__execute_external_editor_or_viewer.Po + -rm -f ./$(DEPDIR)/execute__execute_get_external_cmd_opts_from_config.Po + -rm -f ./$(DEPDIR)/execute__execute_with_vfs_arg.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(am__recursive_targets) check-am install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--depfiles check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + recheck tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/tests/src/editor/Makefile.am b/tests/src/editor/Makefile.am new file mode 100644 index 0000000..cf89d33 --- /dev/null +++ b/tests/src/editor/Makefile.am @@ -0,0 +1,28 @@ +PACKAGE_STRING = "/src/editor" + +AM_CPPFLAGS = \ + -DTEST_SHARE_DIR=\"$(abs_srcdir)\" \ + $(GLIB_CFLAGS) \ + -I$(top_srcdir) \ + @CHECK_CFLAGS@ + +AM_LDFLAGS = @TESTS_LDFLAGS@ + +LIBS = @CHECK_LIBS@ \ + $(top_builddir)/src/libinternal.la \ + $(top_builddir)/lib/libmc.la + +if ENABLE_MCLIB +LIBS += $(GLIB_LIBS) +endif + +EXTRA_DIST = mc.charsets test-data.txt.in + +TESTS = \ + edit_complete_word_cmd + +check_PROGRAMS = $(TESTS) + +edit_complete_word_cmd_SOURCES = \ + edit_complete_word_cmd.c + diff --git a/tests/src/editor/Makefile.in b/tests/src/editor/Makefile.in new file mode 100644 index 0000000..d16c560 --- /dev/null +++ b/tests/src/editor/Makefile.in @@ -0,0 +1,1119 @@ +# Makefile.in generated by automake 1.16.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2021 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@ENABLE_MCLIB_TRUE@am__append_1 = $(GLIB_LIBS) +TESTS = edit_complete_word_cmd$(EXEEXT) +check_PROGRAMS = $(am__EXEEXT_1) +subdir = tests/src/editor +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/m4.include/gnulib/mode_t.m4 \ + $(top_srcdir)/m4.include/gnulib/stat-size.m4 \ + $(top_srcdir)/m4.include/gnulib/fstypename.m4 \ + $(top_srcdir)/m4.include/gnulib/fsusage.m4 \ + $(top_srcdir)/m4.include/gnulib/mountlist.m4 \ + $(top_srcdir)/m4.include/gnulib/windows-stat-inodes.m4 \ + $(top_srcdir)/m4.include/gnulib/sys_types_h.m4 \ + $(top_srcdir)/m4.include/ax_path_lib_pcre.m4 \ + $(top_srcdir)/m4.include/ax_check_pcre2.m4 \ + $(top_srcdir)/m4.include/dx_doxygen.m4 \ + $(top_srcdir)/m4.include/ax_require_defined.m4 \ + $(top_srcdir)/m4.include/ax_check_compile_flag.m4 \ + $(top_srcdir)/m4.include/ax_append_flag.m4 \ + $(top_srcdir)/m4.include/ax_append_compile_flags.m4 \ + $(top_srcdir)/m4.include/mc-cflags.m4 \ + $(top_srcdir)/m4.include/ax_gcc_func_attribute.m4 \ + $(top_srcdir)/m4.include/mc-check-search-type.m4 \ + $(top_srcdir)/m4.include/mc-get-fs-info.m4 \ + $(top_srcdir)/m4.include/mc-with-x.m4 \ + $(top_srcdir)/m4.include/mc-use-termcap.m4 \ + $(top_srcdir)/m4.include/mc-with-screen.m4 \ + $(top_srcdir)/m4.include/mc-with-screen-ncurses.m4 \ + $(top_srcdir)/m4.include/mc-with-screen-slang.m4 \ + $(top_srcdir)/m4.include/mc-with-internal-edit.m4 \ + $(top_srcdir)/m4.include/mc-subshell.m4 \ + $(top_srcdir)/m4.include/mc-background.m4 \ + $(top_srcdir)/m4.include/mc-ext2fs-attr.m4 \ + $(top_srcdir)/m4.include/mc-glib.m4 \ + $(top_srcdir)/m4.include/mc-vfs.m4 \ + $(top_srcdir)/m4.include/vfs/rpc.m4 \ + $(top_srcdir)/m4.include/vfs/socket.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-extfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-sfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-ftp.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-sftp.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-fish.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-undelfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-tarfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-cpiofs.m4 \ + $(top_srcdir)/m4.include/mc-version.m4 \ + $(top_srcdir)/m4.include/mc-tests.m4 \ + $(top_srcdir)/m4.include/mc-i18n.m4 \ + $(top_srcdir)/m4.include/mc-assert.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = test-data.txt +CONFIG_CLEAN_VPATH_FILES = +am__EXEEXT_1 = edit_complete_word_cmd$(EXEEXT) +am_edit_complete_word_cmd_OBJECTS = edit_complete_word_cmd.$(OBJEXT) +edit_complete_word_cmd_OBJECTS = $(am_edit_complete_word_cmd_OBJECTS) +edit_complete_word_cmd_LDADD = $(LDADD) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/edit_complete_word_cmd.Po +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(edit_complete_word_cmd_SOURCES) +DIST_SOURCES = $(edit_complete_word_cmd_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red='[0;31m'; \ + grn='[0;32m'; \ + lgn='[1;32m'; \ + blu='[1;34m'; \ + mgn='[0;35m'; \ + brg='[1m'; \ + std='[m'; \ + fi; \ +} +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/test-data.txt.in \ + $(top_srcdir)/config/depcomp $(top_srcdir)/config/test-driver +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +COM_ERR_CFLAGS = @COM_ERR_CFLAGS@ +COM_ERR_LIBS = @COM_ERR_LIBS@ +CP1251 = @CP1251@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DOC_LINGUAS = @DOC_LINGUAS@ +DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +DX_CONFIG = @DX_CONFIG@ +DX_DOCDIR = @DX_DOCDIR@ +DX_DOT = @DX_DOT@ +DX_DOXYGEN = @DX_DOXYGEN@ +DX_DVIPS = @DX_DVIPS@ +DX_EGREP = @DX_EGREP@ +DX_ENV = @DX_ENV@ +DX_FLAG_chi = @DX_FLAG_chi@ +DX_FLAG_chm = @DX_FLAG_chm@ +DX_FLAG_doc = @DX_FLAG_doc@ +DX_FLAG_dot = @DX_FLAG_dot@ +DX_FLAG_html = @DX_FLAG_html@ +DX_FLAG_man = @DX_FLAG_man@ +DX_FLAG_pdf = @DX_FLAG_pdf@ +DX_FLAG_ps = @DX_FLAG_ps@ +DX_FLAG_rtf = @DX_FLAG_rtf@ +DX_FLAG_xml = @DX_FLAG_xml@ +DX_HHC = @DX_HHC@ +DX_LATEX = @DX_LATEX@ +DX_MAKEINDEX = @DX_MAKEINDEX@ +DX_PDFLATEX = @DX_PDFLATEX@ +DX_PERL = @DX_PERL@ +DX_PROJECT = @DX_PROJECT@ +E2P_CFLAGS = @E2P_CFLAGS@ +E2P_LIBS = @E2P_LIBS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ETAGS = @ETAGS@ +EXEEXT = @EXEEXT@ +EXT2FS_CFLAGS = @EXT2FS_CFLAGS@ +EXT2FS_LIBS = @EXT2FS_LIBS@ +EXTHELPERSDIR = @EXTHELPERSDIR@ +FGREP = @FGREP@ +FILECMD = @FILECMD@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ +GMODULE_CFLAGS = @GMODULE_CFLAGS@ +GMODULE_LIBS = @GMODULE_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +HAVE_FILECMD = @HAVE_FILECMD@ +HAVE_ZIPINFO = @HAVE_ZIPINFO@ +HAVE_nroff = @HAVE_nroff@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBMC_RELEASE = @LIBMC_RELEASE@ +LIBMC_VERSION = @LIBMC_VERSION@ +LIBOBJS = @LIBOBJS@ +LIBS = @CHECK_LIBS@ $(top_builddir)/src/libinternal.la \ + $(top_builddir)/lib/libmc.la $(am__append_1) +LIBSSH_CFLAGS = @LIBSSH_CFLAGS@ +LIBSSH_LIBS = @LIBSSH_LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANDOC = @MANDOC@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_DATE = @MAN_DATE@ +MAN_FLAGS = @MAN_FLAGS@ +MAN_VERSION = @MAN_VERSION@ +MCLIBS = @MCLIBS@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = "/src/editor" +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCRE_CFLAGS = @PCRE_CFLAGS@ +PCRE_LIBS = @PCRE_LIBS@ +PERL = @PERL@ +PERL_FOR_BUILD = @PERL_FOR_BUILD@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POSUB = @POSUB@ +PYTHON = @PYTHON@ +RANLIB = @RANLIB@ +RUBY = @RUBY@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SLANG_CFLAGS = @SLANG_CFLAGS@ +SLANG_LIBS = @SLANG_LIBS@ +STRIP = @STRIP@ +TESTS_LDFLAGS = @TESTS_LDFLAGS@ +UNZIP = @UNZIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +X11_WWW = @X11_WWW@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +ZIP = @ZIP@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AM_CPPFLAGS = \ + -DTEST_SHARE_DIR=\"$(abs_srcdir)\" \ + $(GLIB_CFLAGS) \ + -I$(top_srcdir) \ + @CHECK_CFLAGS@ + +AM_LDFLAGS = @TESTS_LDFLAGS@ +EXTRA_DIST = mc.charsets test-data.txt.in +edit_complete_word_cmd_SOURCES = \ + edit_complete_word_cmd.c + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/src/editor/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu tests/src/editor/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +test-data.txt: $(top_builddir)/config.status $(srcdir)/test-data.txt.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +edit_complete_word_cmd$(EXEEXT): $(edit_complete_word_cmd_OBJECTS) $(edit_complete_word_cmd_DEPENDENCIES) $(EXTRA_edit_complete_word_cmd_DEPENDENCIES) + @rm -f edit_complete_word_cmd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(edit_complete_word_cmd_OBJECTS) $(edit_complete_word_cmd_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edit_complete_word_cmd.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + elif test -n "$$redo_logs"; then \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: $(check_PROGRAMS) + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +edit_complete_word_cmd.log: edit_complete_word_cmd$(EXEEXT) + @p='edit_complete_word_cmd$(EXEEXT)'; \ + b='edit_complete_word_cmd'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/edit_complete_word_cmd.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/edit_complete_word_cmd.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \ + check-am clean clean-checkPROGRAMS clean-generic clean-libtool \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + recheck tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/tests/src/editor/edit_complete_word_cmd.c b/tests/src/editor/edit_complete_word_cmd.c new file mode 100644 index 0000000..77bb4d0 --- /dev/null +++ b/tests/src/editor/edit_complete_word_cmd.c @@ -0,0 +1,401 @@ +/* + src/editor - tests for edit_complete_word_cmd() function + + Copyright (C) 2013-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2013 + Andrew Borodin <aborodin@vmail.ru>, 2021-2022 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/src/editor" + +#include "tests/mctest.h" + +#include <ctype.h> + +#ifdef HAVE_CHARSET +#include "lib/charsets.h" +#endif +#include "lib/strutil.h" + +#include "src/vfs/local/local.c" +#ifdef HAVE_CHARSET +#include "src/selcodepage.h" +#endif +#include "src/editor/editwidget.h" +#include "src/editor/editmacros.h" /* edit_load_macro_cmd() */ +#include "src/editor/editcomplete.h" + +static WGroup owner; +static WEdit *test_edit; + +/* --------------------------------------------------------------------------------------------- */ +/* @Mock */ +void +mc_refresh (void) +{ +} + +/* --------------------------------------------------------------------------------------------- */ +/* @Mock */ +void +edit_load_syntax (WEdit * _edit, GPtrArray * _pnames, const char *_type) +{ + (void) _edit; + (void) _pnames; + (void) _type; +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @Mock */ +int +edit_get_syntax_color (WEdit * _edit, off_t _byte_index) +{ + (void) _edit; + (void) _byte_index; + + return 0; +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @Mock */ +gboolean +edit_load_macro_cmd (WEdit * _edit) +{ + (void) _edit; + + return FALSE; +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @CapturedValue */ +static const WEdit *edit_completion_dialog_show__edit; +/* @CapturedValue */ +static int edit_completion_dialog_show__max_width; +/* @CapturedValue */ +static GQueue *edit_completion_dialog_show__compl; + +/* @ThenReturnValue */ +static char *edit_completion_dialog_show__return_value; + +/* @Mock */ +char * +edit_completion_dialog_show (const WEdit * edit, GQueue * compl, int max_width) +{ + + edit_completion_dialog_show__edit = edit; + edit_completion_dialog_show__max_width = max_width; + + { + GList *i; + + edit_completion_dialog_show__compl = g_queue_new (); + + for (i = g_queue_peek_tail_link (compl); i != NULL; i = g_list_previous (i)) + { + GString *s = (GString *) i->data; + + g_queue_push_tail (edit_completion_dialog_show__compl, mc_g_string_dup (s)); + } + } + + return edit_completion_dialog_show__return_value; +} + +static void +edit_completion_dialog_show__init (void) +{ + edit_completion_dialog_show__edit = NULL; + edit_completion_dialog_show__max_width = 0; + edit_completion_dialog_show__compl = NULL; + edit_completion_dialog_show__return_value = NULL; +} + +static void +edit_completion_dialog_show__string_free (gpointer data) +{ + g_string_free ((GString *) data, TRUE); +} + +static void +edit_completion_dialog_show__deinit (void) +{ + if (edit_completion_dialog_show__compl != NULL) + g_queue_free_full (edit_completion_dialog_show__compl, + edit_completion_dialog_show__string_free); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +my_setup (void) +{ + WRect r; + + str_init_strings (NULL); + + vfs_init (); + vfs_init_localfs (); + vfs_setup_work_dir (); + +#ifdef HAVE_CHARSET + mc_global.sysconfig_dir = (char *) TEST_SHARE_DIR; + load_codepages_list (); +#endif /* HAVE_CHARSET */ + + mc_global.main_config = mc_config_init ("edit_complete_word_cmd.ini", FALSE); + mc_config_set_bool (mc_global.main_config, CONFIG_APP_SECTION, + "editor_wordcompletion_collect_all_files", TRUE); + + edit_options.filesize_threshold = (char *) "64M"; + + rect_init (&r, 0, 0, 24, 80); + test_edit = edit_init (NULL, &r, vfs_path_from_str ("test-data.txt"), 1); + memset (&owner, 0, sizeof (owner)); + group_add_widget (&owner, WIDGET (test_edit)); + edit_completion_dialog_show__init (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +my_teardown (void) +{ + edit_completion_dialog_show__deinit (); + edit_clean (test_edit); + group_remove_widget (test_edit); + g_free (test_edit); + + mc_config_deinit (mc_global.main_config); + +#ifdef HAVE_CHARSET + free_codepages_list (); +#endif /* HAVE_CHARSET */ + + vfs_shut (); + + str_uninit_strings (); +} + +/* --------------------------------------------------------------------------------------------- */ + +#ifdef HAVE_CHARSET +/* @DataSource("test_autocomplete_ds") */ +/* *INDENT-OFF* */ +static const struct test_autocomplete_ds +{ + off_t input_position; + const char *input_system_code_page; + int input_source_codepage_id; + const char *input_editor_code_page; + int input_display_codepage_id; + const char *input_completed_word; + + int expected_max_width; + int expected_compl_word_count; + int input_completed_word_start_pos; + const char *expected_completed_word; +} test_autocomplete_ds[] = +{ + { /* 0. */ + 102, + "KOI8-R", + 0, + "UTF-8", + 1, + "Ñъйцукен", + + 16, + 2, + 98, + "Ñъйцукен" + }, + { /* 1. */ + 138, + "UTF-8", + 1, + "KOI8-R", + 0, + "ÜßÊÃÕËÅÎ", + + 8, + 2, + 136, + "ÜßÊÃÕËÅÎ" + }, +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_autocomplete_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_autocomplete, test_autocomplete_ds) +/* *INDENT-ON* */ +{ + /* given */ + edit_completion_dialog_show__return_value = g_strdup (data->input_completed_word); + + + mc_global.source_codepage = data->input_source_codepage_id; + mc_global.display_codepage = data->input_display_codepage_id; + cp_source = data->input_editor_code_page; + cp_display = data->input_system_code_page; + + do_set_codepage (0); + edit_set_codeset (test_edit); + + /* when */ + edit_cursor_move (test_edit, data->input_position); + edit_complete_word_cmd (test_edit); + + /* then */ + mctest_assert_ptr_eq (edit_completion_dialog_show__edit, test_edit); + ck_assert_int_eq (g_queue_get_length (edit_completion_dialog_show__compl), + data->expected_compl_word_count); + ck_assert_int_eq (edit_completion_dialog_show__max_width, data->expected_max_width); + + { + off_t i = 0; + GString *actual_completed_str; + + actual_completed_str = g_string_new (""); + + while (TRUE) + { + int chr; + + chr = + edit_buffer_get_byte (&test_edit->buffer, + data->input_completed_word_start_pos + i++); + if (isspace (chr)) + break; + g_string_append_c (actual_completed_str, chr); + } + mctest_assert_str_eq (actual_completed_str->str, data->expected_completed_word); + g_string_free (actual_completed_str, TRUE); + } +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_autocomplete_single_ds") */ +/* *INDENT-OFF* */ +static const struct test_autocomplete_single_ds +{ + off_t input_position; + const char *input_system_code_page; + int input_source_codepage_id; + const char *input_editor_code_page; + int input_display_codepage_id; + + int input_completed_word_start_pos; + + const char *expected_completed_word; +} test_autocomplete_single_ds[] = +{ + { /* 0. */ + 146, + "UTF-8", + 1, + "KOI8-R", + 0, + + 145, + "ÆÙ×Á" + }, +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_autocomplete_single_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_autocomplete_single, test_autocomplete_single_ds) +/* *INDENT-ON* */ +{ + /* given */ + mc_global.source_codepage = data->input_source_codepage_id; + mc_global.display_codepage = data->input_display_codepage_id; + cp_source = data->input_editor_code_page; + cp_display = data->input_system_code_page; + + do_set_codepage (0); + edit_set_codeset (test_edit); + + /* when */ + edit_cursor_move (test_edit, data->input_position); + edit_complete_word_cmd (test_edit); + + /* then */ + { + off_t i = 0; + GString *actual_completed_str; + + actual_completed_str = g_string_new (""); + + while (TRUE) + { + int chr; + + chr = + edit_buffer_get_byte (&test_edit->buffer, + data->input_completed_word_start_pos + i++); + if (isspace (chr)) + break; + g_string_append_c (actual_completed_str, chr); + } + mctest_assert_str_eq (actual_completed_str->str, data->expected_completed_word); + g_string_free (actual_completed_str, TRUE); + } +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + + +#endif /* HAVE_CHARSET */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, my_setup, my_teardown); + + /* Add new tests here: *************** */ +#ifdef HAVE_CHARSET + mctest_add_parameterized_test (tc_core, test_autocomplete, test_autocomplete_ds); + mctest_add_parameterized_test (tc_core, test_autocomplete_single, test_autocomplete_single_ds); +#endif /* HAVE_CHARSET */ + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/src/editor/mc.charsets b/tests/src/editor/mc.charsets new file mode 100644 index 0000000..7b27d61 --- /dev/null +++ b/tests/src/editor/mc.charsets @@ -0,0 +1,2 @@ +KOI8-R KOI8-R +UTF-8 UTF-8 diff --git a/tests/src/editor/test-data.txt.in b/tests/src/editor/test-data.txt.in new file mode 100644 index 0000000..617038a --- /dev/null +++ b/tests/src/editor/test-data.txt.in @@ -0,0 +1,20 @@ +****************** START:edit_complete_word_cmd.c + +--- UTF-8: + +Ñъйцукен +Ñъфывапр + +ÑÑŠ + +--- KOI8-R: + +ÜßÊÃÕËÅÎ +ÜßÆÙ×ÁÐÒ + +Üß + +ÆÙ×Á +Æ + +****************** END:edit_complete_word_cmd.c diff --git a/tests/src/execute__common.c b/tests/src/execute__common.c new file mode 100644 index 0000000..598b3d0 --- /dev/null +++ b/tests/src/execute__common.c @@ -0,0 +1,275 @@ +/* + Common code for testing functions in src/execute.c file. + + Copyright (C) 2013-2023 + + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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 "lib/widget.h" +#include "lib/strutil.h" +#include "lib/vfs/vfs.h" +#include "src/vfs/local/local.c" + +#include "src/execute.h" + +/* --------------------------------------------------------------------------------------------- */ + +/* @CapturedValue */ +static GPtrArray *vfs_file_is_local__vpath__captured; + +/* @ThenReturnValue */ +static gboolean vfs_file_is_local__return_value; + +/* @Mock */ +gboolean +vfs_file_is_local (const vfs_path_t * vpath) +{ + g_ptr_array_add (vfs_file_is_local__vpath__captured, vfs_path_clone (vpath)); + return vfs_file_is_local__return_value; +} + +static void +vpath_captured_free (gpointer data) +{ + vfs_path_free ((vfs_path_t *) data, TRUE); +} + +static void +vfs_file_is_local__init (void) +{ + vfs_file_is_local__vpath__captured = g_ptr_array_new_with_free_func (vpath_captured_free); +} + +static void +vfs_file_is_local__deinit (void) +{ + g_ptr_array_free (vfs_file_is_local__vpath__captured, TRUE); +} + +/* --------------------------------------------------------------------------------------------- */ + +void do_execute (const char *lc_shell, const char *command, int flags); + +/* @CapturedValue */ +static char *do_execute__lc_shell__captured; +/* @CapturedValue */ +static char *do_execute__command__captured; +/* @CapturedValue */ +static int do_execute__flags__captured; + +/* @Mock */ +void +do_execute (const char *lc_shell, const char *command, int flags) +{ + do_execute__lc_shell__captured = g_strdup (lc_shell); + do_execute__command__captured = g_strdup (command); + do_execute__flags__captured = flags; +} + +static void +do_execute__init (void) +{ + do_execute__command__captured = NULL; + do_execute__lc_shell__captured = NULL; +} + +static void +do_execute__deinit (void) +{ + g_free (do_execute__lc_shell__captured); + g_free (do_execute__command__captured); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @CapturedValue */ +static vfs_path_t *mc_getlocalcopy__pathname_vpath__captured; +/* @ThenReturnValue */ +static vfs_path_t *mc_getlocalcopy__return_value; + +/* @Mock */ +vfs_path_t * +mc_getlocalcopy (const vfs_path_t * pathname_vpath) +{ + mc_getlocalcopy__pathname_vpath__captured = vfs_path_clone (pathname_vpath); + return mc_getlocalcopy__return_value; +} + +static void +mc_getlocalcopy__init (void) +{ + mc_getlocalcopy__pathname_vpath__captured = NULL; + mc_getlocalcopy__return_value = NULL; +} + +static void +mc_getlocalcopy__deinit (void) +{ + vfs_path_free (mc_getlocalcopy__pathname_vpath__captured, TRUE); +} + +/* --------------------------------------------------------------------------------------------- */ + + +/* @CapturedValue */ +static int message_flags__captured; + +/* @CapturedValue */ +static char *message_title__captured; + +/* @CapturedValue */ +static char *message_text__captured; + +/* @Mock */ +void +message (int flags, const char *title, const char *text, ...) +{ + va_list ap; + + message_flags__captured = flags; + + message_title__captured = (title == MSG_ERROR) ? g_strdup (_("Error")) : g_strdup (title); + + va_start (ap, text); + message_text__captured = g_strdup_vprintf (text, ap); + va_end (ap); + +} + +static void +message__init (void) +{ + message_flags__captured = 0; + message_title__captured = NULL; + message_text__captured = NULL; +} + +static void +message__deinit (void) +{ + g_free (message_title__captured); + g_free (message_text__captured); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @CapturedValue */ +static GPtrArray *mc_stat__vpath__captured = NULL; +/* @ThenReturnValue */ +static int mc_stat__return_value = 0; + +/* @Mock */ +int +mc_stat (const vfs_path_t * vpath, struct stat *stat_ignored) +{ + (void) stat_ignored; + if (mc_stat__vpath__captured != NULL) + g_ptr_array_add (mc_stat__vpath__captured, vfs_path_clone (vpath)); + return mc_stat__return_value; +} + + +static void +mc_stat__init (void) +{ + mc_stat__vpath__captured = g_ptr_array_new_with_free_func (vpath_captured_free); +} + +static void +mc_stat__deinit (void) +{ + g_ptr_array_free (mc_stat__vpath__captured, TRUE); + mc_stat__vpath__captured = NULL; +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @CapturedValue */ +static vfs_path_t *mc_ungetlocalcopy__pathname_vpath__captured; +/* @CapturedValue */ +static vfs_path_t *mc_ungetlocalcopy__local_vpath__captured; +/* @ThenReturnValue */ +static int mc_ungetlocalcopy__return_value = 0; + +/* @Mock */ +int +mc_ungetlocalcopy (const vfs_path_t * pathname_vpath, const vfs_path_t * local_vpath, + gboolean has_changed_ignored) +{ + (void) has_changed_ignored; + + mc_ungetlocalcopy__pathname_vpath__captured = vfs_path_clone (pathname_vpath); + mc_ungetlocalcopy__local_vpath__captured = vfs_path_clone (local_vpath); + return mc_ungetlocalcopy__return_value; +} + +static void +mc_ungetlocalcopy__init (void) +{ + mc_ungetlocalcopy__pathname_vpath__captured = NULL; + mc_ungetlocalcopy__local_vpath__captured = NULL; +} + +static void +mc_ungetlocalcopy__deinit (void) +{ + vfs_path_free (mc_ungetlocalcopy__pathname_vpath__captured, TRUE); + vfs_path_free (mc_ungetlocalcopy__local_vpath__captured, TRUE); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ + str_init_strings (NULL); + vfs_init (); + vfs_init_localfs (); + vfs_setup_work_dir (); + + vfs_file_is_local__init (); + do_execute__init (); + mc_getlocalcopy__init (); + message__init (); + mc_stat__init (); + mc_ungetlocalcopy__init (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ + mc_ungetlocalcopy__deinit (); + mc_stat__deinit (); + message__deinit (); + mc_getlocalcopy__deinit (); + do_execute__deinit (); + vfs_file_is_local__deinit (); + + vfs_shut (); + str_uninit_strings (); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/src/execute__execute_external_editor_or_viewer.c b/tests/src/execute__execute_external_editor_or_viewer.c new file mode 100644 index 0000000..e659477 --- /dev/null +++ b/tests/src/execute__execute_external_editor_or_viewer.c @@ -0,0 +1,200 @@ +/* + src - tests for execute_external_editor_or_viewer() function + + Copyright (C) 2013-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/src" + +#include "tests/mctest.h" + +#include "execute__common.c" + +/* --------------------------------------------------------------------------------------------- */ + +char *execute_get_external_cmd_opts_from_config (const char *command, + const vfs_path_t * filename_vpath, + long start_line); + +/* @CapturedValue */ +static char *execute_external_cmd_opts__command__captured; +/* @CapturedValue */ +static vfs_path_t *execute_external_cmd_opts__filename_vpath__captured; +/* @CapturedValue */ +static int execute_external_cmd_opts__start_line__captured; + +/* @ThenReturnValue */ +static char *execute_external_cmd_opts__return_value; + +/* @Mock */ +char * +execute_get_external_cmd_opts_from_config (const char *command, const vfs_path_t * filename_vpath, + long start_line) +{ + execute_external_cmd_opts__command__captured = g_strdup (command); + execute_external_cmd_opts__filename_vpath__captured = vfs_path_clone (filename_vpath); + execute_external_cmd_opts__start_line__captured = start_line; + + return execute_external_cmd_opts__return_value; +} + +static void +execute_get_external_cmd_opts_from_config__init (void) +{ + execute_external_cmd_opts__command__captured = NULL; + execute_external_cmd_opts__filename_vpath__captured = NULL; + execute_external_cmd_opts__start_line__captured = 0; +} + +static void +execute_get_external_cmd_opts_from_config__deinit (void) +{ + g_free (execute_external_cmd_opts__command__captured); + vfs_path_free (execute_external_cmd_opts__filename_vpath__captured, TRUE); +} + +/* --------------------------------------------------------------------------------------------- */ +void do_executev (const char *lc_shell, int flags, char *const argv[]); + +/* @CapturedValue */ +static char *do_executev__lc_shell__captured; +/* @CapturedValue */ +static int do_executev__flags__captured; +/* @CapturedValue */ +static GPtrArray *do_executev__argv__captured; + +/* @Mock */ +void +do_executev (const char *lc_shell, int flags, char *const argv[]) +{ + do_executev__lc_shell__captured = g_strdup (lc_shell); + do_executev__flags__captured = flags; + + for (; argv != NULL && *argv != NULL; argv++) + g_ptr_array_add (do_executev__argv__captured, g_strdup (*argv)); +} + +static void +do_executev__init (void) +{ + do_executev__lc_shell__captured = NULL; + do_executev__argv__captured = g_ptr_array_new_with_free_func (g_free); + do_executev__flags__captured = 0; +} + +static void +do_executev__deinit (void) +{ + g_free (do_executev__lc_shell__captured); + g_ptr_array_free (do_executev__argv__captured, TRUE); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +my_setup (void) +{ + setup (); + + execute_get_external_cmd_opts_from_config__init (); + do_executev__init (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +my_teardown (void) +{ + do_executev__deinit (); + execute_get_external_cmd_opts_from_config__deinit (); + + teardown (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @Test */ +/* *INDENT-OFF* */ +START_TEST (do_open_external_editor_or_viewer) +/* *INDENT-ON* */ +{ + /* given */ + vfs_path_t *filename_vpath; + filename_vpath = vfs_path_from_str ("/path/to/file.txt"); + + vfs_file_is_local__return_value = TRUE; + execute_external_cmd_opts__return_value = + g_strdup + (" 'param 1 with spaces' \"param 2\" -a -b -cdef /path/to/file.txt +123"); + + /* when */ + execute_external_editor_or_viewer ("editor_or_viewer", filename_vpath, 123); + + /* then */ + + /* check call to execute_get_external_cmd_opts_from_config() */ + mctest_assert_str_eq (execute_external_cmd_opts__command__captured, "editor_or_viewer"); + mctest_assert_true (vfs_path_equal + (execute_external_cmd_opts__filename_vpath__captured, filename_vpath)); + ck_assert_int_eq (execute_external_cmd_opts__start_line__captured, 123); + + /* check call to do_executev() */ + mctest_assert_str_eq (do_executev__lc_shell__captured, "editor_or_viewer"); + ck_assert_int_eq (do_executev__flags__captured, EXECUTE_INTERNAL); + ck_assert_int_eq (do_executev__argv__captured->len, 7); + + mctest_assert_str_eq (g_ptr_array_index (do_executev__argv__captured, 0), + "param 1 with spaces"); + mctest_assert_str_eq (g_ptr_array_index (do_executev__argv__captured, 1), "param 2"); + mctest_assert_str_eq (g_ptr_array_index (do_executev__argv__captured, 2), "-a"); + mctest_assert_str_eq (g_ptr_array_index (do_executev__argv__captured, 3), "-b"); + mctest_assert_str_eq (g_ptr_array_index (do_executev__argv__captured, 4), "-cdef"); + mctest_assert_str_eq (g_ptr_array_index (do_executev__argv__captured, 5), "/path/to/file.txt"); + mctest_assert_str_eq (g_ptr_array_index (do_executev__argv__captured, 6), "+123"); + + vfs_path_free (filename_vpath, TRUE); +} +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, my_setup, my_teardown); + + /* Add new tests here: *************** */ + tcase_add_test (tc_core, do_open_external_editor_or_viewer); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/src/execute__execute_get_external_cmd_opts_from_config.c b/tests/src/execute__execute_get_external_cmd_opts_from_config.c new file mode 100644 index 0000000..bf7f77d --- /dev/null +++ b/tests/src/execute__execute_get_external_cmd_opts_from_config.c @@ -0,0 +1,200 @@ +/* + src - tests for execute_external_editor_or_viewer() function + + Copyright (C) 2013-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/src" + +#include "tests/mctest.h" + +#include "lib/mcconfig.h" +#include "lib/strutil.h" +#include "lib/vfs/vfs.h" +#include "src/vfs/local/local.c" + +char *execute_get_external_cmd_opts_from_config (const char *command, + const vfs_path_t * filename_vpath, + long start_line); + +/* --------------------------------------------------------------------------------------------- */ + +/* @CapturedValue */ +static GPtrArray *mc_config_get_string__group__captured; +/* @CapturedValue */ +static GPtrArray *mc_config_get_string__param__captured; +/* @CapturedValue */ +static GPtrArray *mc_config_get_string__default_value__captured; +/* @ThenReturnValue */ +static GPtrArray *mc_config_get_string__return_value; + +/* @Mock */ +gchar * +mc_config_get_string_raw (mc_config_t * config_ignored, const gchar * group, + const gchar * param, const gchar * default_value) +{ + char *return_value; + (void) config_ignored; + + g_ptr_array_add (mc_config_get_string__group__captured, g_strdup (group)); + g_ptr_array_add (mc_config_get_string__param__captured, g_strdup (param)); + g_ptr_array_add (mc_config_get_string__default_value__captured, g_strdup (default_value)); + + return_value = g_ptr_array_index (mc_config_get_string__return_value, 0); + g_ptr_array_remove_index (mc_config_get_string__return_value, 0); + return return_value; +} + +static void +mc_config_get_string__init (void) +{ + mc_config_get_string__group__captured = g_ptr_array_new_with_free_func (g_free); + mc_config_get_string__param__captured = g_ptr_array_new_with_free_func (g_free); + mc_config_get_string__default_value__captured = g_ptr_array_new_with_free_func (g_free); + + mc_config_get_string__return_value = g_ptr_array_new (); +} + +static void +mc_config_get_string__deinit (void) +{ + g_ptr_array_free (mc_config_get_string__group__captured, TRUE); + g_ptr_array_free (mc_config_get_string__param__captured, TRUE); + g_ptr_array_free (mc_config_get_string__default_value__captured, TRUE); + + g_ptr_array_foreach (mc_config_get_string__return_value, (GFunc) g_free, NULL); + g_ptr_array_free (mc_config_get_string__return_value, TRUE); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ + str_init_strings (NULL); + vfs_init (); + vfs_init_localfs (); + vfs_setup_work_dir (); + + mc_config_get_string__init (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ + mc_config_get_string__deinit (); + + vfs_shut (); + str_uninit_strings (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("check_subtitute_ds") */ +/* *INDENT-OFF* */ +static const struct check_subtitute_ds +{ + const char *config_opts_string; + const char *app_name; + const char *file_name; + int start_line; + const char *expected_result; +} check_subtitute_ds[] = +{ + { + "-a -b -c %filename \\%filename %filename:%lineno \\%lineno +%lineno", + "some-editor", + "/path/to/file", + 1234, + "-a -b -c '/path/to/file' %filename '/path/to/file':1234 %lineno +1234", + }, + { + "%filename:\\\\\\\\\\\\%lineno", + "some-editor", + "/path/to/'f i\" l e \t\t\n", + 1234, + "'/path/to/'\\''f i\" l e \t\t\n':\\\\\\\\\\\\1234", + }, +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "check_subtitute_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (check_if_filename_and_lineno_will_be_subtituted, check_subtitute_ds) +/* *INDENT-ON* */ +{ + /* given */ + char *actual_result; + vfs_path_t *filename_vpath; + + g_ptr_array_add (mc_config_get_string__return_value, g_strdup (data->config_opts_string)); + filename_vpath = vfs_path_from_str (data->file_name); + + /* when */ + actual_result = + execute_get_external_cmd_opts_from_config (data->app_name, filename_vpath, + data->start_line); + + /* then */ + + /* check returned value */ + mctest_assert_str_eq (actual_result, data->expected_result); + + /* check calls to mc_config_get_string() function */ + mctest_assert_str_eq (g_ptr_array_index (mc_config_get_string__group__captured, 0), + CONFIG_EXT_EDITOR_VIEWER_SECTION); + mctest_assert_str_eq (g_ptr_array_index (mc_config_get_string__param__captured, 0), + data->app_name); + mctest_assert_str_eq (g_ptr_array_index (mc_config_get_string__default_value__captured, 0), + NULL); + + vfs_path_free (filename_vpath, TRUE); + +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, check_if_filename_and_lineno_will_be_subtituted, + check_subtitute_ds); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/src/execute__execute_with_vfs_arg.c b/tests/src/execute__execute_with_vfs_arg.c new file mode 100644 index 0000000..528586b --- /dev/null +++ b/tests/src/execute__execute_with_vfs_arg.c @@ -0,0 +1,236 @@ +/* + src - tests for execute_with_vfs_arg() function + + Copyright (C) 2013-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/src" + +#include "tests/mctest.h" + +#include "execute__common.c" + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("the_file_is_local_ds") */ +/* *INDENT-OFF* */ +static const struct the_file_is_local_ds +{ + const char *input_path; +} the_file_is_local_ds[] = +{ + { + NULL, + }, + { + "/blabla", + }, +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "the_file_is_local_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (the_file_is_local, the_file_is_local_ds) +/* *INDENT-ON* */ +{ + /* given */ + vfs_path_t *filename_vpath; + filename_vpath = vfs_path_from_str (data->input_path); + + vfs_file_is_local__return_value = TRUE; + + /* when */ + execute_with_vfs_arg ("cmd_for_local_file", filename_vpath); + + /* then */ + mctest_assert_str_eq (do_execute__lc_shell__captured, "cmd_for_local_file"); + mctest_assert_str_eq (do_execute__command__captured, data->input_path); + + ck_assert_int_eq (vfs_file_is_local__vpath__captured->len, 1); + { + const vfs_path_t *tmp_vpath; + + tmp_vpath = (data->input_path == NULL) ? vfs_get_raw_current_dir () : filename_vpath; + mctest_assert_true (vfs_path_equal + (g_ptr_array_index (vfs_file_is_local__vpath__captured, 0), tmp_vpath)); + } + ck_assert_int_eq (do_execute__flags__captured, EXECUTE_INTERNAL); + ck_assert_msg (mc_getlocalcopy__pathname_vpath__captured == NULL, + "\nFunction mc_getlocalcopy() shouldn't be called!"); + + vfs_path_free (filename_vpath, TRUE); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +/* @Test */ +/* *INDENT-OFF* */ +START_TEST (the_file_is_remote_but_empty) +/* *INDENT-ON* */ +{ + /* given */ + vfs_path_t *filename_vpath; + filename_vpath = NULL; + + vfs_file_is_local__return_value = FALSE; + + /* when */ + execute_with_vfs_arg ("cmd_for_remote_file", filename_vpath); + + /* then */ + mctest_assert_str_eq (do_execute__lc_shell__captured, NULL); + mctest_assert_str_eq (do_execute__command__captured, NULL); + + ck_assert_int_eq (vfs_file_is_local__vpath__captured->len, 2); + + mctest_assert_true (vfs_path_equal + (g_ptr_array_index (vfs_file_is_local__vpath__captured, 0), + vfs_get_raw_current_dir ())); + ck_assert_msg (g_ptr_array_index (vfs_file_is_local__vpath__captured, 1) == NULL, + "\nParameter for second call to vfs_file_is_local() should be NULL!"); + ck_assert_msg (mc_getlocalcopy__pathname_vpath__captured == NULL, + "\nFunction mc_getlocalcopy() shouldn't be called!"); + + vfs_path_free (filename_vpath, TRUE); +} +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +/* @Test */ +/* *INDENT-OFF* */ +START_TEST (the_file_is_remote_fail_to_create_local_copy) +/* *INDENT-ON* */ +{ + /* given */ + vfs_path_t *filename_vpath; + + filename_vpath = vfs_path_from_str ("/ftp://some.host/editme.txt"); + + vfs_file_is_local__return_value = FALSE; + mc_getlocalcopy__return_value = NULL; + + /* when */ + execute_with_vfs_arg ("cmd_for_remote_file", filename_vpath); + + /* then */ + mctest_assert_str_eq (do_execute__lc_shell__captured, NULL); + mctest_assert_str_eq (do_execute__command__captured, NULL); + + ck_assert_int_eq (vfs_file_is_local__vpath__captured->len, 1); + + mctest_assert_true (vfs_path_equal + (g_ptr_array_index (vfs_file_is_local__vpath__captured, 0), + filename_vpath)); + + mctest_assert_true (vfs_path_equal (mc_getlocalcopy__pathname_vpath__captured, filename_vpath)); + + mctest_assert_str_eq (message_title__captured, _("Error")); + mctest_assert_str_eq (message_text__captured, + _("Cannot fetch a local copy of /ftp://some.host/editme.txt")); + + + vfs_path_free (filename_vpath, TRUE); +} +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +/* @Test */ +/* *INDENT-OFF* */ +START_TEST (the_file_is_remote) +/* *INDENT-ON* */ +{ + /* given */ + vfs_path_t *filename_vpath, *local_vpath, *local_vpath_should_be_freeing; + + filename_vpath = vfs_path_from_str ("/ftp://some.host/editme.txt"); + local_vpath = vfs_path_from_str ("/tmp/blabla-editme.txt"); + local_vpath_should_be_freeing = vfs_path_clone (local_vpath); + + vfs_file_is_local__return_value = FALSE; + mc_getlocalcopy__return_value = local_vpath_should_be_freeing; + + /* when */ + execute_with_vfs_arg ("cmd_for_remote_file", filename_vpath); + + /* then */ + mctest_assert_str_eq (do_execute__lc_shell__captured, "cmd_for_remote_file"); + mctest_assert_str_eq (do_execute__command__captured, "/tmp/blabla-editme.txt"); + + ck_assert_int_eq (vfs_file_is_local__vpath__captured->len, 1); + + mctest_assert_true (vfs_path_equal + (g_ptr_array_index (vfs_file_is_local__vpath__captured, 0), + filename_vpath)); + + mctest_assert_true (vfs_path_equal (mc_getlocalcopy__pathname_vpath__captured, filename_vpath)); + + ck_assert_int_eq (mc_stat__vpath__captured->len, 2); + + mctest_assert_true (vfs_path_equal + (g_ptr_array_index (mc_stat__vpath__captured, 0), local_vpath)); + mctest_assert_true (vfs_path_equal + (g_ptr_array_index (mc_stat__vpath__captured, 0), + g_ptr_array_index (mc_stat__vpath__captured, 1))); + + mctest_assert_true (vfs_path_equal + (mc_ungetlocalcopy__pathname_vpath__captured, filename_vpath)); + + mctest_assert_true (vfs_path_equal (mc_ungetlocalcopy__local_vpath__captured, local_vpath)); + + vfs_path_free (filename_vpath, TRUE); + vfs_path_free (local_vpath, TRUE); +} +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, the_file_is_local, the_file_is_local_ds); + tcase_add_test (tc_core, the_file_is_remote_but_empty); + tcase_add_test (tc_core, the_file_is_remote_fail_to_create_local_copy); + tcase_add_test (tc_core, the_file_is_remote); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/src/filemanager/Makefile.am b/tests/src/filemanager/Makefile.am new file mode 100644 index 0000000..9c980f3 --- /dev/null +++ b/tests/src/filemanager/Makefile.am @@ -0,0 +1,44 @@ +PACKAGE_STRING = "/src/filemanager" + +AM_CPPFLAGS = \ + $(GLIB_CFLAGS) \ + -I$(top_srcdir) \ + -I$(top_srcdir)/lib/vfs \ + -DTEST_SHARE_DIR=\"$(abs_srcdir)\" \ + @CHECK_CFLAGS@ + +AM_LDFLAGS = @TESTS_LDFLAGS@ + +LIBS = @CHECK_LIBS@ \ + $(top_builddir)/src/libinternal.la \ + $(top_builddir)/lib/libmc.la + +if ENABLE_MCLIB +LIBS += $(GLIB_LIBS) +endif + +EXTRA_DIST = hints/mc.hint + +TESTS = \ + cd_to \ + examine_cd \ + exec_get_export_variables_ext \ + filegui_is_wildcarded \ + get_random_hint + +check_PROGRAMS = $(TESTS) + +cd_to_SOURCES = \ + cd_to.c + +examine_cd_SOURCES = \ + examine_cd.c + +exec_get_export_variables_ext_SOURCES = \ + exec_get_export_variables_ext.c + +get_random_hint_SOURCES = \ + get_random_hint.c + +filegui_is_wildcarded_SOURCES = \ + filegui_is_wildcarded.c diff --git a/tests/src/filemanager/Makefile.in b/tests/src/filemanager/Makefile.in new file mode 100644 index 0000000..fdc647f --- /dev/null +++ b/tests/src/filemanager/Makefile.in @@ -0,0 +1,1211 @@ +# Makefile.in generated by automake 1.16.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2021 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@ENABLE_MCLIB_TRUE@am__append_1 = $(GLIB_LIBS) +TESTS = cd_to$(EXEEXT) examine_cd$(EXEEXT) \ + exec_get_export_variables_ext$(EXEEXT) \ + filegui_is_wildcarded$(EXEEXT) get_random_hint$(EXEEXT) +check_PROGRAMS = $(am__EXEEXT_1) +subdir = tests/src/filemanager +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/m4.include/gnulib/mode_t.m4 \ + $(top_srcdir)/m4.include/gnulib/stat-size.m4 \ + $(top_srcdir)/m4.include/gnulib/fstypename.m4 \ + $(top_srcdir)/m4.include/gnulib/fsusage.m4 \ + $(top_srcdir)/m4.include/gnulib/mountlist.m4 \ + $(top_srcdir)/m4.include/gnulib/windows-stat-inodes.m4 \ + $(top_srcdir)/m4.include/gnulib/sys_types_h.m4 \ + $(top_srcdir)/m4.include/ax_path_lib_pcre.m4 \ + $(top_srcdir)/m4.include/ax_check_pcre2.m4 \ + $(top_srcdir)/m4.include/dx_doxygen.m4 \ + $(top_srcdir)/m4.include/ax_require_defined.m4 \ + $(top_srcdir)/m4.include/ax_check_compile_flag.m4 \ + $(top_srcdir)/m4.include/ax_append_flag.m4 \ + $(top_srcdir)/m4.include/ax_append_compile_flags.m4 \ + $(top_srcdir)/m4.include/mc-cflags.m4 \ + $(top_srcdir)/m4.include/ax_gcc_func_attribute.m4 \ + $(top_srcdir)/m4.include/mc-check-search-type.m4 \ + $(top_srcdir)/m4.include/mc-get-fs-info.m4 \ + $(top_srcdir)/m4.include/mc-with-x.m4 \ + $(top_srcdir)/m4.include/mc-use-termcap.m4 \ + $(top_srcdir)/m4.include/mc-with-screen.m4 \ + $(top_srcdir)/m4.include/mc-with-screen-ncurses.m4 \ + $(top_srcdir)/m4.include/mc-with-screen-slang.m4 \ + $(top_srcdir)/m4.include/mc-with-internal-edit.m4 \ + $(top_srcdir)/m4.include/mc-subshell.m4 \ + $(top_srcdir)/m4.include/mc-background.m4 \ + $(top_srcdir)/m4.include/mc-ext2fs-attr.m4 \ + $(top_srcdir)/m4.include/mc-glib.m4 \ + $(top_srcdir)/m4.include/mc-vfs.m4 \ + $(top_srcdir)/m4.include/vfs/rpc.m4 \ + $(top_srcdir)/m4.include/vfs/socket.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-extfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-sfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-ftp.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-sftp.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-fish.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-undelfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-tarfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-cpiofs.m4 \ + $(top_srcdir)/m4.include/mc-version.m4 \ + $(top_srcdir)/m4.include/mc-tests.m4 \ + $(top_srcdir)/m4.include/mc-i18n.m4 \ + $(top_srcdir)/m4.include/mc-assert.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__EXEEXT_1 = cd_to$(EXEEXT) examine_cd$(EXEEXT) \ + exec_get_export_variables_ext$(EXEEXT) \ + filegui_is_wildcarded$(EXEEXT) get_random_hint$(EXEEXT) +am_cd_to_OBJECTS = cd_to.$(OBJEXT) +cd_to_OBJECTS = $(am_cd_to_OBJECTS) +cd_to_LDADD = $(LDADD) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +am_examine_cd_OBJECTS = examine_cd.$(OBJEXT) +examine_cd_OBJECTS = $(am_examine_cd_OBJECTS) +examine_cd_LDADD = $(LDADD) +am_exec_get_export_variables_ext_OBJECTS = \ + exec_get_export_variables_ext.$(OBJEXT) +exec_get_export_variables_ext_OBJECTS = \ + $(am_exec_get_export_variables_ext_OBJECTS) +exec_get_export_variables_ext_LDADD = $(LDADD) +am_filegui_is_wildcarded_OBJECTS = filegui_is_wildcarded.$(OBJEXT) +filegui_is_wildcarded_OBJECTS = $(am_filegui_is_wildcarded_OBJECTS) +filegui_is_wildcarded_LDADD = $(LDADD) +am_get_random_hint_OBJECTS = get_random_hint.$(OBJEXT) +get_random_hint_OBJECTS = $(am_get_random_hint_OBJECTS) +get_random_hint_LDADD = $(LDADD) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/cd_to.Po ./$(DEPDIR)/examine_cd.Po \ + ./$(DEPDIR)/exec_get_export_variables_ext.Po \ + ./$(DEPDIR)/filegui_is_wildcarded.Po \ + ./$(DEPDIR)/get_random_hint.Po +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(cd_to_SOURCES) $(examine_cd_SOURCES) \ + $(exec_get_export_variables_ext_SOURCES) \ + $(filegui_is_wildcarded_SOURCES) $(get_random_hint_SOURCES) +DIST_SOURCES = $(cd_to_SOURCES) $(examine_cd_SOURCES) \ + $(exec_get_export_variables_ext_SOURCES) \ + $(filegui_is_wildcarded_SOURCES) $(get_random_hint_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red='[0;31m'; \ + grn='[0;32m'; \ + lgn='[1;32m'; \ + blu='[1;34m'; \ + mgn='[0;35m'; \ + brg='[1m'; \ + std='[m'; \ + fi; \ +} +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ + $(top_srcdir)/config/test-driver +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +COM_ERR_CFLAGS = @COM_ERR_CFLAGS@ +COM_ERR_LIBS = @COM_ERR_LIBS@ +CP1251 = @CP1251@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DOC_LINGUAS = @DOC_LINGUAS@ +DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +DX_CONFIG = @DX_CONFIG@ +DX_DOCDIR = @DX_DOCDIR@ +DX_DOT = @DX_DOT@ +DX_DOXYGEN = @DX_DOXYGEN@ +DX_DVIPS = @DX_DVIPS@ +DX_EGREP = @DX_EGREP@ +DX_ENV = @DX_ENV@ +DX_FLAG_chi = @DX_FLAG_chi@ +DX_FLAG_chm = @DX_FLAG_chm@ +DX_FLAG_doc = @DX_FLAG_doc@ +DX_FLAG_dot = @DX_FLAG_dot@ +DX_FLAG_html = @DX_FLAG_html@ +DX_FLAG_man = @DX_FLAG_man@ +DX_FLAG_pdf = @DX_FLAG_pdf@ +DX_FLAG_ps = @DX_FLAG_ps@ +DX_FLAG_rtf = @DX_FLAG_rtf@ +DX_FLAG_xml = @DX_FLAG_xml@ +DX_HHC = @DX_HHC@ +DX_LATEX = @DX_LATEX@ +DX_MAKEINDEX = @DX_MAKEINDEX@ +DX_PDFLATEX = @DX_PDFLATEX@ +DX_PERL = @DX_PERL@ +DX_PROJECT = @DX_PROJECT@ +E2P_CFLAGS = @E2P_CFLAGS@ +E2P_LIBS = @E2P_LIBS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ETAGS = @ETAGS@ +EXEEXT = @EXEEXT@ +EXT2FS_CFLAGS = @EXT2FS_CFLAGS@ +EXT2FS_LIBS = @EXT2FS_LIBS@ +EXTHELPERSDIR = @EXTHELPERSDIR@ +FGREP = @FGREP@ +FILECMD = @FILECMD@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ +GMODULE_CFLAGS = @GMODULE_CFLAGS@ +GMODULE_LIBS = @GMODULE_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +HAVE_FILECMD = @HAVE_FILECMD@ +HAVE_ZIPINFO = @HAVE_ZIPINFO@ +HAVE_nroff = @HAVE_nroff@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBMC_RELEASE = @LIBMC_RELEASE@ +LIBMC_VERSION = @LIBMC_VERSION@ +LIBOBJS = @LIBOBJS@ +LIBS = @CHECK_LIBS@ $(top_builddir)/src/libinternal.la \ + $(top_builddir)/lib/libmc.la $(am__append_1) +LIBSSH_CFLAGS = @LIBSSH_CFLAGS@ +LIBSSH_LIBS = @LIBSSH_LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANDOC = @MANDOC@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_DATE = @MAN_DATE@ +MAN_FLAGS = @MAN_FLAGS@ +MAN_VERSION = @MAN_VERSION@ +MCLIBS = @MCLIBS@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = "/src/filemanager" +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCRE_CFLAGS = @PCRE_CFLAGS@ +PCRE_LIBS = @PCRE_LIBS@ +PERL = @PERL@ +PERL_FOR_BUILD = @PERL_FOR_BUILD@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POSUB = @POSUB@ +PYTHON = @PYTHON@ +RANLIB = @RANLIB@ +RUBY = @RUBY@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SLANG_CFLAGS = @SLANG_CFLAGS@ +SLANG_LIBS = @SLANG_LIBS@ +STRIP = @STRIP@ +TESTS_LDFLAGS = @TESTS_LDFLAGS@ +UNZIP = @UNZIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +X11_WWW = @X11_WWW@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +ZIP = @ZIP@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AM_CPPFLAGS = \ + $(GLIB_CFLAGS) \ + -I$(top_srcdir) \ + -I$(top_srcdir)/lib/vfs \ + -DTEST_SHARE_DIR=\"$(abs_srcdir)\" \ + @CHECK_CFLAGS@ + +AM_LDFLAGS = @TESTS_LDFLAGS@ +EXTRA_DIST = hints/mc.hint +cd_to_SOURCES = \ + cd_to.c + +examine_cd_SOURCES = \ + examine_cd.c + +exec_get_export_variables_ext_SOURCES = \ + exec_get_export_variables_ext.c + +get_random_hint_SOURCES = \ + get_random_hint.c + +filegui_is_wildcarded_SOURCES = \ + filegui_is_wildcarded.c + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/src/filemanager/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu tests/src/filemanager/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +cd_to$(EXEEXT): $(cd_to_OBJECTS) $(cd_to_DEPENDENCIES) $(EXTRA_cd_to_DEPENDENCIES) + @rm -f cd_to$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(cd_to_OBJECTS) $(cd_to_LDADD) $(LIBS) + +examine_cd$(EXEEXT): $(examine_cd_OBJECTS) $(examine_cd_DEPENDENCIES) $(EXTRA_examine_cd_DEPENDENCIES) + @rm -f examine_cd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(examine_cd_OBJECTS) $(examine_cd_LDADD) $(LIBS) + +exec_get_export_variables_ext$(EXEEXT): $(exec_get_export_variables_ext_OBJECTS) $(exec_get_export_variables_ext_DEPENDENCIES) $(EXTRA_exec_get_export_variables_ext_DEPENDENCIES) + @rm -f exec_get_export_variables_ext$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(exec_get_export_variables_ext_OBJECTS) $(exec_get_export_variables_ext_LDADD) $(LIBS) + +filegui_is_wildcarded$(EXEEXT): $(filegui_is_wildcarded_OBJECTS) $(filegui_is_wildcarded_DEPENDENCIES) $(EXTRA_filegui_is_wildcarded_DEPENDENCIES) + @rm -f filegui_is_wildcarded$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(filegui_is_wildcarded_OBJECTS) $(filegui_is_wildcarded_LDADD) $(LIBS) + +get_random_hint$(EXEEXT): $(get_random_hint_OBJECTS) $(get_random_hint_DEPENDENCIES) $(EXTRA_get_random_hint_DEPENDENCIES) + @rm -f get_random_hint$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(get_random_hint_OBJECTS) $(get_random_hint_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cd_to.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/examine_cd.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exec_get_export_variables_ext.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filegui_is_wildcarded.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_random_hint.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + elif test -n "$$redo_logs"; then \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: $(check_PROGRAMS) + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +cd_to.log: cd_to$(EXEEXT) + @p='cd_to$(EXEEXT)'; \ + b='cd_to'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +examine_cd.log: examine_cd$(EXEEXT) + @p='examine_cd$(EXEEXT)'; \ + b='examine_cd'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +exec_get_export_variables_ext.log: exec_get_export_variables_ext$(EXEEXT) + @p='exec_get_export_variables_ext$(EXEEXT)'; \ + b='exec_get_export_variables_ext'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +filegui_is_wildcarded.log: filegui_is_wildcarded$(EXEEXT) + @p='filegui_is_wildcarded$(EXEEXT)'; \ + b='filegui_is_wildcarded'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +get_random_hint.log: get_random_hint$(EXEEXT) + @p='get_random_hint$(EXEEXT)'; \ + b='get_random_hint'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/cd_to.Po + -rm -f ./$(DEPDIR)/examine_cd.Po + -rm -f ./$(DEPDIR)/exec_get_export_variables_ext.Po + -rm -f ./$(DEPDIR)/filegui_is_wildcarded.Po + -rm -f ./$(DEPDIR)/get_random_hint.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/cd_to.Po + -rm -f ./$(DEPDIR)/examine_cd.Po + -rm -f ./$(DEPDIR)/exec_get_export_variables_ext.Po + -rm -f ./$(DEPDIR)/filegui_is_wildcarded.Po + -rm -f ./$(DEPDIR)/get_random_hint.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \ + check-am clean clean-checkPROGRAMS clean-generic clean-libtool \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + recheck tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/tests/src/filemanager/cd_to.c b/tests/src/filemanager/cd_to.c new file mode 100644 index 0000000..37156d5 --- /dev/null +++ b/tests/src/filemanager/cd_to.c @@ -0,0 +1,174 @@ +/* + src/filemanager - tests for cd_to() function + + Copyright (C) 2011-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2011, 2013 + Andrew Borodin <aborodin@vmail.ru>, 2019, 2020 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/src/filemanager" + +#include "tests/mctest.h" + +#include "src/vfs/local/local.c" + +#include "src/filemanager/cd.c" +#include "src/filemanager/panel.h" + +/* --------------------------------------------------------------------------------------------- */ + +/* @ThenReturnValue */ +static panel_view_mode_t get_current_type__return_value; + +/* @Mock */ +panel_view_mode_t +get_current_type (void) +{ + return get_current_type__return_value; +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @CapturedValue */ +static vfs_path_t *do_cd__new_dir_vpath__captured; +/* @CapturedValue */ +static enum cd_enum do_cd__cd_type__captured; +/* @ThenReturnValue */ +static gboolean do_cd__return_value; + +/* @Mock */ +gboolean +panel_cd (WPanel * panel, const vfs_path_t * new_dir_vpath, enum cd_enum cd_type) +{ + (void) panel; + + do_cd__new_dir_vpath__captured = vfs_path_clone (new_dir_vpath); + do_cd__cd_type__captured = cd_type; + return do_cd__return_value; +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @ThenReturnValue */ +static const char *mc_config_get_home_dir__return_value; + +/* @Mock */ +const char * +mc_config_get_home_dir (void) +{ + return mc_config_get_home_dir__return_value; +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ + str_init_strings (NULL); + + vfs_init (); + vfs_init_localfs (); + vfs_setup_work_dir (); + do_cd__new_dir_vpath__captured = NULL; +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ + vfs_path_free (do_cd__new_dir_vpath__captured, TRUE); + vfs_shut (); + str_uninit_strings (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_empty_mean_home_ds") */ +/* *INDENT-OFF* */ +static const struct test_empty_mean_home_ds +{ + const char *command; +} test_empty_mean_home_ds[] = +{ + { + "" + }, + { + " " + }, + { + "\t\t\t\t\t\t\t\t\t\t\t" + }, + { + " \t \t \t\t \t " + }, +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_empty_mean_home_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_empty_mean_home, test_empty_mean_home_ds) +/* *INDENT-ON* */ +{ + /* given */ + get_current_type__return_value = view_listing; + do_cd__return_value = TRUE; + mc_config_get_home_dir__return_value = "/home/test"; + + /* when */ + { + char *input_command; + + input_command = g_strdup (data->command); + cd_to (input_command); + g_free (input_command); + } + /* then */ + mctest_assert_str_eq (mc_config_get_home_dir__return_value, + vfs_path_as_str (do_cd__new_dir_vpath__captured)); + ck_assert_int_eq (do_cd__cd_type__captured, cd_parse_command); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, test_empty_mean_home, test_empty_mean_home_ds); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/src/filemanager/examine_cd.c b/tests/src/filemanager/examine_cd.c new file mode 100644 index 0000000..bbb92f9 --- /dev/null +++ b/tests/src/filemanager/examine_cd.c @@ -0,0 +1,144 @@ +/* + src/filemanager - examine_cd() function testing + + Copyright (C) 2012-2023 + Free Software Foundation, Inc. + + Written by: + Andrew Borodin <aborodin@vmail.ru>, 2012, 2020 + Slava Zanko <slavazanko@gmail.com>, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/src/filemanager" + +#include "tests/mctest.h" + +#include <stdio.h> + +#include "src/filemanager/cd.c" + +/* --------------------------------------------------------------------------------------------- */ + +WPanel *current_panel = NULL; + +panel_view_mode_t +get_current_type (void) +{ + return view_listing; +} + +gboolean +panel_cd (WPanel * panel, const vfs_path_t * new_dir_vpath, enum cd_enum cd_type) +{ + (void) panel; + (void) new_dir_vpath; + (void) cd_type; + + return TRUE; +} + +void +sync_tree (const vfs_path_t * vpath) +{ + (void) vpath; +} + +/* --------------------------------------------------------------------------------------------- */ + +static void +setup (void) +{ +} + +static void +teardown (void) +{ +} + +/* --------------------------------------------------------------------------------------------- */ + +#define check_examine_cd(input, etalon) \ +{ \ + result = examine_cd (input); \ + ck_assert_msg (strcmp (result->str, etalon) == 0, \ + "\ninput (%s)\nactial (%s) not equal to\netalon (%s)", input, result->str, etalon); \ + g_string_free (result, TRUE); \ +} + +/* *INDENT-OFF* */ +START_TEST (test_examine_cd) +/* *INDENT-ON* */ +{ + GString *result; + + g_setenv ("AAA", "aaa", TRUE); + + check_examine_cd ("/test/path", "/test/path"); + + check_examine_cd ("$AAA", "aaa"); + check_examine_cd ("${AAA}", "aaa"); + check_examine_cd ("$AAA/test", "aaa/test"); + check_examine_cd ("${AAA}/test", "aaa/test"); + + check_examine_cd ("/$AAA", "/aaa"); + check_examine_cd ("/${AAA}", "/aaa"); + check_examine_cd ("/$AAA/test", "/aaa/test"); + check_examine_cd ("/${AAA}/test", "/aaa/test"); + + check_examine_cd ("/test/path/$AAA", "/test/path/aaa"); + check_examine_cd ("/test/path/$AAA/test2", "/test/path/aaa/test2"); + check_examine_cd ("/test/path/test1$AAA/test2", "/test/path/test1aaa/test2"); + + check_examine_cd ("/test/path/${AAA}", "/test/path/aaa"); + check_examine_cd ("/test/path/${AAA}/test2", "/test/path/aaa/test2"); + check_examine_cd ("/test/path/${AAA}test2", "/test/path/aaatest2"); + check_examine_cd ("/test/path/test1${AAA}", "/test/path/test1aaa"); + check_examine_cd ("/test/path/test1${AAA}test2", "/test/path/test1aaatest2"); + + check_examine_cd ("/test/path/\\$AAA", "/test/path/$AAA"); + check_examine_cd ("/test/path/\\$AAA/test2", "/test/path/$AAA/test2"); + check_examine_cd ("/test/path/test1\\$AAA", "/test/path/test1$AAA"); + + check_examine_cd ("/test/path/\\${AAA}", "/test/path/${AAA}"); + check_examine_cd ("/test/path/\\${AAA}/test2", "/test/path/${AAA}/test2"); + check_examine_cd ("/test/path/\\${AAA}test2", "/test/path/${AAA}test2"); + check_examine_cd ("/test/path/test1\\${AAA}test2", "/test/path/test1${AAA}test2"); +} +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + tcase_add_test (tc_core, test_examine_cd); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/src/filemanager/exec_get_export_variables_ext.c b/tests/src/filemanager/exec_get_export_variables_ext.c new file mode 100644 index 0000000..dea05a1 --- /dev/null +++ b/tests/src/filemanager/exec_get_export_variables_ext.c @@ -0,0 +1,134 @@ +/* + src/filemanager - filemanager functions + + Copyright (C) 2011-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2011, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/src/filemanager" + +#include "tests/mctest.h" + +#include "lib/file-entry.h" + +#include "src/vfs/local/local.c" + +#include "src/filemanager/filemanager.c" + +#include "src/filemanager/ext.c" + +/* --------------------------------------------------------------------------------------------- */ +/* mocked functions */ + + +/* --------------------------------------------------------------------------------------------- */ + +static void +setup (void) +{ + str_init_strings (NULL); + + vfs_init (); + vfs_init_localfs (); + vfs_setup_work_dir (); + + mc_global.mc_run_mode = MC_RUN_FULL; + current_panel = g_new0 (WPanel, 1); + current_panel->cwd_vpath = vfs_path_from_str ("/home"); + current_panel->dir.size = DIR_LIST_MIN_SIZE; + current_panel->dir.list = g_new0 (file_entry_t, current_panel->dir.size); + current_panel->dir.len = 0; +} + +static void +teardown (void) +{ + vfs_shut (); + str_uninit_strings (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* *INDENT-OFF* */ +START_TEST (sanitize_variables) +/* *INDENT-ON* */ +{ + /* given */ + vfs_path_t *filename_vpath; + GString *actual_string; + const char *expected_string; + + current_panel->current = 0; + current_panel->dir.len = 3; + current_panel->dir.list[0].fname = g_string_new ("selected file.txt"); + current_panel->dir.list[1].fname = g_string_new ("tagged file1.txt"); + current_panel->dir.list[1].f.marked = 1; + current_panel->dir.list[2].fname = g_string_new ("tagged file2.txt"); + current_panel->dir.list[2].f.marked = 1; + + /* when */ + filename_vpath = vfs_path_from_str ("/tmp/blabla.txt"); + actual_string = exec_get_export_variables (filename_vpath); + vfs_path_free (filename_vpath, TRUE); + + /* then */ + expected_string = "\ +MC_EXT_FILENAME=/tmp/blabla.txt\n\ +export MC_EXT_FILENAME\n\ +MC_EXT_BASENAME=selected\\ file.txt\n\ +export MC_EXT_BASENAME\n\ +MC_EXT_CURRENTDIR=/home\n\ +export MC_EXT_CURRENTDIR\n\ +MC_EXT_SELECTED=\"selected\\ file.txt\"\n\ +export MC_EXT_SELECTED\n\ +MC_EXT_ONLYTAGGED=\"tagged\\ file1.txt tagged\\ file2.txt \"\n\ +export MC_EXT_ONLYTAGGED\n"; + + mctest_assert_str_eq (actual_string->str, expected_string); + + g_string_free (actual_string, TRUE); + g_string_free (current_panel->dir.list[0].fname, TRUE); + g_string_free (current_panel->dir.list[1].fname, TRUE); + g_string_free (current_panel->dir.list[2].fname, TRUE); +} +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + tcase_add_test (tc_core, sanitize_variables); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/src/filemanager/filegui_is_wildcarded.c b/tests/src/filemanager/filegui_is_wildcarded.c new file mode 100644 index 0000000..28a11fd --- /dev/null +++ b/tests/src/filemanager/filegui_is_wildcarded.c @@ -0,0 +1,159 @@ +/* + src/filemanager - tests for is_wildcarded() function + + Copyright (C) 2011-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2015 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/src/filemanager" + +#include "tests/mctest.h" + +#include "src/vfs/local/local.c" + +#include "src/filemanager/filegui.c" + + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ + str_init_strings (NULL); + + vfs_init (); + vfs_init_localfs (); + vfs_setup_work_dir (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ + vfs_shut (); + str_uninit_strings (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_is_wildcarded_ds") */ +/* *INDENT-OFF* */ +static const struct test_is_wildcarded_ds +{ + const char *input_value; + gboolean expected_result; +} test_is_wildcarded_ds[] = +{ + { /* 0 */ + "blabla", + FALSE + }, + { /* 1 */ + "bla?bla", + TRUE + }, + { /* 2 */ + "bla*bla", + TRUE + }, + { /* 3 */ + "bla\\*bla", + FALSE + }, + + { /* 4 */ + "bla\\\\*bla", + TRUE + }, + { /* 5 */ + "bla\\1bla", + TRUE + }, + { /* 6 */ + "bla\\\\1bla", + FALSE + }, + { /* 7 */ + "bla\\\t\\\\1bla", + FALSE + }, + { /* 8 */ + "bla\\\t\\\\\\1bla", + TRUE + }, + { /* 9 */ + "bla\\9bla", + TRUE + }, + { /* 10 */ + "blabla\\", + FALSE + }, + { /* 11 */ + "blab\\?la", + FALSE + }, + { /* 12 */ + "blab\\\\?la", + TRUE + }, +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_is_wildcarded_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_is_wildcarded, test_is_wildcarded_ds) +/* *INDENT-ON* */ +{ + /* given */ + gboolean actual_result; + + /* when */ + actual_result = is_wildcarded (data->input_value); + /* then */ + ck_assert_int_eq (actual_result, data->expected_result); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, test_is_wildcarded, test_is_wildcarded_ds); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/src/filemanager/get_random_hint.c b/tests/src/filemanager/get_random_hint.c new file mode 100644 index 0000000..80dd1a7 --- /dev/null +++ b/tests/src/filemanager/get_random_hint.c @@ -0,0 +1,180 @@ +/* + src/filemanager - filemanager functions. + Tests for getting random hints. + + Copyright (C) 2013-2023 + Free Software Foundation, Inc. + + Written by: + Slava Zanko <slavazanko@gmail.com>, 2013 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/src/filemanager" + +#include "tests/mctest.h" + +#include "lib/strutil.h" +#include "lib/util.h" + +#include "src/filemanager/filemanager.h" + + +/* --------------------------------------------------------------------------------------------- */ +/* mocked functions */ + +/* @Mock */ +char * +guess_message_value (void) +{ + return g_strdup ("not_exists"); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @ThenReturnValue */ +static gboolean rand__return_value = 0; + +/* @Mock */ +int +rand (void) +{ + return rand__return_value; +} + +/* --------------------------------------------------------------------------------------------- */ + +static void +setup (void) +{ + mc_global.share_data_dir = (char *) TEST_SHARE_DIR; + str_init_strings (NULL); +} + +static void +teardown (void) +{ + str_uninit_strings (); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* *INDENT-OFF* */ +START_TEST (test_not_force) +/* *INDENT-ON* */ +{ + // given + char *first_hint_for_ignore; + char *actual_hint1; + char *actual_hint2; + char *actual_hint3; + + // when + first_hint_for_ignore = get_random_hint (FALSE); + actual_hint1 = get_random_hint (FALSE); + actual_hint2 = get_random_hint (FALSE); + actual_hint3 = get_random_hint (FALSE); + + // then + mctest_assert_ptr_ne (first_hint_for_ignore, NULL); + mctest_assert_str_eq (actual_hint1, ""); + mctest_assert_str_eq (actual_hint2, ""); + mctest_assert_str_eq (actual_hint3, ""); + + g_free (actual_hint3); + g_free (actual_hint2); + g_free (actual_hint1); + g_free (first_hint_for_ignore); +} +/* *INDENT-OFF* */ +END_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ +#define MC_HINT_FILE_SIZE 58 +/* @DataSource("get_random_ds") */ +/* *INDENT-OFF* */ +static const struct get_random_ds +{ + int input_random_value; + + const char *expected_value; +} get_random_ds[] = +{ + { /* 0. */ + MC_HINT_FILE_SIZE + 2, + "Para_1", + }, + { /* 1. */ + MC_HINT_FILE_SIZE + 10, + "Para_2_line_1 Para_2_line_2", + }, + { /* 2. */ + MC_HINT_FILE_SIZE + 25, + "Para_2_line_1 Para_2_line_2", + }, + { /* 3. */ + MC_HINT_FILE_SIZE + 40, + "Para_3", + }, + { /* 4. */ + MC_HINT_FILE_SIZE + 50, + "P A R A _ 4 ", /* the trailing space it's a bug, but not critical and may be omitted */ + }, +}; +/* *INDENT-ON* */ + /* @Test(dataSource = "get_random_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (get_random, get_random_ds) +/* *INDENT-ON* */ +{ + /* given */ + char *actual_value; + + rand__return_value = data->input_random_value; + + /* when */ + actual_value = get_random_hint (TRUE); + + /* then */ + mctest_assert_str_eq (actual_value, data->expected_value); + g_free (actual_value); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + tcase_add_test (tc_core, test_not_force); + mctest_add_parameterized_test (tc_core, get_random, get_random_ds); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/tests/src/filemanager/hints/mc.hint b/tests/src/filemanager/hints/mc.hint new file mode 100644 index 0000000..cbc0a57 --- /dev/null +++ b/tests/src/filemanager/hints/mc.hint @@ -0,0 +1,14 @@ +Para_1 + +Para_2_line_1 +Para_2_line_2 + + +Para_3 + +P +A +R +A +_ +4 diff --git a/tests/src/vfs/Makefile.am b/tests/src/vfs/Makefile.am new file mode 100644 index 0000000..8530f99 --- /dev/null +++ b/tests/src/vfs/Makefile.am @@ -0,0 +1,10 @@ + +SUBDIRS = + +if ENABLE_VFS_EXTFS +SUBDIRS += extfs +endif + +if ENABLE_VFS_FTP +SUBDIRS += ftpfs +endif diff --git a/tests/src/vfs/Makefile.in b/tests/src/vfs/Makefile.in new file mode 100644 index 0000000..3cc55a3 --- /dev/null +++ b/tests/src/vfs/Makefile.in @@ -0,0 +1,760 @@ +# Makefile.in generated by automake 1.16.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2021 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@ENABLE_VFS_EXTFS_TRUE@am__append_1 = extfs +@ENABLE_VFS_FTP_TRUE@am__append_2 = ftpfs +subdir = tests/src/vfs +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/m4.include/gnulib/mode_t.m4 \ + $(top_srcdir)/m4.include/gnulib/stat-size.m4 \ + $(top_srcdir)/m4.include/gnulib/fstypename.m4 \ + $(top_srcdir)/m4.include/gnulib/fsusage.m4 \ + $(top_srcdir)/m4.include/gnulib/mountlist.m4 \ + $(top_srcdir)/m4.include/gnulib/windows-stat-inodes.m4 \ + $(top_srcdir)/m4.include/gnulib/sys_types_h.m4 \ + $(top_srcdir)/m4.include/ax_path_lib_pcre.m4 \ + $(top_srcdir)/m4.include/ax_check_pcre2.m4 \ + $(top_srcdir)/m4.include/dx_doxygen.m4 \ + $(top_srcdir)/m4.include/ax_require_defined.m4 \ + $(top_srcdir)/m4.include/ax_check_compile_flag.m4 \ + $(top_srcdir)/m4.include/ax_append_flag.m4 \ + $(top_srcdir)/m4.include/ax_append_compile_flags.m4 \ + $(top_srcdir)/m4.include/mc-cflags.m4 \ + $(top_srcdir)/m4.include/ax_gcc_func_attribute.m4 \ + $(top_srcdir)/m4.include/mc-check-search-type.m4 \ + $(top_srcdir)/m4.include/mc-get-fs-info.m4 \ + $(top_srcdir)/m4.include/mc-with-x.m4 \ + $(top_srcdir)/m4.include/mc-use-termcap.m4 \ + $(top_srcdir)/m4.include/mc-with-screen.m4 \ + $(top_srcdir)/m4.include/mc-with-screen-ncurses.m4 \ + $(top_srcdir)/m4.include/mc-with-screen-slang.m4 \ + $(top_srcdir)/m4.include/mc-with-internal-edit.m4 \ + $(top_srcdir)/m4.include/mc-subshell.m4 \ + $(top_srcdir)/m4.include/mc-background.m4 \ + $(top_srcdir)/m4.include/mc-ext2fs-attr.m4 \ + $(top_srcdir)/m4.include/mc-glib.m4 \ + $(top_srcdir)/m4.include/mc-vfs.m4 \ + $(top_srcdir)/m4.include/vfs/rpc.m4 \ + $(top_srcdir)/m4.include/vfs/socket.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-extfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-sfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-ftp.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-sftp.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-fish.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-undelfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-tarfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-cpiofs.m4 \ + $(top_srcdir)/m4.include/mc-version.m4 \ + $(top_srcdir)/m4.include/mc-tests.m4 \ + $(top_srcdir)/m4.include/mc-i18n.m4 \ + $(top_srcdir)/m4.include/mc-assert.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir distdir-am +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +DIST_SUBDIRS = extfs ftpfs +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +COM_ERR_CFLAGS = @COM_ERR_CFLAGS@ +COM_ERR_LIBS = @COM_ERR_LIBS@ +CP1251 = @CP1251@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DOC_LINGUAS = @DOC_LINGUAS@ +DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +DX_CONFIG = @DX_CONFIG@ +DX_DOCDIR = @DX_DOCDIR@ +DX_DOT = @DX_DOT@ +DX_DOXYGEN = @DX_DOXYGEN@ +DX_DVIPS = @DX_DVIPS@ +DX_EGREP = @DX_EGREP@ +DX_ENV = @DX_ENV@ +DX_FLAG_chi = @DX_FLAG_chi@ +DX_FLAG_chm = @DX_FLAG_chm@ +DX_FLAG_doc = @DX_FLAG_doc@ +DX_FLAG_dot = @DX_FLAG_dot@ +DX_FLAG_html = @DX_FLAG_html@ +DX_FLAG_man = @DX_FLAG_man@ +DX_FLAG_pdf = @DX_FLAG_pdf@ +DX_FLAG_ps = @DX_FLAG_ps@ +DX_FLAG_rtf = @DX_FLAG_rtf@ +DX_FLAG_xml = @DX_FLAG_xml@ +DX_HHC = @DX_HHC@ +DX_LATEX = @DX_LATEX@ +DX_MAKEINDEX = @DX_MAKEINDEX@ +DX_PDFLATEX = @DX_PDFLATEX@ +DX_PERL = @DX_PERL@ +DX_PROJECT = @DX_PROJECT@ +E2P_CFLAGS = @E2P_CFLAGS@ +E2P_LIBS = @E2P_LIBS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ETAGS = @ETAGS@ +EXEEXT = @EXEEXT@ +EXT2FS_CFLAGS = @EXT2FS_CFLAGS@ +EXT2FS_LIBS = @EXT2FS_LIBS@ +EXTHELPERSDIR = @EXTHELPERSDIR@ +FGREP = @FGREP@ +FILECMD = @FILECMD@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ +GMODULE_CFLAGS = @GMODULE_CFLAGS@ +GMODULE_LIBS = @GMODULE_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +HAVE_FILECMD = @HAVE_FILECMD@ +HAVE_ZIPINFO = @HAVE_ZIPINFO@ +HAVE_nroff = @HAVE_nroff@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBMC_RELEASE = @LIBMC_RELEASE@ +LIBMC_VERSION = @LIBMC_VERSION@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSSH_CFLAGS = @LIBSSH_CFLAGS@ +LIBSSH_LIBS = @LIBSSH_LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANDOC = @MANDOC@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_DATE = @MAN_DATE@ +MAN_FLAGS = @MAN_FLAGS@ +MAN_VERSION = @MAN_VERSION@ +MCLIBS = @MCLIBS@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCRE_CFLAGS = @PCRE_CFLAGS@ +PCRE_LIBS = @PCRE_LIBS@ +PERL = @PERL@ +PERL_FOR_BUILD = @PERL_FOR_BUILD@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POSUB = @POSUB@ +PYTHON = @PYTHON@ +RANLIB = @RANLIB@ +RUBY = @RUBY@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SLANG_CFLAGS = @SLANG_CFLAGS@ +SLANG_LIBS = @SLANG_LIBS@ +STRIP = @STRIP@ +TESTS_LDFLAGS = @TESTS_LDFLAGS@ +UNZIP = @UNZIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +X11_WWW = @X11_WWW@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +ZIP = @ZIP@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = $(am__append_1) $(am__append_2) +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/src/vfs/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu tests/src/vfs/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/tests/src/vfs/extfs/Makefile.am b/tests/src/vfs/extfs/Makefile.am new file mode 100644 index 0000000..514bfa9 --- /dev/null +++ b/tests/src/vfs/extfs/Makefile.am @@ -0,0 +1,2 @@ + +SUBDIRS = helpers-list diff --git a/tests/src/vfs/extfs/Makefile.in b/tests/src/vfs/extfs/Makefile.in new file mode 100644 index 0000000..f7d69e5 --- /dev/null +++ b/tests/src/vfs/extfs/Makefile.in @@ -0,0 +1,758 @@ +# Makefile.in generated by automake 1.16.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2021 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = tests/src/vfs/extfs +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/m4.include/gnulib/mode_t.m4 \ + $(top_srcdir)/m4.include/gnulib/stat-size.m4 \ + $(top_srcdir)/m4.include/gnulib/fstypename.m4 \ + $(top_srcdir)/m4.include/gnulib/fsusage.m4 \ + $(top_srcdir)/m4.include/gnulib/mountlist.m4 \ + $(top_srcdir)/m4.include/gnulib/windows-stat-inodes.m4 \ + $(top_srcdir)/m4.include/gnulib/sys_types_h.m4 \ + $(top_srcdir)/m4.include/ax_path_lib_pcre.m4 \ + $(top_srcdir)/m4.include/ax_check_pcre2.m4 \ + $(top_srcdir)/m4.include/dx_doxygen.m4 \ + $(top_srcdir)/m4.include/ax_require_defined.m4 \ + $(top_srcdir)/m4.include/ax_check_compile_flag.m4 \ + $(top_srcdir)/m4.include/ax_append_flag.m4 \ + $(top_srcdir)/m4.include/ax_append_compile_flags.m4 \ + $(top_srcdir)/m4.include/mc-cflags.m4 \ + $(top_srcdir)/m4.include/ax_gcc_func_attribute.m4 \ + $(top_srcdir)/m4.include/mc-check-search-type.m4 \ + $(top_srcdir)/m4.include/mc-get-fs-info.m4 \ + $(top_srcdir)/m4.include/mc-with-x.m4 \ + $(top_srcdir)/m4.include/mc-use-termcap.m4 \ + $(top_srcdir)/m4.include/mc-with-screen.m4 \ + $(top_srcdir)/m4.include/mc-with-screen-ncurses.m4 \ + $(top_srcdir)/m4.include/mc-with-screen-slang.m4 \ + $(top_srcdir)/m4.include/mc-with-internal-edit.m4 \ + $(top_srcdir)/m4.include/mc-subshell.m4 \ + $(top_srcdir)/m4.include/mc-background.m4 \ + $(top_srcdir)/m4.include/mc-ext2fs-attr.m4 \ + $(top_srcdir)/m4.include/mc-glib.m4 \ + $(top_srcdir)/m4.include/mc-vfs.m4 \ + $(top_srcdir)/m4.include/vfs/rpc.m4 \ + $(top_srcdir)/m4.include/vfs/socket.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-extfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-sfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-ftp.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-sftp.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-fish.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-undelfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-tarfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-cpiofs.m4 \ + $(top_srcdir)/m4.include/mc-version.m4 \ + $(top_srcdir)/m4.include/mc-tests.m4 \ + $(top_srcdir)/m4.include/mc-i18n.m4 \ + $(top_srcdir)/m4.include/mc-assert.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir distdir-am +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +COM_ERR_CFLAGS = @COM_ERR_CFLAGS@ +COM_ERR_LIBS = @COM_ERR_LIBS@ +CP1251 = @CP1251@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DOC_LINGUAS = @DOC_LINGUAS@ +DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +DX_CONFIG = @DX_CONFIG@ +DX_DOCDIR = @DX_DOCDIR@ +DX_DOT = @DX_DOT@ +DX_DOXYGEN = @DX_DOXYGEN@ +DX_DVIPS = @DX_DVIPS@ +DX_EGREP = @DX_EGREP@ +DX_ENV = @DX_ENV@ +DX_FLAG_chi = @DX_FLAG_chi@ +DX_FLAG_chm = @DX_FLAG_chm@ +DX_FLAG_doc = @DX_FLAG_doc@ +DX_FLAG_dot = @DX_FLAG_dot@ +DX_FLAG_html = @DX_FLAG_html@ +DX_FLAG_man = @DX_FLAG_man@ +DX_FLAG_pdf = @DX_FLAG_pdf@ +DX_FLAG_ps = @DX_FLAG_ps@ +DX_FLAG_rtf = @DX_FLAG_rtf@ +DX_FLAG_xml = @DX_FLAG_xml@ +DX_HHC = @DX_HHC@ +DX_LATEX = @DX_LATEX@ +DX_MAKEINDEX = @DX_MAKEINDEX@ +DX_PDFLATEX = @DX_PDFLATEX@ +DX_PERL = @DX_PERL@ +DX_PROJECT = @DX_PROJECT@ +E2P_CFLAGS = @E2P_CFLAGS@ +E2P_LIBS = @E2P_LIBS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ETAGS = @ETAGS@ +EXEEXT = @EXEEXT@ +EXT2FS_CFLAGS = @EXT2FS_CFLAGS@ +EXT2FS_LIBS = @EXT2FS_LIBS@ +EXTHELPERSDIR = @EXTHELPERSDIR@ +FGREP = @FGREP@ +FILECMD = @FILECMD@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ +GMODULE_CFLAGS = @GMODULE_CFLAGS@ +GMODULE_LIBS = @GMODULE_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +HAVE_FILECMD = @HAVE_FILECMD@ +HAVE_ZIPINFO = @HAVE_ZIPINFO@ +HAVE_nroff = @HAVE_nroff@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBMC_RELEASE = @LIBMC_RELEASE@ +LIBMC_VERSION = @LIBMC_VERSION@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSSH_CFLAGS = @LIBSSH_CFLAGS@ +LIBSSH_LIBS = @LIBSSH_LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANDOC = @MANDOC@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_DATE = @MAN_DATE@ +MAN_FLAGS = @MAN_FLAGS@ +MAN_VERSION = @MAN_VERSION@ +MCLIBS = @MCLIBS@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCRE_CFLAGS = @PCRE_CFLAGS@ +PCRE_LIBS = @PCRE_LIBS@ +PERL = @PERL@ +PERL_FOR_BUILD = @PERL_FOR_BUILD@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POSUB = @POSUB@ +PYTHON = @PYTHON@ +RANLIB = @RANLIB@ +RUBY = @RUBY@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SLANG_CFLAGS = @SLANG_CFLAGS@ +SLANG_LIBS = @SLANG_LIBS@ +STRIP = @STRIP@ +TESTS_LDFLAGS = @TESTS_LDFLAGS@ +UNZIP = @UNZIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +X11_WWW = @X11_WWW@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +ZIP = @ZIP@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = helpers-list +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/src/vfs/extfs/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu tests/src/vfs/extfs/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/tests/src/vfs/extfs/helpers-list/Makefile.am b/tests/src/vfs/extfs/helpers-list/Makefile.am new file mode 100644 index 0000000..6c6c044 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/Makefile.am @@ -0,0 +1,131 @@ +PACKAGE_STRING = "/src/vfs/extfs/helpers-list" + +SUBDIRS = misc + +AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) + +# This lets mc_parse_ls_l.c override MC's message() without the linker +# complaining about multiple definitions. +AM_LDFLAGS = @TESTS_LDFLAGS@ + +LIBS = $(top_builddir)/lib/libmc.la + +if ENABLE_MCLIB +LIBS += $(GLIB_LIBS) +endif + +# Programs/scripts to build on 'make check'. +check_PROGRAMS = mc_parse_ls_l +check_SCRIPTS = run + +# Tests to run on 'make check' +TESTS = run + +# On 'make clean', delete 'run' as well. +CLEANFILES = run + +mc_parse_ls_l_SOURCES = \ + mc_parse_ls_l.c + +data_files_to_distribute = \ + data/hp48+.README \ + data/hp48+.args \ + data/hp48+.input \ + data/hp48+.output \ + data/lslR.1.spaces.args \ + data/lslR.1.spaces.input \ + data/lslR.1.spaces.output \ + data/lslR.2.spaces-iso.args \ + data/lslR.2.spaces-iso.input \ + data/lslR.2.spaces-iso.output \ + data/lslR.3.spaces-iso-noslash.args \ + data/lslR.3.spaces-iso-noslash.input \ + data/lslR.3.spaces-iso-noslash.output \ + data/lslR.README \ + data/rpm.README \ + data/rpm.custom.env_vars \ + data/rpm.custom.input \ + data/rpm.custom.output \ + data/rpm.glib.env_vars \ + data/rpm.glib.input \ + data/rpm.glib.output \ + data/rpm.rewrite.sh \ + data/u7z.README \ + data/u7z.complex.env_vars \ + data/u7z.complex.input \ + data/u7z.complex.output \ + data/u7z.missing-date.env_vars \ + data/u7z.missing-date.input \ + data/u7z.missing-date.output \ + data/u7z.missing-size-and-date.env_vars \ + data/u7z.missing-size-and-date.input \ + data/u7z.missing-size-and-date.output \ + data/u7z.simple.input \ + data/u7z.simple.output \ + data/uace.README \ + data/uace.input \ + data/uace.output \ + data/uarc.README \ + data/uarc.input \ + data/uarc.output \ + data/urar.README \ + data/urar.v4,v3.env_vars \ + data/urar.v4,v3.input \ + data/urar.v4,v3.output \ + data/urar.v6,v5.env_vars \ + data/urar.v6,v5.input \ + data/urar.v6,v5.output \ + data/uzip.README \ + data/uzip.with-zipinfo.env_vars \ + data/uzip.with-zipinfo.input \ + data/uzip.with-zipinfo.output \ + data/uzip.without-zipinfo--mdy.env_vars \ + data/uzip.without-zipinfo--mdy.input \ + data/uzip.without-zipinfo--mdy.output \ + data/uzip.without-zipinfo--ymd.env_vars \ + data/uzip.without-zipinfo--ymd.input \ + data/uzip.without-zipinfo--ymd.output \ + data/uzoo.README \ + data/uzoo.input \ + data/uzoo.output \ + data/dummy + +EXTRA_DIST = mc_xcat test_all $(data_files_to_distribute) + +run: + @echo '#!/bin/sh' > $@ + @echo >> $@ + @echo '# This script is an easy way to launch the "test_all" script' >> $@ + @echo '# with all the required arguments.' >> $@ + @echo '#' >> $@ + @echo '# Run this script with "--help" to learn more.' >> $@ + @echo >> $@ + @echo '# Where to find mc_parse_ls_l and mc_xcat, respectively.' >> $@ + @echo 'PATH="$(abs_builddir):$(abs_srcdir):$$PATH"' >> $@ + @echo >> $@ +# The 'abs_' isn't mandatory. It lets you move this script out of the build tree. + @echo '"$(abs_srcdir)"/test_all "$$@" \' >> $@ + @echo ' --data-dir "$(abs_srcdir)/data" \' >> $@ + @echo ' --data-build-dir "$(abs_builddir)/data" \' >> $@ +# Before installation, some helpers are in the build tree, some in the src tree. + @echo ' --helpers-dir "$(abs_top_builddir)/src/vfs/extfs/helpers" \' >> $@ + @echo ' --helpers-dir "$(abs_top_srcdir)/src/vfs/extfs/helpers"' >> $@ + @chmod +x $@ +# (We can alternatively create run from a run.in template +# with 'AC_CONFIG_FILES[run, chmod +x run]'.) + +# Whenever we change the recipe above, we need to regenerate the 'run' script: +run: Makefile + +# +# Documentation +# + +doc: README.html + +# (Thanks to VPATH we don't need to write "$(srcdir)/README". doc/hlp/Makefile.am needlessly does this.) +README.html: README + pandoc --include-in-header=$(srcdir)/README.css.inc -N --old-dashes --toc --toc-depth=4 --standalone -o '$@' '$(srcdir)/README' + +EXTRA_DIST += README.css.inc +CLEANFILES += README.html diff --git a/tests/src/vfs/extfs/helpers-list/Makefile.in b/tests/src/vfs/extfs/helpers-list/Makefile.in new file mode 100644 index 0000000..9dfaaef --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/Makefile.in @@ -0,0 +1,1335 @@ +# Makefile.in generated by automake 1.16.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2021 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@ENABLE_MCLIB_TRUE@am__append_1 = $(GLIB_LIBS) +check_PROGRAMS = mc_parse_ls_l$(EXEEXT) +subdir = tests/src/vfs/extfs/helpers-list +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/m4.include/gnulib/mode_t.m4 \ + $(top_srcdir)/m4.include/gnulib/stat-size.m4 \ + $(top_srcdir)/m4.include/gnulib/fstypename.m4 \ + $(top_srcdir)/m4.include/gnulib/fsusage.m4 \ + $(top_srcdir)/m4.include/gnulib/mountlist.m4 \ + $(top_srcdir)/m4.include/gnulib/windows-stat-inodes.m4 \ + $(top_srcdir)/m4.include/gnulib/sys_types_h.m4 \ + $(top_srcdir)/m4.include/ax_path_lib_pcre.m4 \ + $(top_srcdir)/m4.include/ax_check_pcre2.m4 \ + $(top_srcdir)/m4.include/dx_doxygen.m4 \ + $(top_srcdir)/m4.include/ax_require_defined.m4 \ + $(top_srcdir)/m4.include/ax_check_compile_flag.m4 \ + $(top_srcdir)/m4.include/ax_append_flag.m4 \ + $(top_srcdir)/m4.include/ax_append_compile_flags.m4 \ + $(top_srcdir)/m4.include/mc-cflags.m4 \ + $(top_srcdir)/m4.include/ax_gcc_func_attribute.m4 \ + $(top_srcdir)/m4.include/mc-check-search-type.m4 \ + $(top_srcdir)/m4.include/mc-get-fs-info.m4 \ + $(top_srcdir)/m4.include/mc-with-x.m4 \ + $(top_srcdir)/m4.include/mc-use-termcap.m4 \ + $(top_srcdir)/m4.include/mc-with-screen.m4 \ + $(top_srcdir)/m4.include/mc-with-screen-ncurses.m4 \ + $(top_srcdir)/m4.include/mc-with-screen-slang.m4 \ + $(top_srcdir)/m4.include/mc-with-internal-edit.m4 \ + $(top_srcdir)/m4.include/mc-subshell.m4 \ + $(top_srcdir)/m4.include/mc-background.m4 \ + $(top_srcdir)/m4.include/mc-ext2fs-attr.m4 \ + $(top_srcdir)/m4.include/mc-glib.m4 \ + $(top_srcdir)/m4.include/mc-vfs.m4 \ + $(top_srcdir)/m4.include/vfs/rpc.m4 \ + $(top_srcdir)/m4.include/vfs/socket.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-extfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-sfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-ftp.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-sftp.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-fish.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-undelfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-tarfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-cpiofs.m4 \ + $(top_srcdir)/m4.include/mc-version.m4 \ + $(top_srcdir)/m4.include/mc-tests.m4 \ + $(top_srcdir)/m4.include/mc-i18n.m4 \ + $(top_srcdir)/m4.include/mc-assert.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am_mc_parse_ls_l_OBJECTS = mc_parse_ls_l.$(OBJEXT) +mc_parse_ls_l_OBJECTS = $(am_mc_parse_ls_l_OBJECTS) +mc_parse_ls_l_LDADD = $(LDADD) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/mc_parse_ls_l.Po +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(mc_parse_ls_l_SOURCES) +DIST_SOURCES = $(mc_parse_ls_l_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + check recheck distdir distdir-am +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red='[0;31m'; \ + grn='[0;32m'; \ + lgn='[1;32m'; \ + blu='[1;34m'; \ + mgn='[0;35m'; \ + brg='[1m'; \ + std='[m'; \ + fi; \ +} +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' +RECHECK_LOGS = $(TEST_LOGS) +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ + $(top_srcdir)/config/test-driver README +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +COM_ERR_CFLAGS = @COM_ERR_CFLAGS@ +COM_ERR_LIBS = @COM_ERR_LIBS@ +CP1251 = @CP1251@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DOC_LINGUAS = @DOC_LINGUAS@ +DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +DX_CONFIG = @DX_CONFIG@ +DX_DOCDIR = @DX_DOCDIR@ +DX_DOT = @DX_DOT@ +DX_DOXYGEN = @DX_DOXYGEN@ +DX_DVIPS = @DX_DVIPS@ +DX_EGREP = @DX_EGREP@ +DX_ENV = @DX_ENV@ +DX_FLAG_chi = @DX_FLAG_chi@ +DX_FLAG_chm = @DX_FLAG_chm@ +DX_FLAG_doc = @DX_FLAG_doc@ +DX_FLAG_dot = @DX_FLAG_dot@ +DX_FLAG_html = @DX_FLAG_html@ +DX_FLAG_man = @DX_FLAG_man@ +DX_FLAG_pdf = @DX_FLAG_pdf@ +DX_FLAG_ps = @DX_FLAG_ps@ +DX_FLAG_rtf = @DX_FLAG_rtf@ +DX_FLAG_xml = @DX_FLAG_xml@ +DX_HHC = @DX_HHC@ +DX_LATEX = @DX_LATEX@ +DX_MAKEINDEX = @DX_MAKEINDEX@ +DX_PDFLATEX = @DX_PDFLATEX@ +DX_PERL = @DX_PERL@ +DX_PROJECT = @DX_PROJECT@ +E2P_CFLAGS = @E2P_CFLAGS@ +E2P_LIBS = @E2P_LIBS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ETAGS = @ETAGS@ +EXEEXT = @EXEEXT@ +EXT2FS_CFLAGS = @EXT2FS_CFLAGS@ +EXT2FS_LIBS = @EXT2FS_LIBS@ +EXTHELPERSDIR = @EXTHELPERSDIR@ +FGREP = @FGREP@ +FILECMD = @FILECMD@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ +GMODULE_CFLAGS = @GMODULE_CFLAGS@ +GMODULE_LIBS = @GMODULE_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +HAVE_FILECMD = @HAVE_FILECMD@ +HAVE_ZIPINFO = @HAVE_ZIPINFO@ +HAVE_nroff = @HAVE_nroff@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBMC_RELEASE = @LIBMC_RELEASE@ +LIBMC_VERSION = @LIBMC_VERSION@ +LIBOBJS = @LIBOBJS@ +LIBS = $(top_builddir)/lib/libmc.la $(am__append_1) +LIBSSH_CFLAGS = @LIBSSH_CFLAGS@ +LIBSSH_LIBS = @LIBSSH_LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANDOC = @MANDOC@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_DATE = @MAN_DATE@ +MAN_FLAGS = @MAN_FLAGS@ +MAN_VERSION = @MAN_VERSION@ +MCLIBS = @MCLIBS@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = "/src/vfs/extfs/helpers-list" +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCRE_CFLAGS = @PCRE_CFLAGS@ +PCRE_LIBS = @PCRE_LIBS@ +PERL = @PERL@ +PERL_FOR_BUILD = @PERL_FOR_BUILD@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POSUB = @POSUB@ +PYTHON = @PYTHON@ +RANLIB = @RANLIB@ +RUBY = @RUBY@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SLANG_CFLAGS = @SLANG_CFLAGS@ +SLANG_LIBS = @SLANG_LIBS@ +STRIP = @STRIP@ +TESTS_LDFLAGS = @TESTS_LDFLAGS@ +UNZIP = @UNZIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +X11_WWW = @X11_WWW@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +ZIP = @ZIP@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = misc +AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) + +# This lets mc_parse_ls_l.c override MC's message() without the linker +# complaining about multiple definitions. +AM_LDFLAGS = @TESTS_LDFLAGS@ +check_SCRIPTS = run + +# Tests to run on 'make check' +TESTS = run + +# On 'make clean', delete 'run' as well. +CLEANFILES = run README.html +mc_parse_ls_l_SOURCES = \ + mc_parse_ls_l.c + +data_files_to_distribute = \ + data/hp48+.README \ + data/hp48+.args \ + data/hp48+.input \ + data/hp48+.output \ + data/lslR.1.spaces.args \ + data/lslR.1.spaces.input \ + data/lslR.1.spaces.output \ + data/lslR.2.spaces-iso.args \ + data/lslR.2.spaces-iso.input \ + data/lslR.2.spaces-iso.output \ + data/lslR.3.spaces-iso-noslash.args \ + data/lslR.3.spaces-iso-noslash.input \ + data/lslR.3.spaces-iso-noslash.output \ + data/lslR.README \ + data/rpm.README \ + data/rpm.custom.env_vars \ + data/rpm.custom.input \ + data/rpm.custom.output \ + data/rpm.glib.env_vars \ + data/rpm.glib.input \ + data/rpm.glib.output \ + data/rpm.rewrite.sh \ + data/u7z.README \ + data/u7z.complex.env_vars \ + data/u7z.complex.input \ + data/u7z.complex.output \ + data/u7z.missing-date.env_vars \ + data/u7z.missing-date.input \ + data/u7z.missing-date.output \ + data/u7z.missing-size-and-date.env_vars \ + data/u7z.missing-size-and-date.input \ + data/u7z.missing-size-and-date.output \ + data/u7z.simple.input \ + data/u7z.simple.output \ + data/uace.README \ + data/uace.input \ + data/uace.output \ + data/uarc.README \ + data/uarc.input \ + data/uarc.output \ + data/urar.README \ + data/urar.v4,v3.env_vars \ + data/urar.v4,v3.input \ + data/urar.v4,v3.output \ + data/urar.v6,v5.env_vars \ + data/urar.v6,v5.input \ + data/urar.v6,v5.output \ + data/uzip.README \ + data/uzip.with-zipinfo.env_vars \ + data/uzip.with-zipinfo.input \ + data/uzip.with-zipinfo.output \ + data/uzip.without-zipinfo--mdy.env_vars \ + data/uzip.without-zipinfo--mdy.input \ + data/uzip.without-zipinfo--mdy.output \ + data/uzip.without-zipinfo--ymd.env_vars \ + data/uzip.without-zipinfo--ymd.input \ + data/uzip.without-zipinfo--ymd.output \ + data/uzoo.README \ + data/uzoo.input \ + data/uzoo.output \ + data/dummy + +EXTRA_DIST = mc_xcat test_all $(data_files_to_distribute) \ + README.css.inc +all: all-recursive + +.SUFFIXES: +.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/src/vfs/extfs/helpers-list/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu tests/src/vfs/extfs/helpers-list/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +mc_parse_ls_l$(EXEEXT): $(mc_parse_ls_l_OBJECTS) $(mc_parse_ls_l_DEPENDENCIES) $(EXTRA_mc_parse_ls_l_DEPENDENCIES) + @rm -f mc_parse_ls_l$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mc_parse_ls_l_OBJECTS) $(mc_parse_ls_l_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mc_parse_ls_l.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + elif test -n "$$redo_logs"; then \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: $(check_PROGRAMS) $(check_SCRIPTS) + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_PROGRAMS) $(check_SCRIPTS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +run.log: run + @p='run'; \ + b='run'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_SCRIPTS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-recursive + -rm -f ./$(DEPDIR)/mc_parse_ls_l.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f ./$(DEPDIR)/mc_parse_ls_l.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(am__recursive_targets) check-am install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--depfiles check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + recheck tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +run: + @echo '#!/bin/sh' > $@ + @echo >> $@ + @echo '# This script is an easy way to launch the "test_all" script' >> $@ + @echo '# with all the required arguments.' >> $@ + @echo '#' >> $@ + @echo '# Run this script with "--help" to learn more.' >> $@ + @echo >> $@ + @echo '# Where to find mc_parse_ls_l and mc_xcat, respectively.' >> $@ + @echo 'PATH="$(abs_builddir):$(abs_srcdir):$$PATH"' >> $@ + @echo >> $@ +# The 'abs_' isn't mandatory. It lets you move this script out of the build tree. + @echo '"$(abs_srcdir)"/test_all "$$@" \' >> $@ + @echo ' --data-dir "$(abs_srcdir)/data" \' >> $@ + @echo ' --data-build-dir "$(abs_builddir)/data" \' >> $@ +# Before installation, some helpers are in the build tree, some in the src tree. + @echo ' --helpers-dir "$(abs_top_builddir)/src/vfs/extfs/helpers" \' >> $@ + @echo ' --helpers-dir "$(abs_top_srcdir)/src/vfs/extfs/helpers"' >> $@ + @chmod +x $@ +# (We can alternatively create run from a run.in template +# with 'AC_CONFIG_FILES[run, chmod +x run]'.) + +# Whenever we change the recipe above, we need to regenerate the 'run' script: +run: Makefile + +# +# Documentation +# + +doc: README.html + +# (Thanks to VPATH we don't need to write "$(srcdir)/README". doc/hlp/Makefile.am needlessly does this.) +README.html: README + pandoc --include-in-header=$(srcdir)/README.css.inc -N --old-dashes --toc --toc-depth=4 --standalone -o '$@' '$(srcdir)/README' + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/tests/src/vfs/extfs/helpers-list/README b/tests/src/vfs/extfs/helpers-list/README new file mode 100644 index 0000000..0c3bda6 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/README @@ -0,0 +1,207 @@ +--- +title: A tester for extfs helpers +... + +Guide +===== + +Introduction +------------ + +The extfs filesystem is composed of various helpers (uzip, urar, uarc, +...). One command every helper must answer to is "list", to list the +files on its filesystem. + +The purpose of this tester is to test this "list" facet of every helper +to ensure that it indeed works, at present, and that we won't +inadvertently break it, in the future, as we modify its code or MC's +code. + +Key concept: Inputs +------------------- + +Most helpers work by parsing the output of some 3'rd party software. +Which for them becomes the *input*. Helpers sometimes support **several +variations** of such input. E.g., the uzip helper supports three +variations. + +The tester keeps a repository, in the data folder, of the various inputs +each helper proclaims to support. Each input is stored in a file with an +`.input` suffix. + +Key concept: Outputs +-------------------- + +Along with each input file, the data folder also holds the output the +helper is expected to produce given the corresponding input. Each output +is stored in a file with an `.output` suffix. + +We call this output "the expected output". + +Incidentally, an `.output` file stores not the _raw_ output of the helper +but its output _after parsing_. In other words, what's stored is the +unambiguous _meaning_ of the helper's output. This means that as long as +the helper's code isn't modified in a way that changes the meaning of its +output, the `.output` file remains up-to-date. + +How the tester works +-------------------- + +The tester feeds each helper its prepared inputs and reads back the +helper's "list" answer -- the helper's **output**. This output is a list +of files in a format similar to `ls -l`, which MC is able to parse. The +tester checks that this output parses without errors (errors are, for +example, dates in unsupported format). It then compares this parsed +output (which we call "the actual output") with a previously saved copy +of this output which is known to be correct (and which we call "the +expected output", mentioned in the previous section). This previously +stored output too is in the data folder, in files with `.output` suffix. + +If there's any discrepancy between the *actual output* and the +*expected output*, the test fails. + +Running the tester +------------------ + +You can run the tester with `make check`. + +But you'll find it more appealing to run the tester with the `run` +script. You'll get a colorful description of what's going on. + +(`run` is created by running `make check` for the 1st time, in the build +tree.) + +Reference +========= + +The data folder +--------------- + +There are several types of files in the data folder: + +### Input file ### + +An input file is named: + +> `<helper-name>[.optional-embedded-description].input` + +You create such files simply by redirecting the 3'rd party software's +output to a file. + +### Output file ### + +This file is named the same as the corresponding input file but with an +`.output` suffix. + +The easiest way to create these files is by invoking the `run` script +with the `--create-output` option. + +### Environment file ### + +Optional. This file defines environment variables the helper may use to +determine the variant of the input. This file is named the same as the +corresponding input file but with an `.env_var` suffix. + +### Arguments file ### + +Optional. This file defines extra command-line options to pass to the +[parser](#mc_parse_ls_l). This file is named the same as the +corresponding input file but with an `.args` suffix. + +The contents of an output file must be the same no matter on what +computer and at what time we generate it. Therefore we need to tell the +parser to drop any non-fixed elements in that file. E.g., if the dates +used are relative (as is the case for the default `ls` dates), we need to +drop them with `--drop-mtime`. Similarly, if a helper returns user and +group _names_ that are different than the running user's, they must be +dropped with `--drop-ids`. + +### Other files ### + +Any other file is ignored by the tester. + +mc_parse_ls_l +------------- + +This program (built with `make check`) is at the heart of the tester +mechanism. It parses a list of files, in a format similar to `ls -l`, +just as MC would. This program is used to parse (and thereby verify) the +output of the helpers. _You don't need to invoke it yourself;_ but, for +educational purpose, here are a few examples: + + $ LC_ALL=C ls -l | ./mc_parse_ls_l + + $ LC_ALL=C ls -l | ./mc_parse_ls_l --symbolic-ids + + $ LC_ALL=C ls -l | ./mc_parse_ls_l --output-format yaml + +test_all +-------- + +This is the tester itself. You invoke it with `make check`, or with the +`run` script. Invoking it directly is a bit involving because you need to +provide it with 2 or 3 directory paths. `run` does this work for you. + +Environment variables +--------------------- + +### Frequently used variables ### + +#### MC_TEST_EXTFS_LIST_CMD #### + +When a helper runs under the tester, the environment variable +`MC_TEST_EXTFS_LIST_CMD` holds the command that's to provide input. The +helper's source code must be modified to use this command instead of the +command it usually uses. This is the device which lets us plug our own +input into the helper and *without which a helper can't be tested!* + +Let's have a little example. The uzoo helper originally has: + + ZOO=zoo + ... + mczoofs_list () { + $ZOO lq "$ARCHIVE" | mawk '......' + } + ... + +To make this helper testable, we need to change the first line to: + + ZOO=${MC_TEST_EXTFS_LIST_CMD:-zoo} + +(or equivalent.) + +The command in `MC_TEST_EXTFS_LIST_CMD` is a black-box for the helper, +and it intentionally ignores any arguments passed to it (so that `lq +"$ARCHIVE"`, above, won't cause problems). + +### Infrequently used variables ### + +#### MC_TEST_EXTFS_INPUT #### + +Contains the path of the [input file]. You'll more commonly use +[MC_TEST_EXTFS_LIST_CMD], though. + +#### MC_TEST_EXTFS_DATA_DIR #### + +Contains the path of [the data folder]. Use it when you need to +construct the paths of other files you store there. + +#### MC_TEST_EXTFS_DATA_BUILD_DIR #### + +Contains the path of [the data folder], but in the *build* tree. This is +where *.in files from the source tree end up. If you don't know what +these are, you can safely ignore this variable. + +#### MC_TEST_EXTFS_CONFIG_SH #### + +Contains the path of *config.sh*, a file you can "source" into shell +scripts (including the [environment file]) to gain access to values set +when Midnight Commander was compiled. Example: + + . "$MC_TEST_EXTFS_CONFIG_SH" + $PERL -e 'print "hello"' + +Currently, this variable is equal to +"[$MC_TEST_EXTFS_DATA_BUILD_DIR][MC_TEST_EXTFS_DATA_BUILD_DIR]/config.sh", +but you're advised to use only `$MC_TEST_EXTFS_CONFIG_SH` as we may +change this file's location in the future. diff --git a/tests/src/vfs/extfs/helpers-list/README.css.inc b/tests/src/vfs/extfs/helpers-list/README.css.inc new file mode 100644 index 0000000..dacc4ca --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/README.css.inc @@ -0,0 +1,23 @@ +<style type="text/css"> + +body { + padding: 1em 2.5em; + line-height: 140%; +} + +code, pre { + background-color: #FFB; + padding: 2px 3px; +} + +h1, h2 { text-indent: -0.5em; } +h1, h2, h3 { + color: #005A9C; + font-family: sans-serif; +} + +:target { + background: linear-gradient(45deg, #FFF 0%, #7CC 100%); +} + +</style> diff --git a/tests/src/vfs/extfs/helpers-list/data/config.sh.in b/tests/src/vfs/extfs/helpers-list/data/config.sh.in new file mode 100644 index 0000000..05aca06 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/config.sh.in @@ -0,0 +1,9 @@ +# +# Configure-time parameters that may be useful in tests. +# +# See README for how to use this file. +# +PERL="@PERL@" +AWK="@AWK@" +PYTHON="@PYTHON@" +RUBY="@RUBY@" diff --git a/tests/src/vfs/extfs/helpers-list/data/dummy b/tests/src/vfs/extfs/helpers-list/data/dummy new file mode 100644 index 0000000..e9c581d --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/dummy @@ -0,0 +1,3 @@ +This is a dummy file meant to ensure this directory isn't empty so that git always creates it. + +Otherwise our 'test_all' script will fail complaining the directory doesn't exist. diff --git a/tests/src/vfs/extfs/helpers-list/data/hp48+.README b/tests/src/vfs/extfs/helpers-list/data/hp48+.README new file mode 100644 index 0000000..d87ee97 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/hp48+.README @@ -0,0 +1,8 @@ + +The input file was taken from a comment in the helper (after removing +the "Directory" line (which is tricky to test), and adding the +not-really-necessary "EOF"). + +The '--drop-mtime' argument is needed because the helper emits the +current date, which is always changing, whereas our output files have to +be constant. diff --git a/tests/src/vfs/extfs/helpers-list/data/hp48+.args b/tests/src/vfs/extfs/helpers-list/data/hp48+.args new file mode 100644 index 0000000..990629a --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/hp48+.args @@ -0,0 +1 @@ +--drop-mtime diff --git a/tests/src/vfs/extfs/helpers-list/data/hp48+.input b/tests/src/vfs/extfs/helpers-list/data/hp48+.input new file mode 100644 index 0000000..2204139 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/hp48+.input @@ -0,0 +1,6 @@ +{ HOME } 105617 +YEN 30.5 Program 53391 +JYTLIGHT 21848.5 String 62692 +IOPAR 37.5 List 61074 + +EOF diff --git a/tests/src/vfs/extfs/helpers-list/data/hp48+.output b/tests/src/vfs/extfs/helpers-list/data/hp48+.output new file mode 100644 index 0000000..3a24e4e --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/hp48+.output @@ -0,0 +1,3 @@ +-rw-r--r-- 1 0 0 30 /YEN +-rw-r--r-- 1 0 0 21848 /JYTLIGHT +-rw-r--r-- 1 0 0 37 /IOPAR diff --git a/tests/src/vfs/extfs/helpers-list/data/lslR.1.spaces.args b/tests/src/vfs/extfs/helpers-list/data/lslR.1.spaces.args new file mode 100644 index 0000000..2308cee --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/lslR.1.spaces.args @@ -0,0 +1 @@ +--drop-ids --drop-mtime diff --git a/tests/src/vfs/extfs/helpers-list/data/lslR.1.spaces.input b/tests/src/vfs/extfs/helpers-list/data/lslR.1.spaces.input new file mode 100644 index 0000000..908077a --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/lslR.1.spaces.input @@ -0,0 +1,23 @@ +.: +total 12 +drwxr-xr-x 3 serhiy serhiy 4096 Dec 29 19:12 1 2 +drwxr-xr-x 2 serhiy serhiy 4096 Dec 29 19:08 1 2 +drwxr-xr-x 2 serhiy serhiy 4096 Dec 29 19:12 1 2 + +./ 1 2: +total 4 +-rw-r--r-- 1 serhiy serhiy 0 Dec 29 19:08 b +drwxr-xr-x 2 serhiy serhiy 4096 Dec 29 19:12 z + +./ 1 2/z: +total 0 + +./1 2: +total 0 +-rw-r--r-- 1 serhiy serhiy 0 Dec 29 19:08 a + +./1 2 : +total 0 +-rw-r--r-- 1 serhiy serhiy 0 Dec 29 19:09 d +-rw-r--r-- 1 serhiy serhiy 0 Dec 29 19:08 c +-rw-r--r-- 1 serhiy serhiy 0 Dec 29 19:09 x: diff --git a/tests/src/vfs/extfs/helpers-list/data/lslR.1.spaces.output b/tests/src/vfs/extfs/helpers-list/data/lslR.1.spaces.output new file mode 100644 index 0000000..dd6e5f1 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/lslR.1.spaces.output @@ -0,0 +1,9 @@ +drwxr-xr-x 3 4096 ./ 1 2 +drwxr-xr-x 2 4096 ./1 2 +drwxr-xr-x 2 4096 ./1 2 +-rw-r--r-- 1 0 ./ 1 2/b +drwxr-xr-x 2 4096 ./ 1 2/z +-rw-r--r-- 1 0 ./1 2/a +-rw-r--r-- 1 0 ./1 2 / d +-rw-r--r-- 1 0 ./1 2 /c +-rw-r--r-- 1 0 ./1 2 /x: diff --git a/tests/src/vfs/extfs/helpers-list/data/lslR.2.spaces-iso.args b/tests/src/vfs/extfs/helpers-list/data/lslR.2.spaces-iso.args new file mode 100644 index 0000000..9f52292 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/lslR.2.spaces-iso.args @@ -0,0 +1 @@ +--drop-ids diff --git a/tests/src/vfs/extfs/helpers-list/data/lslR.2.spaces-iso.input b/tests/src/vfs/extfs/helpers-list/data/lslR.2.spaces-iso.input new file mode 100644 index 0000000..569586d --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/lslR.2.spaces-iso.input @@ -0,0 +1,23 @@ +.: +total 12 +drwxr-xr-x 3 serhiy serhiy 4096 2009-12-29 19:12 1 2 +drwxr-xr-x 2 serhiy serhiy 4096 2009-12-29 19:08 1 2 +drwxr-xr-x 2 serhiy serhiy 4096 2009-12-29 19:12 1 2 + +./ 1 2: +total 4 +-rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:08 b +drwxr-xr-x 2 serhiy serhiy 4096 2009-12-29 19:12 z + +./ 1 2/z: +total 0 + +./1 2: +total 0 +-rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:08 a + +./1 2 : +total 0 +-rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:08 c +-rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:09 d +-rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:09 x: diff --git a/tests/src/vfs/extfs/helpers-list/data/lslR.2.spaces-iso.output b/tests/src/vfs/extfs/helpers-list/data/lslR.2.spaces-iso.output new file mode 100644 index 0000000..60f0bdd --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/lslR.2.spaces-iso.output @@ -0,0 +1,9 @@ +drwxr-xr-x 3 4096 2009-12-29 19:12:00 ./ 1 2 +drwxr-xr-x 2 4096 2009-12-29 19:08:00 ./1 2 +drwxr-xr-x 2 4096 2009-12-29 19:12:00 ./1 2 +-rw-r--r-- 1 0 2009-12-29 19:08:00 ./ 1 2/b +drwxr-xr-x 2 4096 2009-12-29 19:12:00 ./ 1 2/z +-rw-r--r-- 1 0 2009-12-29 19:08:00 ./1 2/a +-rw-r--r-- 1 0 2009-12-29 19:08:00 ./1 2 /c +-rw-r--r-- 1 0 2009-12-29 19:09:00 ./1 2 / d +-rw-r--r-- 1 0 2009-12-29 19:09:00 ./1 2 /x: diff --git a/tests/src/vfs/extfs/helpers-list/data/lslR.3.spaces-iso-noslash.args b/tests/src/vfs/extfs/helpers-list/data/lslR.3.spaces-iso-noslash.args new file mode 100644 index 0000000..9f52292 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/lslR.3.spaces-iso-noslash.args @@ -0,0 +1 @@ +--drop-ids diff --git a/tests/src/vfs/extfs/helpers-list/data/lslR.3.spaces-iso-noslash.input b/tests/src/vfs/extfs/helpers-list/data/lslR.3.spaces-iso-noslash.input new file mode 100644 index 0000000..28e5c22 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/lslR.3.spaces-iso-noslash.input @@ -0,0 +1,17 @@ + 1 2: +total 4 +-rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:08 b +drwxr-xr-x 2 serhiy serhiy 4096 2009-12-29 19:12 z + + 1 2/z: +total 0 + +1 2: +total 0 +-rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:08 a + +1 2 : +total 0 +-rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:08 c +-rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:09 d +-rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:09 x: diff --git a/tests/src/vfs/extfs/helpers-list/data/lslR.3.spaces-iso-noslash.output b/tests/src/vfs/extfs/helpers-list/data/lslR.3.spaces-iso-noslash.output new file mode 100644 index 0000000..d32336e --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/lslR.3.spaces-iso-noslash.output @@ -0,0 +1,6 @@ +-rw-r--r-- 1 0 2009-12-29 19:08:00 ./ 1 2/b +drwxr-xr-x 2 4096 2009-12-29 19:12:00 ./ 1 2/z +-rw-r--r-- 1 0 2009-12-29 19:08:00 1 2/a +-rw-r--r-- 1 0 2009-12-29 19:08:00 1 2 /c +-rw-r--r-- 1 0 2009-12-29 19:09:00 1 2 / d +-rw-r--r-- 1 0 2009-12-29 19:09:00 1 2 /x: diff --git a/tests/src/vfs/extfs/helpers-list/data/lslR.README b/tests/src/vfs/extfs/helpers-list/data/lslR.README new file mode 100644 index 0000000..6b1f73b --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/lslR.README @@ -0,0 +1,26 @@ + +The inputs were taken from: + + https://www.midnight-commander.org/ticket/1921 + +These inputs are supposed to cover: + +- "spaces": spaces in dir/file names. + +- "iso": ISO date. The ticket claims this is enabled in en_US.UTF-8 + locale, but that's untrue. Nevertheless, it's a useful format (the + default 'ls' dates are relative and therefore somewhat useless in lslR + files) so we don't mind covering it here. + +- "noshalsh": directories not starting with "./". + +Argument files: + +The output produced must be constant anytime. Therefore: + +- For the one input using non-ISO date we must use --drop-mtime. + Otherwise, because these are relative dates, next year the output + will show a different year. + +- For all inputs we use --drop-ids for the case we have user "serhiy" on + our system (and we aren't running as that user). diff --git a/tests/src/vfs/extfs/helpers-list/data/rpm.README b/tests/src/vfs/extfs/helpers-list/data/rpm.README new file mode 100644 index 0000000..78c55bc --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/rpm.README @@ -0,0 +1,24 @@ + +The *.input files for the tests are what we call "tags files". They are +generated by rpm2tags. + +The tests: + +- rpm.glib.input: + + Generated from glib2-2.46.2-4.el7.i686.rpm (downloadable from + rpmfind.net). + +- rpm.custom.input: + + Generated from our own custom package (see test.spec in this + distribution). The advantage of this custom package is that it lets us + test the helper with almost all the tags it's supposed to support. + +-- + +The way we test this helper is a bit unconventional: + +We aren't overriding one or two variables in the helper but, instead, +inject a code snippet into it (see 'rpm.rewrite.sh'). This lets us +override a couple of functions to imitate the 'rpm' binary. diff --git a/tests/src/vfs/extfs/helpers-list/data/rpm.custom.env_vars b/tests/src/vfs/extfs/helpers-list/data/rpm.custom.env_vars new file mode 100644 index 0000000..a740c64 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/rpm.custom.env_vars @@ -0,0 +1,3 @@ +MC_TEST_RPM_REWRITE="$MC_TEST_EXTFS_DATA_DIR/rpm.rewrite.sh" + +MCFASTRPM= # disable "fast mode". diff --git a/tests/src/vfs/extfs/helpers-list/data/rpm.custom.input b/tests/src/vfs/extfs/helpers-list/data/rpm.custom.input new file mode 100644 index 0000000..e8cc464 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/rpm.custom.input @@ -0,0 +1,261 @@ +# -*- mode: perl -*- +# vim: filetype=perl +# +# This "tags file" was created by running the following command: +# +# $ perl rpm2tags.pl ~/rpmbuild/RPMS/noarch/test-2.3-4.noarch.rpm +# +# This file is used in our tests instead of the corresponding RPM file. +# This lets us run the tests on systems where 'rpm' is not installed. + +$tags = { + 'PROVIDEVERSION' => '1:2.3-4', + 'PATCHESNAME' => '(none)', + 'REQUIREFLAGS' => '288', + 'NAME' => 'test', + 'FILEDEPENDSN' => '0', + 'POSTTRANS' => 'echo "Post-transaction script"', + 'SUGGESTNEVRS' => '(none)', + 'CONFLICTFLAGS' => '0', + 'VERIFYSCRIPT' => 'echo "Verify script"', + '_INFO' => 'Name : test +Epoch : 1 +Version : 2.3 +Release : 4 +Architecture: noarch +Install Date: (not installed) +Group : Development/System +Size : 5 +License : MIT +Signature : (none) +Source RPM : test-2.3-4.src.rpm +Build Date : Thu Jan 5 13:46:18 2017 +Build Host : mooffie-desktop +Relocations : (not relocatable) +Packager : Test Packager +Vendor : Test Vendor +URL : http://example.com +Summary : Testing +Description : +Multi-line description field +with "double", \'single quotes\', and $weird | \\characters i\\n = i\\\\t, empty line... + +...and a tab: [ ]. +', + 'DBINSTANCE' => '0', + 'FILECOLORS' => '0', + 'POSTUNFLAGS' => '(none)', + 'POLICYTYPESINDEXES' => '(none)', + 'PACKAGER' => 'Test Packager', + 'SIGSIZE' => '2408', + 'PREINPROG' => '/bin/sh', + 'CLASSDICT' => 'ASCII text', + 'FILEINODES' => '1', + 'EXCLUSIVEARCH' => '(none)', + 'ICON' => '(none)', + 'OBSOLETEFLAGS' => '0', + 'CHANGELOGNAME' => 'Jiri Tyr <jiri.tyr at gmail.com> 1:2.3-4', + 'V' => '2.3', + 'VERIFYSCRIPTFLAGS' => '(none)', + 'SUPPLEMENTFLAGS' => '(none)', + 'FILECLASS' => 'ASCII text', + 'COOKIE' => '(none)', + 'OLDENHANCESNAME' => '(none)', + 'FILEDEPENDSX' => '0', + 'ORDERNAME' => '(none)', + 'TRIGGERSCRIPTS' => '(none)', + 'OLDFILENAMES' => '(none)', + 'PAYLOADFORMAT' => 'cpio', + 'CHANGELOGTIME' => '1483099200', + 'DIRINDEXES' => '0', + 'OLDENHANCESVERSION' => '(none)', + 'OLDENHANCES' => '(none)', + 'SIZE' => '5', + 'SUMMARY' => 'Testing', + 'POLICYFLAGS' => '(none)', + 'SOURCERPM' => 'test-2.3-4.src.rpm', + 'OBSOLETEVERSION' => '', + 'FILEUSERNAME' => 'root', + 'EPOCH' => '1', + 'ORIGDIRNAMES' => '(none)', + 'LICENSE' => 'MIT', + 'OLDSUGGESTS' => '(none)', + 'PATCHESVERSION' => '(none)', + 'FILEMD5S' => 'd8e8fca2dc0f896fd7cb4cb0031ba249', + 'POLICIES' => '(none)', + 'DSAHEADER' => '(none)', + 'LONGSIGSIZE' => '2408', + 'ENHANCENEVRS' => '(none)', + 'ENHANCEFLAGS' => '(none)', + 'PROVIDENEVRS' => 'test = 1:2.3-4', + 'OLDSUGGESTSFLAGS' => '(none)', + 'NVRA' => 'test-2.3-4.noarch', + 'TRIGGERINDEX' => '(none)', + 'HEADERI18NTABLE' => 'C', + 'PATCHESFLAGS' => '(none)', + 'BUILDARCHS' => '(none)', + 'ENHANCEVERSION' => '(none)', + 'REQUIREFLAGS:depflags' => '', + 'RECOMMENDS' => '(none)', + 'VERSION' => '2.3', + 'FILELINKTOS' => '', + 'CONFLICTNEVRS' => 'notest', + 'OBSOLETENEVRS' => 'testing', + 'E' => '1', + 'CHANGELOGTEXT' => '- Initial build.', + 'PRETRANSFLAGS' => '(none)', + 'REQUIRENAME' => '/bin/sh', + 'HEADERREGIONS' => '(none)', + 'NOPATCH' => '(none)', + 'FILEREQUIRE' => '', + 'BUILDTIME' => '1483616778', + 'FILEFLAGS' => '0', + 'OLDSUGGESTSVERSION' => '(none)', + 'PROVIDEFLAGS' => '8', + 'O' => 'testing', + 'SHA1HEADER' => '94826dbc4976a5c54a494a0591553b972edcf235', + 'ARCHIVESIZE' => '264', + 'FILENAMES' => '/var/tmp/test.txt', + 'FILERDEVS' => '0', + 'INSTALLCOLOR' => '(none)', + 'REQUIRENEVRS' => '/bin/sh', + 'FILEDIGESTS' => 'd8e8fca2dc0f896fd7cb4cb0031ba249', + 'EXCLUSIVEOS' => '(none)', + 'CHANGELOGTIME:date' => 'Fri Dec 30 14:00:00 2016', + 'PREFIXES' => '(none)', + 'POLICYNAMES' => '(none)', + 'FILEVERIFYFLAGS' => '4294967295', + 'TRIGGERNAME' => '(none)', + 'PROVIDES' => 'test', + 'RELEASE' => '4', + 'SOURCEPACKAGE' => '(none)', + 'FSCONTEXTS' => '(none)', + 'GROUP' => 'Development/System', + 'HDRID' => '94826dbc4976a5c54a494a0591553b972edcf235', + 'SOURCEPKGID' => '(none)', + 'SUGGESTVERSION' => '(none)', + 'SIGGPG' => '(none)', + 'FILELANGS' => '', + 'ORDERFLAGS' => '(none)', + 'GIF' => '(none)', + 'OBSOLETES' => 'testing', + 'REQUIREVERSION' => '', + 'PAYLOADFLAGS' => '9', + 'TRIGGERTYPE' => '(none)', + 'REMOVETID' => '(none)', + 'OBSOLETEFLAGS:depflags' => '', + 'FILEMTIMES' => '1483616778', + 'POSTUN' => 'echo "Post-uninstallation script"', + 'PROVIDEFLAGS:depflags' => '=', + 'POSTINPROG' => '/bin/sh', + 'OLDSUGGESTSNAME' => '(none)', + 'BUGURL' => '(none)', + 'INSTALLTIME' => '(none)', + 'PREINFLAGS' => '(none)', + 'LONGARCHIVESIZE' => '264', + 'ENHANCES' => '(none)', + 'VENDOR' => 'Test Vendor', + 'URL' => 'http://example.com', + 'RSAHEADER' => '(none)', + 'VCS' => '(none)', + 'POSTTRANSPROG' => '/bin/sh', + 'TRIGGERVERSION' => '(none)', + 'ORIGBASENAMES' => '(none)', + 'TRIGGERFLAGS' => '(none)', + 'RECOMMENDFLAGS' => '(none)', + 'ARCH' => 'noarch', + 'SUGGESTFLAGS' => '(none)', + 'OS' => 'linux', + 'PREUNPROG' => '/bin/sh', + 'P' => 'test', + 'SUPPLEMENTNAME' => '(none)', + 'CONFLICTFLAGS:depflags' => '', + 'DEPENDSDICT' => '(none)', + 'PREUNFLAGS' => '(none)', + 'PLATFORM' => 'noarch-debian-linux', + 'DIRNAMES' => '/var/tmp/', + 'POSTTRANSFLAGS' => '(none)', + 'NVR' => 'test-2.3-4', + 'SIGPGP' => '(none)', + 'INSTFILENAMES' => '(none)', + 'CONFLICTS' => 'notest', + 'NEVRA' => 'test-1:2.3-4.noarch', + 'RECONTEXTS' => '(none)', + 'NEVR' => 'test-1:2.3-4', + 'REQUIRES' => '/bin/sh', + 'PATCH' => '(none)', + 'SOURCE' => '(none)', + 'LONGSIZE' => '5', + 'FILECAPS' => '(none)', + 'DISTURL' => '(none)', + 'RECOMMENDVERSION' => '(none)', + 'FILEMODES' => '33188', + 'BUILDHOST' => 'mooffie-desktop', + 'PUBKEYS' => '(none)', + 'PREUN' => 'echo "Pre-uninstallation script"', + 'FILEPROVIDE' => '', + 'OPTFLAGS' => '-O2 -g -march=i386 -mtune=i686', + 'ORIGFILENAMES' => '(none)', + 'CONFLICTNAME' => 'notest', + 'TRIGGERSCRIPTFLAGS' => '(none)', + 'TRIGGERCONDS' => '(none)', + 'HEADERIMAGE' => '(none)', + 'SUPPLEMENTVERSION' => '(none)', + 'BASENAMES' => 'test.txt', + 'SUPPLEMENTS' => '(none)', + 'SUGGESTS' => '(none)', + 'PREIN' => 'echo "Pre-installation script"', + 'OLDENHANCESFLAGS' => '(none)', + 'DESCRIPTION' => 'Multi-line description field +with "double", \'single quotes\', and $weird | \\characters i\\n = i\\\\t, empty line... + +...and a tab: [ ].', + 'FILESTATES' => '(none)', + 'CONFLICTVERSION' => '', + 'PROVIDENAME' => 'test', + 'HEADERCOLOR' => '0', + 'FILECONTEXTS' => '(none)', + 'EPOCHNUM' => '1', + 'LONGFILESIZES' => '5', + 'DISTRIBUTION' => 'Test Distro', + 'SUGGESTNAME' => '(none)', + 'RPMVERSION' => '4.12.0.1', + 'POLICYTYPES' => '(none)', + 'HEADERSIGNATURES' => '(none)', + 'VERBOSE' => '(none)', + 'R' => '4', + 'PKGID' => 'e8150d00f05b3becbc59c4a31becfab6', + 'NOSOURCE' => '(none)', + 'EXCLUDEARCH' => '(none)', + 'FILEDIGESTALGO' => '(none)', + 'N' => 'test', + 'RECOMMENDNAME' => '(none)', + 'FILESIZES' => '5', + 'FILEDEVICES' => '1', + 'EXCLUDEOS' => '(none)', + 'C' => 'notest', + 'PRETRANSPROG' => '/bin/sh', + 'PRETRANS' => 'echo "Pre-transaction script"', + 'ORIGDIRINDEXES' => '(none)', + 'FILENLINKS' => '1', + 'TRIGGERSCRIPTPROG' => '(none)', + 'VERIFYSCRIPTPROG' => '/bin/sh', + 'OBSOLETENAME' => 'testing', + 'RECOMMENDNEVRS' => '(none)', + 'POSTINFLAGS' => '(none)', + 'BUILDTIME:date' => 'Thu Jan 5 13:46:18 2017', + 'SIGMD5' => 'e8150d00f05b3becbc59c4a31becfab6', + 'SUPPLEMENTNEVRS' => '(none)', + 'FILEGROUPNAME' => 'root', + 'POSTUNPROG' => '/bin/sh', + 'INSTPREFIXES' => '(none)', + 'ORDERVERSION' => '(none)', + 'XPM' => '(none)', + 'INSTALLTID' => '(none)', + 'POSTIN' => 'echo "Post-installation script"', + 'DISTTAG' => '(none)', + 'PAYLOADCOMPRESSOR' => 'gzip', + 'ENHANCENAME' => '(none)', + 'EVR' => '1:2.3-4' +} +; diff --git a/tests/src/vfs/extfs/helpers-list/data/rpm.custom.output b/tests/src/vfs/extfs/helpers-list/data/rpm.custom.output new file mode 100644 index 0000000..c4f7b7b --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/rpm.custom.output @@ -0,0 +1,41 @@ +-r--r--r-- 1 0 0 597 2017-01-05 00:00:00 HEADER +-r-xr-xr-x 1 0 0 0 2017-01-05 00:00:00 INSTALL +-r-xr-xr-x 1 0 0 0 2017-01-05 00:00:00 UPGRADE +dr-xr-xr-x 3 0 0 0 2017-01-05 00:00:00 INFO +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/NAME-EPOCH:VERSION-RELEASE +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/GROUP +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/BUILDHOST +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/SOURCERPM +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/BUILDTIME +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/RPMVERSION +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/OS +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/SIZE +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/DISTRIBUTION +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/VENDOR +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/DESCRIPTION +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/SUMMARY +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/SCRIPTS/PRETRANS +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/SCRIPTS/POSTTRANS +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/SCRIPTS/PREIN +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/SCRIPTS/POSTIN +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/SCRIPTS/PREUN +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/SCRIPTS/POSTUN +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/SCRIPTS/VERIFYSCRIPT +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/SCRIPTS/ALL +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/SCRIPTS/PRETRANSPROG +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/SCRIPTS/POSTTRANSPROG +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/SCRIPTS/PREINPROG +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/SCRIPTS/POSTINPROG +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/SCRIPTS/PREUNPROG +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/SCRIPTS/POSTUNPROG +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/SCRIPTS/VERIFYSCRIPTPROG +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/PACKAGER +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/URL +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/EPOCH +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/LICENSE +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/REQUIRES +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/OBSOLETES +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/PROVIDES +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/CONFLICTS +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 INFO/CHANGELOG +-r--r--r-- 1 0 0 0 2017-01-05 00:00:00 CONTENTS.cpio diff --git a/tests/src/vfs/extfs/helpers-list/data/rpm.glib.env_vars b/tests/src/vfs/extfs/helpers-list/data/rpm.glib.env_vars new file mode 100644 index 0000000..a740c64 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/rpm.glib.env_vars @@ -0,0 +1,3 @@ +MC_TEST_RPM_REWRITE="$MC_TEST_EXTFS_DATA_DIR/rpm.rewrite.sh" + +MCFASTRPM= # disable "fast mode". diff --git a/tests/src/vfs/extfs/helpers-list/data/rpm.glib.input b/tests/src/vfs/extfs/helpers-list/data/rpm.glib.input new file mode 100644 index 0000000..23233d5 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/rpm.glib.input @@ -0,0 +1,264 @@ +# -*- mode: perl -*- +# vim: filetype=perl +# +# This "tags file" was created by running the following command: +# +# $ perl rpm2tags.pl glib2-2.46.2-4.el7.i686.rpm +# +# This file is used in our tests instead of the corresponding RPM file. +# This lets us run the tests on systems where 'rpm' is not installed. + +$tags = { + 'CONFLICTFLAGS:depflags' => '(none)', + 'P' => 'glib2', + 'FILELANGS' => '', + 'VERSION' => '2.46.2', + 'CHANGELOGTEXT' => '- Backport a patch to fix a segfault in file monitor code +- Resolves: #1375753', + 'POSTIN' => '/sbin/ldconfig +gio-querymodules-32 /usr/lib/gio/modules', + 'FILECONTEXTS' => '(none)', + 'TRIGGERTYPE' => '(none)', + 'GROUP' => 'System Environment/Libraries', + 'DESCRIPTION' => 'GLib is the low-level core library that forms the basis for projects +such as GTK+ and GNOME. It provides data structure handling for C, +portability wrappers, and interfaces for such runtime functionality +as an event loop, threads, dynamic loading, and an object system.', + 'NEVR' => 'glib2-2.46.2-4.el7', + 'NOPATCH' => '(none)', + 'SOURCEPACKAGE' => '(none)', + 'VERBOSE' => '(none)', + 'REQUIRENEVRS' => '/bin/sh', + 'TRIGGERSCRIPTFLAGS' => '(none)', + 'VENDOR' => 'CentOS', + 'DSAHEADER' => '(none)', + 'PRETRANSPROG' => '(none)', + 'PROVIDES' => 'glib2', + 'EXCLUSIVEOS' => '(none)', + 'NVRA' => 'glib2-2.46.2-4.el7.i686', + 'URL' => 'http://www.gtk.org', + 'DISTRIBUTION' => '(none)', + 'OBSOLETENEVRS' => '(none)', + 'O' => '(none)', + 'SIGPGP' => '8902150305005831e31824c6a8a7f4a80eb50108452c0ff9011ff528bd335c28b6dab1b1b783cde246b3ca8df41216124a66c86bb13d864fb68fcaffaff69a7c0638c20445cef0d8712b66430ef959b823b7c48253b46e9646fc15bb07024abcd160df2c42be0a3aed81b79ebce4779eee5510148683e10ae0da26959abe5c0df821b18a64a9d0f0c87e4be02c7644999c4dc735aaf36f88e652b12fe786a2fc22e9e9ecee1156681d8ac6f5b088b9593ea5fd0c1c62e14b5b1863d019ab04ab6008ab736e9643bd45fcab373a407b669c4efd4973d36b59411146bf21f1b1caca15ea36616ee510e0a57e5ac412fbc5094637f9bdb3bdb07cf0a5a84a560aeed5b92e99ef796025fdfe25a1dd1ea58e24f7218d2b2a76286c4859feb02c6b1221055a3ba4f61dd997c9a240a7127439c5184f18432da6c9588e5166a665d10d78673067fe006411171eee32e28ff548c1500376b4851691925f0d5fa855c62312d71c8444077a397cfda03e4e026ba065fef29bf5922fc68522e4a394e1e851049b965c9d1a680df8c94c41b703667ff84db43e45a1508916d76ac45928d00fe60643366484d5215cb9e08c4737f0c9d27c3f812fecd72aef6195e07badeab549f1f57adcd860e3e3ea7006faa32d63b9dc65d46a06c0f9ce6d15541e612b76bc2d61d154c18700fe92be41e78dff5679f7cfb69fb430edf873dd8a7adf9e4214ff6d09d814314be641408c073d3a17da631463a8ea6522', + 'PREINPROG' => '(none)', + 'ENHANCENAME' => '(none)', + 'INSTALLCOLOR' => '(none)', + 'OLDENHANCESNAME' => '(none)', + 'OBSOLETES' => '(none)', + 'ARCH' => 'i686', + 'RECOMMENDVERSION' => '(none)', + 'OBSOLETEFLAGS:depflags' => '(none)', + 'POSTUNPROG' => '/bin/sh', + 'POLICYTYPES' => '(none)', + 'RECOMMENDFLAGS' => '(none)', + 'CLASSDICT' => 'ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=1171bf18928201e1c6ec8e190e64303762a1f4d9, stripped', + 'CONFLICTS' => '(none)', + 'NOSOURCE' => '(none)', + 'EXCLUDEOS' => '(none)', + 'FILEMTIMES' => '1478898094', + 'DBINSTANCE' => '0', + 'ORIGBASENAMES' => '(none)', + 'ENHANCEVERSION' => '(none)', + 'FILEFLAGS' => '0', + 'FSCONTEXTS' => '(none)', + 'PROVIDEVERSION' => '2.46.2-4.el7', + 'FILEMD5S' => 'f64bee32e178161f3340ebd97e83193f9302ef5dc22a83608e3923bf450c847d', + 'BASENAMES' => 'gapplication', + 'POLICYTYPESINDEXES' => '(none)', + 'PROVIDENEVRS' => 'glib2 = 2.46.2-4.el7', + 'OS' => 'linux', + 'POSTINPROG' => '/bin/sh', + 'OLDSUGGESTSVERSION' => '(none)', + 'INSTALLTID' => '(none)', + 'PROVIDEFLAGS:depflags' => '=', + 'PREUNFLAGS' => '(none)', + 'OLDFILENAMES' => '(none)', + 'BUILDARCHS' => '(none)', + 'ORIGDIRNAMES' => '(none)', + 'SUGGESTFLAGS' => '(none)', + 'INSTFILENAMES' => '(none)', + 'FILEUSERNAME' => 'root', + 'CONFLICTNEVRS' => '(none)', + 'PROVIDENAME' => 'glib2', + 'LICENSE' => 'LGPLv2+', + 'OLDSUGGESTS' => '(none)', + 'RECOMMENDNAME' => '(none)', + 'PATCHESVERSION' => '(none)', + 'DISTTAG' => '(none)', + 'FILEDIGESTS' => 'f64bee32e178161f3340ebd97e83193f9302ef5dc22a83608e3923bf450c847d', + 'EXCLUSIVEARCH' => '(none)', + 'V' => '2.46.2', + 'OLDENHANCESVERSION' => '(none)', + 'POSTTRANSFLAGS' => '(none)', + 'SUPPLEMENTNEVRS' => '(none)', + 'XPM' => '(none)', + 'PREUN' => '(none)', + 'ORDERFLAGS' => '(none)', + 'ORIGFILENAMES' => '(none)', + 'GIF' => '(none)', + 'ORIGDIRINDEXES' => '(none)', + 'SOURCERPM' => 'glib2-2.46.2-4.el7.src.rpm', + 'OBSOLETEFLAGS' => '(none)', + 'PRETRANSFLAGS' => '(none)', + 'POSTUNFLAGS' => '(none)', + 'ICON' => '(none)', + 'PREINFLAGS' => '(none)', + 'PREIN' => '(none)', + 'DIRINDEXES' => '0', + 'HEADERI18NTABLE' => 'C', + 'POSTTRANS' => '(none)', + 'BUILDTIME:date' => 'Fri Nov 11 23:01:44 2016', + 'ORDERVERSION' => '(none)', + 'SUPPLEMENTNAME' => '(none)', + 'CHANGELOGTIME' => '1473854400', + 'FILECAPS' => '(none)', + 'RECOMMENDS' => '(none)', + 'PAYLOADFORMAT' => 'cpio', + 'RPMVERSION' => '4.11.3', + 'SIZE' => '11147850', + 'FILEINODES' => '1', + 'SUPPLEMENTVERSION' => '(none)', + 'N' => 'glib2', + 'PROVIDEFLAGS' => '8', + 'FILECOLORS' => '1', + 'REMOVETID' => '(none)', + 'INSTPREFIXES' => '(none)', + 'PATCHESFLAGS' => '(none)', + 'HDRID' => '60af3b40a992bea6f874a1ebde5a2abecfe729ab', + 'OBSOLETEVERSION' => '(none)', + 'EXCLUDEARCH' => '(none)', + 'ENHANCEFLAGS' => '(none)', + 'REQUIRENAME' => '/bin/sh', + 'LONGSIGSIZE' => '2374912', + 'C' => '(none)', + 'TRIGGERINDEX' => '(none)', + 'SOURCE' => '(none)', + 'SUGGESTNAME' => '(none)', + 'BUILDHOST' => 'c1bm.rdu2.centos.org', + 'VERIFYSCRIPT' => '(none)', + 'HEADERIMAGE' => '(none)', + 'POSTTRANSPROG' => '(none)', + 'SUPPLEMENTS' => '(none)', + 'FILELINKTOS' => '', + 'EVR' => '2.46.2-4.el7', + 'SUPPLEMENTFLAGS' => '(none)', + 'VCS' => '(none)', + 'SIGSIZE' => '2374912', + 'NAME' => 'glib2', + 'SIGGPG' => '(none)', + 'RECOMMENDNEVRS' => '(none)', + 'NVR' => 'glib2-2.46.2-4.el7', + 'TRIGGERCONDS' => '(none)', + 'OLDENHANCES' => '(none)', + 'VERIFYSCRIPTFLAGS' => '(none)', + 'EPOCH' => '(none)', + 'PLATFORM' => 'i686-redhat-linux-gnu', + 'REQUIREFLAGS:depflags' => '', + 'CONFLICTFLAGS' => '(none)', + 'POLICYFLAGS' => '(none)', + 'SOURCEPKGID' => '(none)', + 'CHANGELOGNAME' => 'Kalev Lember <klember@redhat.com> - 2.46.2-4', + 'BUGURL' => '(none)', + 'POSTINFLAGS' => '(none)', + 'RECONTEXTS' => '(none)', + 'INSTALLTIME' => '(none)', + 'HEADERCOLOR' => '1', + 'PATCH' => '(none)', + 'TRIGGERFLAGS' => '(none)', + 'PAYLOADFLAGS' => '2', + 'REQUIREVERSION' => '', + 'DEPENDSDICT' => '1375731723', + 'POLICIES' => '(none)', + 'ORDERNAME' => '(none)', + '_INFO' => 'Name : glib2 +Version : 2.46.2 +Release : 4.el7 +Architecture: i686 +Install Date: (not installed) +Group : System Environment/Libraries +Size : 11147850 +License : LGPLv2+ +Signature : RSA/SHA256, Sun Nov 20 19:53:28 2016, Key ID 24c6a8a7f4a80eb5 +Source RPM : glib2-2.46.2-4.el7.src.rpm +Build Date : Fri Nov 11 23:01:44 2016 +Build Host : c1bm.rdu2.centos.org +Relocations : (not relocatable) +Packager : CentOS BuildSystem <http://bugs.centos.org> +Vendor : CentOS +URL : http://www.gtk.org +Summary : A library of handy utility functions +Description : +GLib is the low-level core library that forms the basis for projects +such as GTK+ and GNOME. It provides data structure handling for C, +portability wrappers, and interfaces for such runtime functionality +as an event loop, threads, dynamic loading, and an object system. +', + 'LONGARCHIVESIZE' => '11168196', + 'OLDSUGGESTSFLAGS' => '(none)', + 'RELEASE' => '4.el7', + 'FILENLINKS' => '1', + 'NEVRA' => 'glib2-2.46.2-4.el7.i686', + 'POSTUN' => '/sbin/ldconfig +[ ! -x /usr/bin/gio-querymodules-32 ] || \\ +gio-querymodules-32 /usr/lib/gio/modules', + 'BUILDTIME' => '1478898104', + 'LONGFILESIZES' => '14936', + 'OLDSUGGESTSNAME' => '(none)', + 'POLICYNAMES' => '(none)', + 'PREFIXES' => '(none)', + 'TRIGGERSCRIPTS' => '(none)', + 'PUBKEYS' => '(none)', + 'SHA1HEADER' => '60af3b40a992bea6f874a1ebde5a2abecfe729ab', + 'SUGGESTVERSION' => '(none)', + 'E' => '(none)', + 'COOKIE' => '(none)', + 'FILEDIGESTALGO' => '8', + 'PRETRANS' => '(none)', + 'FILEGROUPNAME' => 'root', + 'DIRNAMES' => '/usr/bin/', + 'R' => '4.el7', + 'CONFLICTVERSION' => '(none)', + 'FILEMODES' => '33261', + 'TRIGGERVERSION' => '(none)', + 'HEADERREGIONS' => '(none)', + 'SUGGESTS' => '(none)', + 'OLDENHANCESFLAGS' => '(none)', + 'TRIGGERSCRIPTPROG' => '(none)', + 'FILEVERIFYFLAGS' => '4294967295', + 'FILEDEPENDSN' => '15', + 'FILEREQUIRE' => 'libc.so.6(GLIBC_2.2) libc.so.6(GLIBC_2.4) libc.so.6(GLIBC_2.0) libgio-2.0.so.0 libgobject-2.0.so.0 libgmodule-2.0.so.0 libz.so.1 libselinux.so.1 libresolv.so.2 libffi.so.6 libdl.so.2 libglib-2.0.so.0 libpthread.so.0 libc.so.6 rtld(GNU_HASH)', + 'FILERDEVS' => '0', + 'PKGID' => 'd8300bd6ae89fd3d471b823d4da55e5e', + 'FILEDEVICES' => '1', + 'FILENAMES' => '/usr/bin/gapplication', + 'ENHANCES' => '(none)', + 'EPOCHNUM' => '0', + 'VERIFYSCRIPTPROG' => '(none)', + 'PREUNPROG' => '(none)', + 'CONFLICTNAME' => '(none)', + 'FILESIZES' => '14936', + 'FILEPROVIDE' => '', + 'ARCHIVESIZE' => '11168196', + 'RSAHEADER' => '8902150305005831e31824c6a8a7f4a80eb50108cdf90ffc09656e816376ef5f32f146d136999f958f3e1338f21e0cac90bac97795d92c29301478a97f8b72afee0505896fa7c31195612542ba972da405323e3ec910ecc45350459220f39f2437a9ccbc3f9052b3d042d0e4a6d687f9be827b9c766d7fc680b2d99aebafe5134a54e64f0452be09b5592360d940ed3f3f3b14de7b0b124f510cfbdbd118e1638ee280edcbf6a9f916925f1b0bda0980935aedab1f9bfc342dceae437fa14736cdff2fe330ad37ab2719f6a3de84aaf3982a575a6f4980bc8a8e10a7ba51f53ed967a6c99638565147bbb0b2427c176ffbb8be5774b45f79388ff1407e6976608c3592784b971b791f0eca73a8a2ddafa70f656e3e565c9523aa1f4e78a56acdf39a91ebd90a481c0f02186f4bca965ecf889d075a87922830ed2c701d39ce627c362b222ed153c07b532a875744e1c54e9245c1044cf93520b208384d15413aba6b3425c457781862efd215a24c0c37c32c3ab29af785adfe418d5e86af53662163a9fed16dbac3ff4704120af67e0eb584a4f8766e510e6366eb5fcce0938253962b03972eca392e61f0f979f0dd7a554273d5ca463933033d67be82c7b31bcc2ef5c477907d3734aa596aefb7988a259d48d160413590243b56850eeab96ffa76d06b86faa0b6c9fd6fe43e902669444284e1947aa652673eb58214db9d19d0447de5bd036a45e9746ab4039f4dab7c73481a1bfb5a4d', + 'FILESTATES' => '(none)', + 'PACKAGER' => 'CentOS BuildSystem <http://bugs.centos.org>', + 'SUMMARY' => 'A library of handy utility functions', + 'OPTFLAGS' => '-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m32 -march=x86-64 -mtune=generic -mfpmath=sse -fasynchronous-unwind-tables', + 'OBSOLETENAME' => '(none)', + 'REQUIRES' => '/bin/sh', + 'FILECLASS' => 'ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=1171bf18928201e1c6ec8e190e64303762a1f4d9, stripped', + 'PAYLOADCOMPRESSOR' => 'xz', + 'HEADERSIGNATURES' => '(none)', + 'PATCHESNAME' => '(none)', + 'CHANGELOGTIME:date' => 'Wed Sep 14 15:00:00 2016', + 'ENHANCENEVRS' => '(none)', + 'SIGMD5' => 'd8300bd6ae89fd3d471b823d4da55e5e', + 'FILEDEPENDSX' => '0', + 'DISTURL' => '(none)', + 'REQUIREFLAGS' => '1280', + 'TRIGGERNAME' => '(none)', + 'LONGSIZE' => '11147850', + 'SUGGESTNEVRS' => '(none)' +} +; diff --git a/tests/src/vfs/extfs/helpers-list/data/rpm.glib.output b/tests/src/vfs/extfs/helpers-list/data/rpm.glib.output new file mode 100644 index 0000000..ab012ac --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/rpm.glib.output @@ -0,0 +1,27 @@ +-r--r--r-- 1 0 0 868 2016-11-11 00:00:00 HEADER +-r-xr-xr-x 1 0 0 0 2016-11-11 00:00:00 INSTALL +-r-xr-xr-x 1 0 0 0 2016-11-11 00:00:00 UPGRADE +dr-xr-xr-x 3 0 0 0 2016-11-11 00:00:00 INFO +-r--r--r-- 1 0 0 0 2016-11-11 00:00:00 INFO/NAME-VERSION-RELEASE +-r--r--r-- 1 0 0 0 2016-11-11 00:00:00 INFO/GROUP +-r--r--r-- 1 0 0 0 2016-11-11 00:00:00 INFO/BUILDHOST +-r--r--r-- 1 0 0 0 2016-11-11 00:00:00 INFO/SOURCERPM +-r--r--r-- 1 0 0 0 2016-11-11 00:00:00 INFO/BUILDTIME +-r--r--r-- 1 0 0 0 2016-11-11 00:00:00 INFO/RPMVERSION +-r--r--r-- 1 0 0 0 2016-11-11 00:00:00 INFO/OS +-r--r--r-- 1 0 0 0 2016-11-11 00:00:00 INFO/SIZE +-r--r--r-- 1 0 0 0 2016-11-11 00:00:00 INFO/VENDOR +-r--r--r-- 1 0 0 0 2016-11-11 00:00:00 INFO/DESCRIPTION +-r--r--r-- 1 0 0 0 2016-11-11 00:00:00 INFO/SUMMARY +-r--r--r-- 1 0 0 0 2016-11-11 00:00:00 INFO/SCRIPTS/POSTIN +-r--r--r-- 1 0 0 0 2016-11-11 00:00:00 INFO/SCRIPTS/POSTUN +-r--r--r-- 1 0 0 0 2016-11-11 00:00:00 INFO/SCRIPTS/ALL +-r--r--r-- 1 0 0 0 2016-11-11 00:00:00 INFO/SCRIPTS/POSTINPROG +-r--r--r-- 1 0 0 0 2016-11-11 00:00:00 INFO/SCRIPTS/POSTUNPROG +-r--r--r-- 1 0 0 0 2016-11-11 00:00:00 INFO/PACKAGER +-r--r--r-- 1 0 0 0 2016-11-11 00:00:00 INFO/URL +-r--r--r-- 1 0 0 0 2016-11-11 00:00:00 INFO/LICENSE +-r--r--r-- 1 0 0 0 2016-11-11 00:00:00 INFO/REQUIRES +-r--r--r-- 1 0 0 0 2016-11-11 00:00:00 INFO/PROVIDES +-r--r--r-- 1 0 0 0 2016-11-11 00:00:00 INFO/CHANGELOG +-r--r--r-- 1 0 0 0 2016-11-11 00:00:00 CONTENTS.cpio diff --git a/tests/src/vfs/extfs/helpers-list/data/rpm.rewrite.sh b/tests/src/vfs/extfs/helpers-list/data/rpm.rewrite.sh new file mode 100644 index 0000000..08867fa --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/rpm.rewrite.sh @@ -0,0 +1,52 @@ +# +# This file gets source'd into our rpm helper. +# +# It imitates the 'rpm' program by overriding a few functions. +# + +# The tags file. +TAGSF="$MC_TEST_EXTFS_INPUT" + +. "$MC_TEST_EXTFS_CONFIG_SH" # Gain access to $PERL. + +# ---------------------------------------------------------------------------- + +# +# Imitates 'rpm -qp --qf <TEMPLATE> <PACKAGE_FILE>'. +# +# (It ignores <PACKAGE_FILE>, using our input instead.) +# +# E.g.: given "Name: %{NAME} Ver: %{VERSION}", +# prints "Name: php-pear-Twig Ver: 1.0.0". +# +rpm_qf() +{ + $PERL -w -e ' + $tagsf = $ARGV[0]; + $tmplt = $ARGV[1]; + + do $tagsf or die("$tagsf: $!"); + $tmplt =~ s/\\n/\n/g; + $tmplt =~ s/%\{(.*?)\}/ + (my $tag = $1) =~ s,^RPMTAG_,,; # Tag names may be specified with or without this prefix. + exists $tags->{$tag} ? $tags->{$tag} : "(none)" + /eg; + print $tmplt; + ' \ + "$TAGSF" "$1" +} +RPM_QUERY_FMT=rpm_qf # Tell the helper to use it instead of the 'rpm' binary. + +# ---------------------------------------------------------------------------- + +# +# Overrides helper's. +# +# @Mock +# +mcrpmfs_getDesription() +{ + rpm_qf "%{_INFO}" +} + +# ---------------------------------------------------------------------------- diff --git a/tests/src/vfs/extfs/helpers-list/data/u7z.README b/tests/src/vfs/extfs/helpers-list/data/u7z.README new file mode 100644 index 0000000..45ae720 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/u7z.README @@ -0,0 +1,26 @@ + +We have 4 inputs: + +- u7z.simple.input + + Simplest input: no abnormalities. + (One line has a filename with spaces in it.) + +- u7z.missing-date.input + + Date field is missing (see #2707). + +- u7z.missing-size-and-date.input + + Size field is missing, and in some rows the date is missing too (see #2707). + +- u7z.complex.input + + Downloaded from #2707. It's 'list.txt' plus three bottom lines from + 'listing2.txt'. It demonstrates all the above: missing date, missing + uncompressed and compressed size. + + +Output files must be constant. Therefore in our '*.env_var' files we +define a command that sets missing dates to some fixed date (instead of +being the archive's date). diff --git a/tests/src/vfs/extfs/helpers-list/data/u7z.complex.env_vars b/tests/src/vfs/extfs/helpers-list/data/u7z.complex.env_vars new file mode 100644 index 0000000..4521908 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/u7z.complex.env_vars @@ -0,0 +1 @@ +MC_TEST_EXTFS_U7Z_STAT="echo 2007-07-07 07:07:07" diff --git a/tests/src/vfs/extfs/helpers-list/data/u7z.complex.input b/tests/src/vfs/extfs/helpers-list/data/u7z.complex.input new file mode 100644 index 0000000..4842ffd --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/u7z.complex.input @@ -0,0 +1,74 @@ + +7-Zip 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18 +p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,4 CPUs) + +Listing archive: Geekbench-2.2.3-WindowsSetup.exe + +-- +Path = Geekbench-2.2.3-WindowsSetup.exe +Type = PE +CPU = x86 +Characteristics = Executable 32-bit NoRelocs NoLineNums NoLocalSyms +Created = 2009-12-06 03:50:52 +Physical Size = 5649208 +Headers Size = 1024 +Checksum = 5651922 +Image Size = 327680 +Section Alignment = 4096 +File Alignment = 512 +Code Size = 24064 +Initialized Data Size = 164864 +Uninitialized Data Size = 1024 +Linker Version = 6.0 +OS Version = 4.0 +Image Version = 6.0 +Subsystem Version = 4.0 +Subsystem = Windows GUI +DLL Characteristics = TerminalServerAware +Stack Reserve = 1048576 +Stack Commit = 4096 +Heap Reserve = 1048576 +Heap Commit = 4096 +Image Base = 4194304 +---- +Path = [0] +Size = 5519272 +Packed Size = 5519272 +Offset = 123904 +-- +Path = [0] +Type = Nsis +Method = Deflate +Solid = - + + Date Time Attr Size Compressed Name +------------------- ----- ------------ ------------ ------------------------ + ..... 8005 $PLUGINSDIR/InstallOptions.dll + ..... 3328 $PLUGINSDIR/StartMenu.dll +2007-11-15 01:12:38 ..... 134 $PLUGINSDIR/ioSpecial.ini +2003-09-24 00:34:00 ..... 1886 $PLUGINSDIR/modern-wizard.bmp +2011-11-03 02:33:04 ..... 1178084 Geekbench22.exe +2011-11-03 02:33:04 ..... 101652 geekbench.exe +2011-11-03 02:33:06 ..... 1058731 geekbench_x86_32.exe +2011-11-03 02:33:06 ..... 1192155 geekbench_x86_64.exe +2011-11-03 02:33:04 ..... 445814 cpuidsdk.dll +2011-11-03 02:33:04 ..... 469920 cpuidsdk64.dll +2011-11-03 02:33:04 ..... 737580 geekbench.plar +2011-11-03 02:23:16 ..... 4014 $_OUTDIR/html/ui/bg-repeat.gif +2011-11-03 02:23:16 ..... 12817 12817 $_OUTDIR/html/ui/callout-bg-bottom.gif +2011-11-03 02:23:16 ..... 14648 $_OUTDIR/html/ui/callout-bg-top.gif +2011-11-03 02:23:16 ..... 120 $_OUTDIR/html/ui/graph-background.png +2011-11-03 02:23:16 ..... 861 861 $_OUTDIR/html/ui/heading-bg-left.gif +2011-11-03 02:23:16 ..... 9854 $_OUTDIR/html/ui/heading-bg.gif +2011-11-03 02:23:16 ..... 30401 $_OUTDIR/html/ui/logo.gif +2011-11-03 02:23:16 ..... 1431 1431 $_OUTDIR/html/ui/nav-arrow-down.gif +2011-11-03 02:23:16 ..... 1446 1446 $_OUTDIR/html/ui/nav-arrow-up.gif +2011-11-03 02:23:16 ..... 1425 1425 $_OUTDIR/html/ui/nav-arrows-bg.gif +2011-11-03 02:23:16 ..... 3841 $_OUTDIR/html/ui/table-wrapper-bg-repeat-x.gif +2011-11-03 02:23:16 ..... 2885 2885 $_OUTDIR/html/ui/table-wrapper-bg-repeat.gif +2011-11-03 02:23:16 ..... 142162 142162 $_OUTDIR/ux/splash-screen.png +2006-08-11 23:49:28 ..... 28016 $PLUGINSDIR/splash.bmp + ..... 6144 $PLUGINSDIR/AdvSplash.dll + ..... plugins/shared memory/uninstall.exe +------------------- ----- ------------ ------------ ------------------------ + 163027 5423194 27 files, 0 folders diff --git a/tests/src/vfs/extfs/helpers-list/data/u7z.complex.output b/tests/src/vfs/extfs/helpers-list/data/u7z.complex.output new file mode 100644 index 0000000..93012b1 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/u7z.complex.output @@ -0,0 +1,27 @@ +-rw-r--r-- 1 <<uid>> <<gid>> 6144 2007-07-07 07:07:07 $PLUGINSDIR/AdvSplash.dll +-rw-r--r-- 1 <<uid>> <<gid>> 8005 2007-07-07 07:07:07 $PLUGINSDIR/InstallOptions.dll +-rw-r--r-- 1 <<uid>> <<gid>> 3328 2007-07-07 07:07:07 $PLUGINSDIR/StartMenu.dll +-rw-r--r-- 1 <<uid>> <<gid>> 134 2007-11-15 01:12:38 $PLUGINSDIR/ioSpecial.ini +-rw-r--r-- 1 <<uid>> <<gid>> 1886 2003-09-24 00:34:00 $PLUGINSDIR/modern-wizard.bmp +-rw-r--r-- 1 <<uid>> <<gid>> 28016 2006-08-11 23:49:28 $PLUGINSDIR/splash.bmp +-rw-r--r-- 1 <<uid>> <<gid>> 4014 2011-11-03 02:23:16 $_OUTDIR/html/ui/bg-repeat.gif +-rw-r--r-- 1 <<uid>> <<gid>> 12817 2011-11-03 02:23:16 $_OUTDIR/html/ui/callout-bg-bottom.gif +-rw-r--r-- 1 <<uid>> <<gid>> 14648 2011-11-03 02:23:16 $_OUTDIR/html/ui/callout-bg-top.gif +-rw-r--r-- 1 <<uid>> <<gid>> 120 2011-11-03 02:23:16 $_OUTDIR/html/ui/graph-background.png +-rw-r--r-- 1 <<uid>> <<gid>> 861 2011-11-03 02:23:16 $_OUTDIR/html/ui/heading-bg-left.gif +-rw-r--r-- 1 <<uid>> <<gid>> 9854 2011-11-03 02:23:16 $_OUTDIR/html/ui/heading-bg.gif +-rw-r--r-- 1 <<uid>> <<gid>> 30401 2011-11-03 02:23:16 $_OUTDIR/html/ui/logo.gif +-rw-r--r-- 1 <<uid>> <<gid>> 1431 2011-11-03 02:23:16 $_OUTDIR/html/ui/nav-arrow-down.gif +-rw-r--r-- 1 <<uid>> <<gid>> 1446 2011-11-03 02:23:16 $_OUTDIR/html/ui/nav-arrow-up.gif +-rw-r--r-- 1 <<uid>> <<gid>> 1425 2011-11-03 02:23:16 $_OUTDIR/html/ui/nav-arrows-bg.gif +-rw-r--r-- 1 <<uid>> <<gid>> 3841 2011-11-03 02:23:16 $_OUTDIR/html/ui/table-wrapper-bg-repeat-x.gif +-rw-r--r-- 1 <<uid>> <<gid>> 2885 2011-11-03 02:23:16 $_OUTDIR/html/ui/table-wrapper-bg-repeat.gif +-rw-r--r-- 1 <<uid>> <<gid>> 142162 2011-11-03 02:23:16 $_OUTDIR/ux/splash-screen.png +-rw-r--r-- 1 <<uid>> <<gid>> 1178084 2011-11-03 02:33:04 Geekbench22.exe +-rw-r--r-- 1 <<uid>> <<gid>> 445814 2011-11-03 02:33:04 cpuidsdk.dll +-rw-r--r-- 1 <<uid>> <<gid>> 469920 2011-11-03 02:33:04 cpuidsdk64.dll +-rw-r--r-- 1 <<uid>> <<gid>> 101652 2011-11-03 02:33:04 geekbench.exe +-rw-r--r-- 1 <<uid>> <<gid>> 737580 2011-11-03 02:33:04 geekbench.plar +-rw-r--r-- 1 <<uid>> <<gid>> 1058731 2011-11-03 02:33:06 geekbench_x86_32.exe +-rw-r--r-- 1 <<uid>> <<gid>> 1192155 2011-11-03 02:33:06 geekbench_x86_64.exe +-rw-r--r-- 1 <<uid>> <<gid>> 0 2007-07-07 07:07:07 plugins/shared memory/uninstall.exe diff --git a/tests/src/vfs/extfs/helpers-list/data/u7z.missing-date.env_vars b/tests/src/vfs/extfs/helpers-list/data/u7z.missing-date.env_vars new file mode 100644 index 0000000..4521908 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/u7z.missing-date.env_vars @@ -0,0 +1 @@ +MC_TEST_EXTFS_U7Z_STAT="echo 2007-07-07 07:07:07" diff --git a/tests/src/vfs/extfs/helpers-list/data/u7z.missing-date.input b/tests/src/vfs/extfs/helpers-list/data/u7z.missing-date.input new file mode 100644 index 0000000..a8156e2 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/u7z.missing-date.input @@ -0,0 +1,5 @@ + Date Time Attr Size Compressed Name +------------------- ----- ------------ ------------ ------------------------ + D.... 0 0 $PLUGINSDIR + ..... 11024 8005 $PLUGINSDIR/InstallOptions.dll +2007-11-15 01:12:38 ..... 235 134 $PLUGINSDIR/ioSpecial.ini diff --git a/tests/src/vfs/extfs/helpers-list/data/u7z.missing-date.output b/tests/src/vfs/extfs/helpers-list/data/u7z.missing-date.output new file mode 100644 index 0000000..9fea879 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/u7z.missing-date.output @@ -0,0 +1,3 @@ +drwxr-xr-x 1 <<uid>> <<gid>> 0 2007-07-07 07:07:07 $PLUGINSDIR +-rw-r--r-- 1 <<uid>> <<gid>> 11024 2007-07-07 07:07:07 $PLUGINSDIR/InstallOptions.dll +-rw-r--r-- 1 <<uid>> <<gid>> 235 2007-11-15 01:12:38 $PLUGINSDIR/ioSpecial.ini diff --git a/tests/src/vfs/extfs/helpers-list/data/u7z.missing-size-and-date.env_vars b/tests/src/vfs/extfs/helpers-list/data/u7z.missing-size-and-date.env_vars new file mode 100644 index 0000000..4521908 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/u7z.missing-size-and-date.env_vars @@ -0,0 +1 @@ +MC_TEST_EXTFS_U7Z_STAT="echo 2007-07-07 07:07:07" diff --git a/tests/src/vfs/extfs/helpers-list/data/u7z.missing-size-and-date.input b/tests/src/vfs/extfs/helpers-list/data/u7z.missing-size-and-date.input new file mode 100644 index 0000000..f9ee9b5 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/u7z.missing-size-and-date.input @@ -0,0 +1,11 @@ + Date Time Attr Size Compressed Name +------------------- ----- ------------ ------------ ------------------------ +2011-11-01 01:33:04 ..... 469920 cpuidsdk64.dll +2011-11-02 02:23:16 D.... 0 $_OUTDIR/html/ui +2011-11-03 03:33:04 ..... test.dll +2011-11-04 04:23:16 D.... test + ..... 17770090 no-date-cpuidsdk64.dll + D.... 0 no-date-$_OUTDIR/html/ui + ..... no-date-test.dll + D.... no-date-test +2011-11-05 05:23:16 ..... 17897 12817 $_OUTDIR/html/ui/callout-bg-bottom.gif diff --git a/tests/src/vfs/extfs/helpers-list/data/u7z.missing-size-and-date.output b/tests/src/vfs/extfs/helpers-list/data/u7z.missing-size-and-date.output new file mode 100644 index 0000000..260b705 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/u7z.missing-size-and-date.output @@ -0,0 +1,9 @@ +drwxr-xr-x 1 <<uid>> <<gid>> 0 2011-11-02 02:23:16 $_OUTDIR/html/ui +-rw-r--r-- 1 <<uid>> <<gid>> 17897 2011-11-05 05:23:16 $_OUTDIR/html/ui/callout-bg-bottom.gif +-rw-r--r-- 1 <<uid>> <<gid>> 469920 2011-11-01 01:33:04 cpuidsdk64.dll +drwxr-xr-x 1 <<uid>> <<gid>> 0 2007-07-07 07:07:07 no-date-$_OUTDIR/html/ui +-rw-r--r-- 1 <<uid>> <<gid>> 17770090 2007-07-07 07:07:07 no-date-cpuidsdk64.dll +drwxr-xr-x 1 <<uid>> <<gid>> 0 2007-07-07 07:07:07 no-date-test +-rw-r--r-- 1 <<uid>> <<gid>> 0 2007-07-07 07:07:07 no-date-test.dll +drwxr-xr-x 1 <<uid>> <<gid>> 0 2011-11-04 04:23:16 test +-rw-r--r-- 1 <<uid>> <<gid>> 0 2011-11-03 03:33:04 test.dll diff --git a/tests/src/vfs/extfs/helpers-list/data/u7z.simple.input b/tests/src/vfs/extfs/helpers-list/data/u7z.simple.input new file mode 100644 index 0000000..69835fb --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/u7z.simple.input @@ -0,0 +1,64 @@ + +7-Zip [32] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21 +p7zip Version 16.02 (locale=en_GB.utf8,Utf16=on,HugeFiles=on,32 bits,1 CPU Intel(R) Pentium(R) 4 CPU 1.80GHz (F27),ASM) + +Scanning the drive for archives: +1 file, 7597 bytes (8 KiB) + +Listing archive: all.7z + +-- +Path = all.7z +Type = 7z +Physical Size = 7597 +Headers Size = 882 +Method = LZMA2:24k +Solid = + +Blocks = 1 + + Date Time Attr Size Compressed Name +------------------- ----- ------------ ------------ ------------------------ +2016-10-26 08:35:48 D.... 0 0 x +2009-05-03 21:01:33 D.... 0 0 x/etc +2009-05-03 21:02:13 D.... 0 0 x/etc/X11 +2006-05-02 10:12:38 D.... 0 0 x/etc/X11/xinit +2005-09-24 02:11:27 D.... 0 0 x/etc/X11/xinit/Xclients.d +2005-12-04 19:15:47 D.... 0 0 x/etc/X11/xinit/xinitrc.d +2009-05-03 21:07:38 D.... 0 0 x/etc/X11/xkb +2016-12-18 22:30:42 ....A 0 0 with spaces.txt +2002-08-01 23:21:47 ....A 143 6715 alert +2004-05-19 20:42:38 ....A 363 atime +2005-11-09 01:36:31 ....A 71 fv +2003-10-18 20:37:07 ....A 59 fvd +2006-10-22 22:26:05 ....A 83 magdev +2006-10-19 16:56:16 ....A 72 maghelp +2004-03-14 12:25:27 ....A 37 ml +2004-07-06 18:02:03 ....A 28 modernize +2004-04-02 03:05:30 ....A 138 pxml +2004-12-08 20:42:44 ....A 725 s +2002-07-29 11:58:15 ....A 803 ser +2004-08-04 14:29:00 ....A 40 title +2002-08-01 23:21:41 ....A 156 ualert +2004-06-28 16:49:03 ....A 17 ucopy +2004-06-28 16:49:10 ....A 18 upaste +2003-08-25 19:08:11 ....A 2146 utf8_to_cp1255.perl +2006-05-16 21:00:06 ....A 63 utf8_to_cp1255.sh +2003-08-11 17:40:25 ....A 846 vimspell.sh +2002-03-28 01:20:12 ....A 819 vimspell.txt +2005-11-14 04:41:01 ....A 233 vp +2010-01-31 23:04:48 ....A 340 x/.xsession +2005-09-24 02:11:27 ....A 1856 x/etc/X11/xinit/Xclients +2005-09-24 02:11:27 ....A 1270 x/etc/X11/xinit/xinitrc +2005-09-24 02:11:27 ....A 2161 x/etc/X11/xinit/xinitrc-common +2005-09-24 02:11:27 ....A 1579 x/etc/X11/xinit/xinitrc.d/xinput.sh +2005-09-02 17:36:13 ....A 81 x/etc/X11/xinit/xinitrc.d/xmbind.sh +2009-05-03 21:07:38 ....A 71 x/etc/X11/xkb/note.txt +2003-08-03 01:46:40 ....A 489 x/setxkb +2003-03-09 14:08:01 ....A 142 x/setxkb2 +2002-11-08 13:28:37 ....A 158 x/x +2006-12-07 11:30:57 ....A 3746 x/xinitrc +2006-12-07 11:28:18 ....A 42 x/xs +2003-02-17 15:11:46 ....A 58 xcopy +2003-02-17 15:10:46 ....A 58 xpaste +------------------- ----- ------------ ------------ ------------------------ +2016-12-18 22:30:42 18911 6715 35 files, 7 folders diff --git a/tests/src/vfs/extfs/helpers-list/data/u7z.simple.output b/tests/src/vfs/extfs/helpers-list/data/u7z.simple.output new file mode 100644 index 0000000..009d8fd --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/u7z.simple.output @@ -0,0 +1,42 @@ +-rw-r--r-- 1 <<uid>> <<gid>> 143 2002-08-01 23:21:47 alert +-rw-r--r-- 1 <<uid>> <<gid>> 363 2004-05-19 20:42:38 atime +-rw-r--r-- 1 <<uid>> <<gid>> 71 2005-11-09 01:36:31 fv +-rw-r--r-- 1 <<uid>> <<gid>> 59 2003-10-18 20:37:07 fvd +-rw-r--r-- 1 <<uid>> <<gid>> 83 2006-10-22 22:26:05 magdev +-rw-r--r-- 1 <<uid>> <<gid>> 72 2006-10-19 16:56:16 maghelp +-rw-r--r-- 1 <<uid>> <<gid>> 37 2004-03-14 12:25:27 ml +-rw-r--r-- 1 <<uid>> <<gid>> 28 2004-07-06 18:02:03 modernize +-rw-r--r-- 1 <<uid>> <<gid>> 138 2004-04-02 03:05:30 pxml +-rw-r--r-- 1 <<uid>> <<gid>> 725 2004-12-08 20:42:44 s +-rw-r--r-- 1 <<uid>> <<gid>> 803 2002-07-29 11:58:15 ser +-rw-r--r-- 1 <<uid>> <<gid>> 40 2004-08-04 14:29:00 title +-rw-r--r-- 1 <<uid>> <<gid>> 156 2002-08-01 23:21:41 ualert +-rw-r--r-- 1 <<uid>> <<gid>> 17 2004-06-28 16:49:03 ucopy +-rw-r--r-- 1 <<uid>> <<gid>> 18 2004-06-28 16:49:10 upaste +-rw-r--r-- 1 <<uid>> <<gid>> 2146 2003-08-25 19:08:11 utf8_to_cp1255.perl +-rw-r--r-- 1 <<uid>> <<gid>> 63 2006-05-16 21:00:06 utf8_to_cp1255.sh +-rw-r--r-- 1 <<uid>> <<gid>> 846 2003-08-11 17:40:25 vimspell.sh +-rw-r--r-- 1 <<uid>> <<gid>> 819 2002-03-28 01:20:12 vimspell.txt +-rw-r--r-- 1 <<uid>> <<gid>> 233 2005-11-14 04:41:01 vp +-rw-r--r-- 1 <<uid>> <<gid>> 0 2016-12-18 22:30:42 with spaces.txt +drwxr-xr-x 1 <<uid>> <<gid>> 0 2016-10-26 08:35:48 x +-rw-r--r-- 1 <<uid>> <<gid>> 340 2010-01-31 23:04:48 x/.xsession +drwxr-xr-x 1 <<uid>> <<gid>> 0 2009-05-03 21:01:33 x/etc +drwxr-xr-x 1 <<uid>> <<gid>> 0 2009-05-03 21:02:13 x/etc/X11 +drwxr-xr-x 1 <<uid>> <<gid>> 0 2006-05-02 10:12:38 x/etc/X11/xinit +-rw-r--r-- 1 <<uid>> <<gid>> 1856 2005-09-24 02:11:27 x/etc/X11/xinit/Xclients +drwxr-xr-x 1 <<uid>> <<gid>> 0 2005-09-24 02:11:27 x/etc/X11/xinit/Xclients.d +-rw-r--r-- 1 <<uid>> <<gid>> 1270 2005-09-24 02:11:27 x/etc/X11/xinit/xinitrc +-rw-r--r-- 1 <<uid>> <<gid>> 2161 2005-09-24 02:11:27 x/etc/X11/xinit/xinitrc-common +drwxr-xr-x 1 <<uid>> <<gid>> 0 2005-12-04 19:15:47 x/etc/X11/xinit/xinitrc.d +-rw-r--r-- 1 <<uid>> <<gid>> 1579 2005-09-24 02:11:27 x/etc/X11/xinit/xinitrc.d/xinput.sh +-rw-r--r-- 1 <<uid>> <<gid>> 81 2005-09-02 17:36:13 x/etc/X11/xinit/xinitrc.d/xmbind.sh +drwxr-xr-x 1 <<uid>> <<gid>> 0 2009-05-03 21:07:38 x/etc/X11/xkb +-rw-r--r-- 1 <<uid>> <<gid>> 71 2009-05-03 21:07:38 x/etc/X11/xkb/note.txt +-rw-r--r-- 1 <<uid>> <<gid>> 489 2003-08-03 01:46:40 x/setxkb +-rw-r--r-- 1 <<uid>> <<gid>> 142 2003-03-09 14:08:01 x/setxkb2 +-rw-r--r-- 1 <<uid>> <<gid>> 158 2002-11-08 13:28:37 x/x +-rw-r--r-- 1 <<uid>> <<gid>> 3746 2006-12-07 11:30:57 x/xinitrc +-rw-r--r-- 1 <<uid>> <<gid>> 42 2006-12-07 11:28:18 x/xs +-rw-r--r-- 1 <<uid>> <<gid>> 58 2003-02-17 15:11:46 xcopy +-rw-r--r-- 1 <<uid>> <<gid>> 58 2003-02-17 15:10:46 xpaste diff --git a/tests/src/vfs/extfs/helpers-list/data/uace.README b/tests/src/vfs/extfs/helpers-list/data/uace.README new file mode 100644 index 0000000..1f53df0 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/uace.README @@ -0,0 +1,15 @@ + +The input file was created by doing "unace l test.ace" on an archive +created with WinAce (run under Wine; there's no native Linux ACE packer). +One date was then changed by hand to "17.04.94" to test the 1900/2000 +boundary. + +Known issues with our uace: + +- It doesn't support filenames with spaces. (For the benefit of those + wishing to fix this, the input file intentionally contains such files.) + +- It reports '0' gid. + +- See note in the source about using Debian's 'unace-nonfree' package, + not 'unace'. diff --git a/tests/src/vfs/extfs/helpers-list/data/uace.input b/tests/src/vfs/extfs/helpers-list/data/uace.input new file mode 100644 index 0000000..af722db --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/uace.input @@ -0,0 +1,148 @@ + +UNACE v2.5 Copyright by ACE Compression Software May 7 2015 03:22:29 + +processing archive /..ive_c/Program Files/test.ace +created on 11.12.2016 with ver 2.0 by +*UNREGISTERED VERSION* +Contents of archive test.ace + + Date Time Packed Size Ratio File + +08.11.07 02:06 168 256 65% WinAce/find.add +08.11.07 02:06 1796 5655 31% WinAce/winace.cnt +08.11.07 02:06 580 1943 29% WinAce/winace_enu.cnt +17.04.94 02:06 13968 31232 44% WinAce/arcext.de +08.11.07 02:06 4484 26624 16% WinAce/sxuninst.de +08.11.07 02:06 528 883 59% WinAce/file_id.diz +08.11.07 02:06 463204 1446400 32% WinAce/acetools.dll +08.11.07 02:06 137536 235008 58% WinAce/acev2.dll +08.11.07 02:06 59604 166912 35% WinAce/arcext.dll +08.11.07 02:06 8852 61440 14% WinAce/arcicons.dll +08.11.07 02:06 31868 65536 48% WinAce/cabinet.dll +08.11.07 02:06 327564 335360 97% WinAce/find.dll +08.11.07 02:06 53588 119808 44% WinAce/sfxlib.dll +23.10.07 01:06 74148 160256 46% WinAce/unrar3.dll +08.11.07 02:06 3080 16384 18% WinAce/zficons.dll +08.11.07 02:06 748 1938 38% WinAce/license.doc +08.11.07 02:06 3208 11895 27% WinAce/technote.doc +08.11.07 02:06 75240 439296 17% WinAce/acetools.enu +08.11.07 02:06 6800 48128 14% WinAce/find.enu +08.11.07 02:06 39852 104960 38% WinAce/order.enu +08.11.07 02:06 1068 29696 3% WinAce/wb_setup.enu +08.11.07 02:06 82952 594432 14% WinAce/winace.enu +08.11.07 02:06 30148 36864 81% WinAce/ccrypt.exe +08.11.07 02:06 35072 93696 37% WinAce/helpinst.exe +11.12.16 22:17 74828 88092 84% Internet Explorer/iexplore.exe +08.11.07 02:06 242496 252928 95% WinAce/order.exe +08.11.07 02:06 24744 165376 15% WinAce/sxuninst.exe +08.11.07 02:06 146988 401408 36% WinAce/wb_setup.exe +08.11.07 02:06 1169036 1207296 96% WinAce/winace.exe +08.11.07 02:06 504140 839956 60% WinAce/winace.hlp +08.11.07 02:06 98852 137589 71% WinAce/winace_enu.hlp +08.11.07 02:06 4896 20278 24% WinAce/menuimg.imf +08.11.07 02:06 6232 20278 30% WinAce/menu256.imf +08.11.07 02:06 12652 77878 16% WinAce/tool256.imf +08.11.07 02:06 10144 77878 13% WinAce/toolimg.imf +08.11.07 02:06 6460 80464 8% WinAce/menuimg.img +08.11.07 02:06 15012 321254 4% WinAce/toolimg.img +08.11.07 02:06 208 356 58% WinAce/outbar.ini +08.11.07 02:06 320 1304 24% WinAce/products.ini +08.11.07 02:06 256 409 62% WinAce/sfxopt.ini +08.11.07 02:06 912 4215 21% WinAce/sxuninst.ini +08.11.07 02:06 124 155 80% WinAce/toolimg.ini +08.11.07 02:06 476 854 55% WinAce/volume.ini +08.11.07 02:06 156 235 66% WinAce/order.ord +08.11.07 02:06 298 298 100% WinAce/html/images/abort.png +08.11.07 02:06 128 211 60% WinAce/html/images/added.png +08.11.07 02:06 156 230 67% WinAce/html/images/back.png +08.11.07 02:06 104 184 56% WinAce/html/images/backimg.png +08.11.07 02:06 8184 8573 95% WinAce/html/images/banner_bg.png +08.11.07 02:06 724 1488 48% WinAce/html/images/bar.png +08.11.07 02:06 1148 1846 62% WinAce/html/images/bar1.png +08.11.07 02:06 100 191 52% WinAce/html/images/bg2.png +08.11.07 02:06 224 1001 22% WinAce/html/images/bug.png +08.11.07 02:06 124 223 55% WinAce/html/images/check.png +08.11.07 02:06 22632 23049 98% WinAce/html/images/compare.png +08.11.07 02:06 220 278 79% WinAce/html/images/contact.png +08.11.07 02:06 32 278 11% WinAce/html/images/email.png +08.11.07 02:06 336 385 87% WinAce/html/images/fillout.png +08.11.07 02:06 636 943 67% WinAce/html/images/fwd.png +08.11.07 02:06 64 176 36% WinAce/html/images/infoback.png +08.11.07 02:06 88 145 60% WinAce/html/images/line.png +08.11.07 02:06 7852 7911 99% WinAce/html/images/logo.png +08.11.07 02:06 5020 5595 89% WinAce/html/images/logotop.png +08.11.07 02:06 1928 2551 75% WinAce/html/images/logoarc.png +08.11.07 02:06 756 1108 68% WinAce/html/images/master.png +08.11.07 02:06 372 1090 34% WinAce/html/images/new.png +08.11.07 02:06 140 235 59% WinAce/html/images/nexttip.png +08.11.07 02:06 64 211 30% WinAce/html/images/plus.png +08.11.07 02:06 416 1015 41% WinAce/html/images/preview.png +08.11.07 02:06 164 960 17% WinAce/html/images/redo.png +08.11.07 02:06 124 201 61% WinAce/html/images/side.png +08.11.07 02:06 316 382 82% WinAce/html/images/sysinfo.png +08.11.07 02:06 448 482 92% WinAce/html/images/tip.png +08.11.07 02:06 276 345 80% WinAce/html/images/tip1.png +08.11.07 02:06 520 1264 41% WinAce/html/images/top.png +08.11.07 02:06 300 993 30% WinAce/html/images/top_r.png +08.11.07 02:06 112 992 11% WinAce/html/images/top_l.png +08.11.07 02:06 212 1012 20% WinAce/html/images/visa.png +08.11.07 02:06 76 132 57% WinAce/html/images/vline.png +08.11.07 02:06 188 263 71% WinAce/html/images/w.png +08.11.07 02:06 424 1186 35% WinAce/html/images/waceico.png +08.11.07 02:06 4236 4824 87% WinAce/html/images/winacelogo.png +08.11.07 02:06 332 406 81% WinAce/html/images/winace.png +08.11.07 02:06 61840 64933 95% WinAce/sfxfiles/dos32.sfx +08.11.07 02:06 40800 79937 51% WinAce/sfxfiles/os2cl.sfx +08.11.07 02:06 57588 68877 83% WinAce/sfxfiles/wgui_hu.sfx +08.11.07 02:06 7540 68834 11% WinAce/sfxfiles/wgui_plk.sfx +08.11.07 02:06 6660 68824 9% WinAce/sfxfiles/wgui_cz.sfx +08.11.07 02:06 6748 68781 9% WinAce/sfxfiles/wgui_fr.sfx +08.11.07 02:06 6964 68692 10% WinAce/sfxfiles/wgui_nld.sfx +08.11.07 02:06 3636 68621 5% WinAce/sfxfiles/wgui_it.sfx +08.11.07 02:06 6824 68478 10% WinAce/sfxfiles/wgui_de.sfx +08.11.07 02:06 6052 68215 8% WinAce/sfxfiles/wgui_en.sfx +08.11.07 02:06 35912 46936 76% WinAce/sfxfiles/win32cl.sfx +08.11.07 02:06 1020 2249 45% WinAce/html/english/infotip.txt +08.11.07 02:06 984 2234 44% WinAce/html/deutsch/infotip.txt +08.11.07 02:06 476 960 49% WinAce/infodeu.txt +08.11.07 02:06 32 256 12% WinAce/language.txt +08.11.07 02:06 920 3138 29% WinAce/register.txt +08.11.07 02:06 424 1117 38% WinAce/regsites.txt +08.11.07 02:06 344 960 35% WinAce/techinfo.txt +08.11.07 02:06 44 47 93% WinAce/winace.url +08.11.07 02:06 1260 3538 35% WinAce/html/english/av.whf +08.11.07 02:06 40 3538 1% WinAce/html/deutsch/av.whf +08.11.07 02:06 1564 13100 11% WinAce/html/deutsch/commands.whf +08.11.07 02:06 1100 10299 10% WinAce/html/english/commands.whf +08.11.07 02:06 200 1157 17% WinAce/html/deutsch/compare.whf +08.11.07 02:06 48 1155 4% WinAce/html/english/compare.whf +08.11.07 02:06 13200 85468 15% WinAce/html/deutsch/history.whf +08.11.07 02:06 10804 69151 15% WinAce/html/english/history.whf +08.11.07 02:06 1532 10208 15% WinAce/html/deutsch/info.whf +08.11.07 02:06 1128 7971 14% WinAce/html/english/info.whf +08.11.07 02:06 584 3193 18% WinAce/html/deutsch/infotip.whf +08.11.07 02:06 272 2518 10% WinAce/html/english/infotip.whf +08.11.07 02:06 336 2271 14% WinAce/html/deutsch/menu.whf +08.11.07 02:06 116 2239 5% WinAce/html/english/menu.whf +08.11.07 02:06 140 1256 11% WinAce/html/english/menuex.whf +08.11.07 02:06 100 1245 8% WinAce/html/deutsch/menuex.whf +08.11.07 02:06 264 1945 13% WinAce/html/english/nav.whf +08.11.07 02:06 88 1930 4% WinAce/html/deutsch/nav.whf +08.11.07 02:06 1792 12471 14% WinAce/html/deutsch/order.whf +08.11.07 02:06 1480 12426 11% WinAce/html/english/order.whf +08.11.07 02:06 460 2158 21% WinAce/html/deutsch/share.whf +08.11.07 02:06 332 1745 19% WinAce/html/english/share.whf +08.11.07 02:06 376 1547 24% WinAce/html/english/system.whf +08.11.07 02:06 220 1462 15% WinAce/html/deutsch/system.whf +08.11.07 02:06 300 2282 13% WinAce/html/english/top.whf +08.11.07 02:06 68 2256 3% WinAce/html/deutsch/top.whf +08.11.07 02:06 176 602 29% WinAce/html/deutsch/usage.whf +08.11.07 02:06 44 601 7% WinAce/html/english/usage.whf +08.11.07 02:06 220 889 24% WinAce/html/english/welcome.whf +08.11.07 02:06 40 881 4% WinAce/html/deutsch/welcome.whf +08.11.07 02:06 228 374 61% WinAce/projects/backup fast.wpf +08.11.07 02:06 68 354 19% WinAce/projects/backup maximum.wpf +08.11.07 02:06 68 126 54% WinAce/projects/multivolume.wpf +08.11.07 02:06 52 94 55% WinAce/projects/zip compression.wpf + +listed: 136 files, totaling 8.613K bytes (compressed 4.021K) diff --git a/tests/src/vfs/extfs/helpers-list/data/uace.output b/tests/src/vfs/extfs/helpers-list/data/uace.output new file mode 100644 index 0000000..a2cedea --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/uace.output @@ -0,0 +1,136 @@ +-rw-r--r-- 1 <<uid>> 0 256 2007-11-08 02:06:00 WinAce/find.add +-rw-r--r-- 1 <<uid>> 0 5655 2007-11-08 02:06:00 WinAce/winace.cnt +-rw-r--r-- 1 <<uid>> 0 1943 2007-11-08 02:06:00 WinAce/winace_enu.cnt +-rw-r--r-- 1 <<uid>> 0 31232 1994-04-17 02:06:00 WinAce/arcext.de +-rw-r--r-- 1 <<uid>> 0 26624 2007-11-08 02:06:00 WinAce/sxuninst.de +-rw-r--r-- 1 <<uid>> 0 883 2007-11-08 02:06:00 WinAce/file_id.diz +-rw-r--r-- 1 <<uid>> 0 1446400 2007-11-08 02:06:00 WinAce/acetools.dll +-rw-r--r-- 1 <<uid>> 0 235008 2007-11-08 02:06:00 WinAce/acev2.dll +-rw-r--r-- 1 <<uid>> 0 166912 2007-11-08 02:06:00 WinAce/arcext.dll +-rw-r--r-- 1 <<uid>> 0 61440 2007-11-08 02:06:00 WinAce/arcicons.dll +-rw-r--r-- 1 <<uid>> 0 65536 2007-11-08 02:06:00 WinAce/cabinet.dll +-rw-r--r-- 1 <<uid>> 0 335360 2007-11-08 02:06:00 WinAce/find.dll +-rw-r--r-- 1 <<uid>> 0 119808 2007-11-08 02:06:00 WinAce/sfxlib.dll +-rw-r--r-- 1 <<uid>> 0 160256 2007-10-23 01:06:00 WinAce/unrar3.dll +-rw-r--r-- 1 <<uid>> 0 16384 2007-11-08 02:06:00 WinAce/zficons.dll +-rw-r--r-- 1 <<uid>> 0 1938 2007-11-08 02:06:00 WinAce/license.doc +-rw-r--r-- 1 <<uid>> 0 11895 2007-11-08 02:06:00 WinAce/technote.doc +-rw-r--r-- 1 <<uid>> 0 439296 2007-11-08 02:06:00 WinAce/acetools.enu +-rw-r--r-- 1 <<uid>> 0 48128 2007-11-08 02:06:00 WinAce/find.enu +-rw-r--r-- 1 <<uid>> 0 104960 2007-11-08 02:06:00 WinAce/order.enu +-rw-r--r-- 1 <<uid>> 0 29696 2007-11-08 02:06:00 WinAce/wb_setup.enu +-rw-r--r-- 1 <<uid>> 0 594432 2007-11-08 02:06:00 WinAce/winace.enu +-rw-r--r-- 1 <<uid>> 0 36864 2007-11-08 02:06:00 WinAce/ccrypt.exe +-rw-r--r-- 1 <<uid>> 0 93696 2007-11-08 02:06:00 WinAce/helpinst.exe +-rw-r--r-- 1 <<uid>> 0 88092 2016-12-11 22:17:00 Internet +-rw-r--r-- 1 <<uid>> 0 252928 2007-11-08 02:06:00 WinAce/order.exe +-rw-r--r-- 1 <<uid>> 0 165376 2007-11-08 02:06:00 WinAce/sxuninst.exe +-rw-r--r-- 1 <<uid>> 0 401408 2007-11-08 02:06:00 WinAce/wb_setup.exe +-rw-r--r-- 1 <<uid>> 0 1207296 2007-11-08 02:06:00 WinAce/winace.exe +-rw-r--r-- 1 <<uid>> 0 839956 2007-11-08 02:06:00 WinAce/winace.hlp +-rw-r--r-- 1 <<uid>> 0 137589 2007-11-08 02:06:00 WinAce/winace_enu.hlp +-rw-r--r-- 1 <<uid>> 0 20278 2007-11-08 02:06:00 WinAce/menuimg.imf +-rw-r--r-- 1 <<uid>> 0 20278 2007-11-08 02:06:00 WinAce/menu256.imf +-rw-r--r-- 1 <<uid>> 0 77878 2007-11-08 02:06:00 WinAce/tool256.imf +-rw-r--r-- 1 <<uid>> 0 77878 2007-11-08 02:06:00 WinAce/toolimg.imf +-rw-r--r-- 1 <<uid>> 0 80464 2007-11-08 02:06:00 WinAce/menuimg.img +-rw-r--r-- 1 <<uid>> 0 321254 2007-11-08 02:06:00 WinAce/toolimg.img +-rw-r--r-- 1 <<uid>> 0 356 2007-11-08 02:06:00 WinAce/outbar.ini +-rw-r--r-- 1 <<uid>> 0 1304 2007-11-08 02:06:00 WinAce/products.ini +-rw-r--r-- 1 <<uid>> 0 409 2007-11-08 02:06:00 WinAce/sfxopt.ini +-rw-r--r-- 1 <<uid>> 0 4215 2007-11-08 02:06:00 WinAce/sxuninst.ini +-rw-r--r-- 1 <<uid>> 0 155 2007-11-08 02:06:00 WinAce/toolimg.ini +-rw-r--r-- 1 <<uid>> 0 854 2007-11-08 02:06:00 WinAce/volume.ini +-rw-r--r-- 1 <<uid>> 0 235 2007-11-08 02:06:00 WinAce/order.ord +-rw-r--r-- 1 <<uid>> 0 298 2007-11-08 02:06:00 WinAce/html/images/abort.png +-rw-r--r-- 1 <<uid>> 0 211 2007-11-08 02:06:00 WinAce/html/images/added.png +-rw-r--r-- 1 <<uid>> 0 230 2007-11-08 02:06:00 WinAce/html/images/back.png +-rw-r--r-- 1 <<uid>> 0 184 2007-11-08 02:06:00 WinAce/html/images/backimg.png +-rw-r--r-- 1 <<uid>> 0 8573 2007-11-08 02:06:00 WinAce/html/images/banner_bg.png +-rw-r--r-- 1 <<uid>> 0 1488 2007-11-08 02:06:00 WinAce/html/images/bar.png +-rw-r--r-- 1 <<uid>> 0 1846 2007-11-08 02:06:00 WinAce/html/images/bar1.png +-rw-r--r-- 1 <<uid>> 0 191 2007-11-08 02:06:00 WinAce/html/images/bg2.png +-rw-r--r-- 1 <<uid>> 0 1001 2007-11-08 02:06:00 WinAce/html/images/bug.png +-rw-r--r-- 1 <<uid>> 0 223 2007-11-08 02:06:00 WinAce/html/images/check.png +-rw-r--r-- 1 <<uid>> 0 23049 2007-11-08 02:06:00 WinAce/html/images/compare.png +-rw-r--r-- 1 <<uid>> 0 278 2007-11-08 02:06:00 WinAce/html/images/contact.png +-rw-r--r-- 1 <<uid>> 0 278 2007-11-08 02:06:00 WinAce/html/images/email.png +-rw-r--r-- 1 <<uid>> 0 385 2007-11-08 02:06:00 WinAce/html/images/fillout.png +-rw-r--r-- 1 <<uid>> 0 943 2007-11-08 02:06:00 WinAce/html/images/fwd.png +-rw-r--r-- 1 <<uid>> 0 176 2007-11-08 02:06:00 WinAce/html/images/infoback.png +-rw-r--r-- 1 <<uid>> 0 145 2007-11-08 02:06:00 WinAce/html/images/line.png +-rw-r--r-- 1 <<uid>> 0 7911 2007-11-08 02:06:00 WinAce/html/images/logo.png +-rw-r--r-- 1 <<uid>> 0 5595 2007-11-08 02:06:00 WinAce/html/images/logotop.png +-rw-r--r-- 1 <<uid>> 0 2551 2007-11-08 02:06:00 WinAce/html/images/logoarc.png +-rw-r--r-- 1 <<uid>> 0 1108 2007-11-08 02:06:00 WinAce/html/images/master.png +-rw-r--r-- 1 <<uid>> 0 1090 2007-11-08 02:06:00 WinAce/html/images/new.png +-rw-r--r-- 1 <<uid>> 0 235 2007-11-08 02:06:00 WinAce/html/images/nexttip.png +-rw-r--r-- 1 <<uid>> 0 211 2007-11-08 02:06:00 WinAce/html/images/plus.png +-rw-r--r-- 1 <<uid>> 0 1015 2007-11-08 02:06:00 WinAce/html/images/preview.png +-rw-r--r-- 1 <<uid>> 0 960 2007-11-08 02:06:00 WinAce/html/images/redo.png +-rw-r--r-- 1 <<uid>> 0 201 2007-11-08 02:06:00 WinAce/html/images/side.png +-rw-r--r-- 1 <<uid>> 0 382 2007-11-08 02:06:00 WinAce/html/images/sysinfo.png +-rw-r--r-- 1 <<uid>> 0 482 2007-11-08 02:06:00 WinAce/html/images/tip.png +-rw-r--r-- 1 <<uid>> 0 345 2007-11-08 02:06:00 WinAce/html/images/tip1.png +-rw-r--r-- 1 <<uid>> 0 1264 2007-11-08 02:06:00 WinAce/html/images/top.png +-rw-r--r-- 1 <<uid>> 0 993 2007-11-08 02:06:00 WinAce/html/images/top_r.png +-rw-r--r-- 1 <<uid>> 0 992 2007-11-08 02:06:00 WinAce/html/images/top_l.png +-rw-r--r-- 1 <<uid>> 0 1012 2007-11-08 02:06:00 WinAce/html/images/visa.png +-rw-r--r-- 1 <<uid>> 0 132 2007-11-08 02:06:00 WinAce/html/images/vline.png +-rw-r--r-- 1 <<uid>> 0 263 2007-11-08 02:06:00 WinAce/html/images/w.png +-rw-r--r-- 1 <<uid>> 0 1186 2007-11-08 02:06:00 WinAce/html/images/waceico.png +-rw-r--r-- 1 <<uid>> 0 4824 2007-11-08 02:06:00 WinAce/html/images/winacelogo.png +-rw-r--r-- 1 <<uid>> 0 406 2007-11-08 02:06:00 WinAce/html/images/winace.png +-rw-r--r-- 1 <<uid>> 0 64933 2007-11-08 02:06:00 WinAce/sfxfiles/dos32.sfx +-rw-r--r-- 1 <<uid>> 0 79937 2007-11-08 02:06:00 WinAce/sfxfiles/os2cl.sfx +-rw-r--r-- 1 <<uid>> 0 68877 2007-11-08 02:06:00 WinAce/sfxfiles/wgui_hu.sfx +-rw-r--r-- 1 <<uid>> 0 68834 2007-11-08 02:06:00 WinAce/sfxfiles/wgui_plk.sfx +-rw-r--r-- 1 <<uid>> 0 68824 2007-11-08 02:06:00 WinAce/sfxfiles/wgui_cz.sfx +-rw-r--r-- 1 <<uid>> 0 68781 2007-11-08 02:06:00 WinAce/sfxfiles/wgui_fr.sfx +-rw-r--r-- 1 <<uid>> 0 68692 2007-11-08 02:06:00 WinAce/sfxfiles/wgui_nld.sfx +-rw-r--r-- 1 <<uid>> 0 68621 2007-11-08 02:06:00 WinAce/sfxfiles/wgui_it.sfx +-rw-r--r-- 1 <<uid>> 0 68478 2007-11-08 02:06:00 WinAce/sfxfiles/wgui_de.sfx +-rw-r--r-- 1 <<uid>> 0 68215 2007-11-08 02:06:00 WinAce/sfxfiles/wgui_en.sfx +-rw-r--r-- 1 <<uid>> 0 46936 2007-11-08 02:06:00 WinAce/sfxfiles/win32cl.sfx +-rw-r--r-- 1 <<uid>> 0 2249 2007-11-08 02:06:00 WinAce/html/english/infotip.txt +-rw-r--r-- 1 <<uid>> 0 2234 2007-11-08 02:06:00 WinAce/html/deutsch/infotip.txt +-rw-r--r-- 1 <<uid>> 0 960 2007-11-08 02:06:00 WinAce/infodeu.txt +-rw-r--r-- 1 <<uid>> 0 256 2007-11-08 02:06:00 WinAce/language.txt +-rw-r--r-- 1 <<uid>> 0 3138 2007-11-08 02:06:00 WinAce/register.txt +-rw-r--r-- 1 <<uid>> 0 1117 2007-11-08 02:06:00 WinAce/regsites.txt +-rw-r--r-- 1 <<uid>> 0 960 2007-11-08 02:06:00 WinAce/techinfo.txt +-rw-r--r-- 1 <<uid>> 0 47 2007-11-08 02:06:00 WinAce/winace.url +-rw-r--r-- 1 <<uid>> 0 3538 2007-11-08 02:06:00 WinAce/html/english/av.whf +-rw-r--r-- 1 <<uid>> 0 3538 2007-11-08 02:06:00 WinAce/html/deutsch/av.whf +-rw-r--r-- 1 <<uid>> 0 13100 2007-11-08 02:06:00 WinAce/html/deutsch/commands.whf +-rw-r--r-- 1 <<uid>> 0 10299 2007-11-08 02:06:00 WinAce/html/english/commands.whf +-rw-r--r-- 1 <<uid>> 0 1157 2007-11-08 02:06:00 WinAce/html/deutsch/compare.whf +-rw-r--r-- 1 <<uid>> 0 1155 2007-11-08 02:06:00 WinAce/html/english/compare.whf +-rw-r--r-- 1 <<uid>> 0 85468 2007-11-08 02:06:00 WinAce/html/deutsch/history.whf +-rw-r--r-- 1 <<uid>> 0 69151 2007-11-08 02:06:00 WinAce/html/english/history.whf +-rw-r--r-- 1 <<uid>> 0 10208 2007-11-08 02:06:00 WinAce/html/deutsch/info.whf +-rw-r--r-- 1 <<uid>> 0 7971 2007-11-08 02:06:00 WinAce/html/english/info.whf +-rw-r--r-- 1 <<uid>> 0 3193 2007-11-08 02:06:00 WinAce/html/deutsch/infotip.whf +-rw-r--r-- 1 <<uid>> 0 2518 2007-11-08 02:06:00 WinAce/html/english/infotip.whf +-rw-r--r-- 1 <<uid>> 0 2271 2007-11-08 02:06:00 WinAce/html/deutsch/menu.whf +-rw-r--r-- 1 <<uid>> 0 2239 2007-11-08 02:06:00 WinAce/html/english/menu.whf +-rw-r--r-- 1 <<uid>> 0 1256 2007-11-08 02:06:00 WinAce/html/english/menuex.whf +-rw-r--r-- 1 <<uid>> 0 1245 2007-11-08 02:06:00 WinAce/html/deutsch/menuex.whf +-rw-r--r-- 1 <<uid>> 0 1945 2007-11-08 02:06:00 WinAce/html/english/nav.whf +-rw-r--r-- 1 <<uid>> 0 1930 2007-11-08 02:06:00 WinAce/html/deutsch/nav.whf +-rw-r--r-- 1 <<uid>> 0 12471 2007-11-08 02:06:00 WinAce/html/deutsch/order.whf +-rw-r--r-- 1 <<uid>> 0 12426 2007-11-08 02:06:00 WinAce/html/english/order.whf +-rw-r--r-- 1 <<uid>> 0 2158 2007-11-08 02:06:00 WinAce/html/deutsch/share.whf +-rw-r--r-- 1 <<uid>> 0 1745 2007-11-08 02:06:00 WinAce/html/english/share.whf +-rw-r--r-- 1 <<uid>> 0 1547 2007-11-08 02:06:00 WinAce/html/english/system.whf +-rw-r--r-- 1 <<uid>> 0 1462 2007-11-08 02:06:00 WinAce/html/deutsch/system.whf +-rw-r--r-- 1 <<uid>> 0 2282 2007-11-08 02:06:00 WinAce/html/english/top.whf +-rw-r--r-- 1 <<uid>> 0 2256 2007-11-08 02:06:00 WinAce/html/deutsch/top.whf +-rw-r--r-- 1 <<uid>> 0 602 2007-11-08 02:06:00 WinAce/html/deutsch/usage.whf +-rw-r--r-- 1 <<uid>> 0 601 2007-11-08 02:06:00 WinAce/html/english/usage.whf +-rw-r--r-- 1 <<uid>> 0 889 2007-11-08 02:06:00 WinAce/html/english/welcome.whf +-rw-r--r-- 1 <<uid>> 0 881 2007-11-08 02:06:00 WinAce/html/deutsch/welcome.whf +-rw-r--r-- 1 <<uid>> 0 374 2007-11-08 02:06:00 WinAce/projects/backup +-rw-r--r-- 1 <<uid>> 0 354 2007-11-08 02:06:00 WinAce/projects/backup +-rw-r--r-- 1 <<uid>> 0 126 2007-11-08 02:06:00 WinAce/projects/multivolume.wpf +-rw-r--r-- 1 <<uid>> 0 94 2007-11-08 02:06:00 WinAce/projects/zip diff --git a/tests/src/vfs/extfs/helpers-list/data/uarc.README b/tests/src/vfs/extfs/helpers-list/data/uarc.README new file mode 100644 index 0000000..8a463a3 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/uarc.README @@ -0,0 +1,19 @@ + +The input file was created by doing "arc v test.arc" on archive created +with "arc a test.arc ...". We then made sure to have: + +- One date prior to year 2000 (to test the 1900/2000 boundary). +- Both AM and PM times. + +Our 'uarc' doesn't support spaces in filenames but that's no biggie: + + Man page: "Full compatibility with PC ARC files is maintained, the + price for which is that arc doesn't like long filenames, and can only + archive files with names of up to 12 characters. [...] I suggest you + put long-winded filenames in a 'shar' before arcing them." + + Wikipedia: "ARC is incapable of compressing entire directory trees" + +Known issues with our uarc: + +- It reports '0' gid. diff --git a/tests/src/vfs/extfs/helpers-list/data/uarc.input b/tests/src/vfs/extfs/helpers-list/data/uarc.input new file mode 100644 index 0000000..eeb2161 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/uarc.input @@ -0,0 +1,7 @@ +Name Length Stowage SF Size now Date Time CRC +============ ======== ======== ==== ======== ========= ====== ==== +README.html 9799 Crunched 50% 4922 23 Nov 16 11:48a 40ba +extfs.c 49679 Crunched 67% 16874 18 Apr 94 3:05p 38ff +run.log 1051 Crunched 50% 536 23 Nov 16 10:36a 6184 + ==== ======== ==== ======== +Total 3 60529 64% 22332 diff --git a/tests/src/vfs/extfs/helpers-list/data/uarc.output b/tests/src/vfs/extfs/helpers-list/data/uarc.output new file mode 100644 index 0000000..133e4cb --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/uarc.output @@ -0,0 +1,3 @@ +-rw-r--r-- 1 <<uid>> 0 9799 2016-11-23 11:48:00 README.html +-rw-r--r-- 1 <<uid>> 0 49679 1994-04-18 15:05:00 extfs.c +-rw-r--r-- 1 <<uid>> 0 1051 2016-11-23 10:36:00 run.log diff --git a/tests/src/vfs/extfs/helpers-list/data/urar.README b/tests/src/vfs/extfs/helpers-list/data/urar.README new file mode 100644 index 0000000..8ff5b1d --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/urar.README @@ -0,0 +1,17 @@ + +The archive was created thus: + + echo hello > 'filename with spaces.txt' + rar a archive.rar 'filename with spaces.txt' ... + +Our 'urar' supports two listing formats: that of versions 6 and 5, and that of +versions 4 and 3. + +'urar.v6,v5.input' was created with "unrar vt -c- -cfg- archive.rar" using +unrar 5.30. + +'urar.v4,v3.input' was created with "unrar v -c- -cfg- archive.rar" using +unrar 3.80 for DOS (google "unrar dos"), via DOSBox (and then the "\" was +changed to "/" by hand). An inspection of our urar's source code should +lead us to conclude that this format is compatible with that of version +4. diff --git a/tests/src/vfs/extfs/helpers-list/data/urar.v4,v3.env_vars b/tests/src/vfs/extfs/helpers-list/data/urar.v4,v3.env_vars new file mode 100644 index 0000000..475a847 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/urar.v4,v3.env_vars @@ -0,0 +1 @@ +MC_TEST_EXTFS_UNRAR_VERSION=4 diff --git a/tests/src/vfs/extfs/helpers-list/data/urar.v4,v3.input b/tests/src/vfs/extfs/helpers-list/data/urar.v4,v3.input new file mode 100644 index 0000000..ac525bd --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/urar.v4,v3.input @@ -0,0 +1,29 @@ + +UNRAR 3.80 freeware Copyright (c) 1993-2008 Alexander Roshal + +Archive ARCHIVE.RAR + +Pathname/Comment + Size Packed Ratio Date Time Attr CRC Meth Ver +------------------------------------------------------------------------------- + .viminfo + 11032 2468 22% 23-11-16 07:10 -rw------- 295ED9AB m3g 2.9 + .wget-hsts + 205 181 88% 26-10-16 13:14 -rw-rw-r-- 58429CA4 m3g 2.9 + .xboardrc + 7527 2964 39% 17-04-16 01:21 -rw-rw-r-- 1DA6AD04 m3g 2.9 + .xchm + 559 382 68% 29-09-16 01:08 -rw-rw-r-- 73DBF2B9 m3g 2.9 + .xinputrc + 130 123 94% 27-12-15 17:08 -rw-rw-r-- 70CD8EF3 m3g 2.9 + .dosbox/dosbox-0.74.conf + 10730 4005 37% 07-06-16 20:43 -rw-rw-r-- 1D5A9AA6 m3g 2.9 + log.txt + 5869937 42114 0% 23-11-16 07:43 -rw-rw-r-- E63DE4A6 m3g 2.9 + filename with spaces.txt + 6 16 266% 23-11-16 07:39 -rw-r--r-- 363A3020 m3g 2.9 + .dosbox + 0 0 0% 07-06-16 20:43 drwx------ 00000000 m0 2.0 +------------------------------------------------------------------------------- + 9 5900126 52253 0% + diff --git a/tests/src/vfs/extfs/helpers-list/data/urar.v4,v3.output b/tests/src/vfs/extfs/helpers-list/data/urar.v4,v3.output new file mode 100644 index 0000000..9568598 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/urar.v4,v3.output @@ -0,0 +1,9 @@ +drwx------ 1 <<uid>> <<gid>> 0 2016-06-07 20:43:00 ./.dosbox +-rw-rw-r-- 1 <<uid>> <<gid>> 10730 2016-06-07 20:43:00 ./.dosbox/dosbox-0.74.conf +-rw------- 1 <<uid>> <<gid>> 11032 2016-11-23 07:10:00 ./.viminfo +-rw-rw-r-- 1 <<uid>> <<gid>> 205 2016-10-26 13:14:00 ./.wget-hsts +-rw-rw-r-- 1 <<uid>> <<gid>> 7527 2016-04-17 01:21:00 ./.xboardrc +-rw-rw-r-- 1 <<uid>> <<gid>> 559 2016-09-29 01:08:00 ./.xchm +-rw-rw-r-- 1 <<uid>> <<gid>> 130 2015-12-27 17:08:00 ./.xinputrc +-rw-r--r-- 1 <<uid>> <<gid>> 6 2016-11-23 07:39:00 ./filename with spaces.txt +-rw-rw-r-- 1 <<uid>> <<gid>> 5869937 2016-11-23 07:43:00 ./log.txt diff --git a/tests/src/vfs/extfs/helpers-list/data/urar.v6,v5.env_vars b/tests/src/vfs/extfs/helpers-list/data/urar.v6,v5.env_vars new file mode 100644 index 0000000..abdefcc --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/urar.v6,v5.env_vars @@ -0,0 +1 @@ +MC_TEST_EXTFS_UNRAR_VERSION=5 diff --git a/tests/src/vfs/extfs/helpers-list/data/urar.v6,v5.input b/tests/src/vfs/extfs/helpers-list/data/urar.v6,v5.input new file mode 100644 index 0000000..5039076 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/urar.v6,v5.input @@ -0,0 +1,102 @@ + +UNRAR 5.30 beta 2 freeware Copyright (c) 1993-2015 Alexander Roshal + +Archive: archive.rar +Details: RAR 4 + + Name: .viminfo + Type: File + Size: 11032 + Packed size: 2468 + Ratio: 22% + mtime: 2016-11-23 07:10:39,000 + Attributes: -rw------- + CRC32: 295ED9AB + Host OS: Unix + Compression: RAR 3.0(v29) -m3 -md=4M + + Name: .wget-hsts + Type: File + Size: 205 + Packed size: 181 + Ratio: 88% + mtime: 2016-10-26 13:14:09,000 + Attributes: -rw-rw-r-- + CRC32: 58429CA4 + Host OS: Unix + Compression: RAR 3.0(v29) -m3 -md=4M + + Name: .xboardrc + Type: File + Size: 7527 + Packed size: 2964 + Ratio: 39% + mtime: 2016-04-17 01:21:46,000 + Attributes: -rw-rw-r-- + CRC32: 1DA6AD04 + Host OS: Unix + Compression: RAR 3.0(v29) -m3 -md=4M + + Name: .xchm + Type: File + Size: 559 + Packed size: 382 + Ratio: 68% + mtime: 2016-09-29 01:08:46,000 + Attributes: -rw-rw-r-- + CRC32: 73DBF2B9 + Host OS: Unix + Compression: RAR 3.0(v29) -m3 -md=4M + + Name: .xinputrc + Type: File + Size: 130 + Packed size: 123 + Ratio: 94% + mtime: 2015-12-27 17:08:35,000 + Attributes: -rw-rw-r-- + CRC32: 70CD8EF3 + Host OS: Unix + Compression: RAR 3.0(v29) -m3 -md=4M + + Name: .dosbox/dosbox-0.74.conf + Type: File + Size: 10730 + Packed size: 4005 + Ratio: 37% + mtime: 2016-06-07 20:43:58,000 + Attributes: -rw-rw-r-- + CRC32: 1D5A9AA6 + Host OS: Unix + Compression: RAR 3.0(v29) -m3 -md=4M + + Name: log.txt + Type: File + Size: 5869937 + Packed size: 42114 + Ratio: 0% + mtime: 2016-11-23 07:43:18,000 + Attributes: -rw-rw-r-- + CRC32: E63DE4A6 + Host OS: Unix + Compression: RAR 3.0(v29) -m3 -md=4M + + Name: filename with spaces.txt + Type: File + Size: 6 + Packed size: 16 + Ratio: 266% + mtime: 2016-11-23 07:39:15,000 + Attributes: -rw-r--r-- + CRC32: 363A3020 + Host OS: Unix + Compression: RAR 3.0(v29) -m3 -md=4M + + Name: .dosbox + Type: Directory + mtime: 2016-06-07 20:43:58,000 + Attributes: drwx------ + CRC32: 00000000 + Host OS: Unix + Compression: RAR 3.0(v20) -m0 -md=0K + diff --git a/tests/src/vfs/extfs/helpers-list/data/urar.v6,v5.output b/tests/src/vfs/extfs/helpers-list/data/urar.v6,v5.output new file mode 100644 index 0000000..9568598 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/urar.v6,v5.output @@ -0,0 +1,9 @@ +drwx------ 1 <<uid>> <<gid>> 0 2016-06-07 20:43:00 ./.dosbox +-rw-rw-r-- 1 <<uid>> <<gid>> 10730 2016-06-07 20:43:00 ./.dosbox/dosbox-0.74.conf +-rw------- 1 <<uid>> <<gid>> 11032 2016-11-23 07:10:00 ./.viminfo +-rw-rw-r-- 1 <<uid>> <<gid>> 205 2016-10-26 13:14:00 ./.wget-hsts +-rw-rw-r-- 1 <<uid>> <<gid>> 7527 2016-04-17 01:21:00 ./.xboardrc +-rw-rw-r-- 1 <<uid>> <<gid>> 559 2016-09-29 01:08:00 ./.xchm +-rw-rw-r-- 1 <<uid>> <<gid>> 130 2015-12-27 17:08:00 ./.xinputrc +-rw-r--r-- 1 <<uid>> <<gid>> 6 2016-11-23 07:39:00 ./filename with spaces.txt +-rw-rw-r-- 1 <<uid>> <<gid>> 5869937 2016-11-23 07:43:00 ./log.txt diff --git a/tests/src/vfs/extfs/helpers-list/data/uzip.README b/tests/src/vfs/extfs/helpers-list/data/uzip.README new file mode 100644 index 0000000..01a7c1c --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/uzip.README @@ -0,0 +1,16 @@ + +The input files were created thus: + + cd ~/.gimp-2.8 + echo hello > 'filename with spaces.txt' + echo hello > ' filename with leading space.txt' + echo hello > '-filename with leading dash.txt' + zip a.zip * + unzip -Z -l -T a.zip > uzip.with-zipinfo.input + unzip -qq -v a.zip > uzip.without-zipinfo--ymd.input + rm a.zip + +uzip supports two date formats for "without-zipinfo" mode: ymd +(YYYY-MM-DD) and mdy (MM-DD-YY). To create the +'uzip.without-zipinfo--mdy.input' file, with MM-DD-YY dates, I simply +altered two dates with an editor (one with year before 70, one after). diff --git a/tests/src/vfs/extfs/helpers-list/data/uzip.with-zipinfo.env_vars b/tests/src/vfs/extfs/helpers-list/data/uzip.with-zipinfo.env_vars new file mode 100644 index 0000000..0192895 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/uzip.with-zipinfo.env_vars @@ -0,0 +1 @@ +MC_TEST_EXTFS_HAVE_ZIPINFO=1 diff --git a/tests/src/vfs/extfs/helpers-list/data/uzip.with-zipinfo.input b/tests/src/vfs/extfs/helpers-list/data/uzip.with-zipinfo.input new file mode 100644 index 0000000..568f224 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/uzip.with-zipinfo.input @@ -0,0 +1,45 @@ +Archive: a.zip +Zip file size: 75234 bytes, number of entries: 42 +-rw-r--r-- 3.0 unx 6 tx 6 stor 20161123.071336 -filename with leading dash.txt +-rw-r--r-- 3.0 unx 6 tx 6 stor 20161123.071336 filename with leading space.txt +drwxr-xr-x 3.0 unx 0 bx 0 stor 20151225.001514 brushes/ +-rw------- 3.0 unx 739 tx 164 defN 20160918.164557 colorrc +-rw------- 3.0 unx 1863 tx 441 defN 20160918.164558 controllerrc +drwxr-xr-x 3.0 unx 0 bx 0 stor 20151225.001514 curves/ +-rw------- 3.0 unx 1982 tx 423 defN 20160918.164557 dockrc +drwxr-xr-x 3.0 unx 0 bx 0 stor 20151225.001514 dynamics/ +drwxr-xr-x 3.0 unx 0 bx 0 stor 20151225.001514 environ/ +-rw-r--r-- 3.0 unx 6 tx 6 stor 20161123.071336 filename with spaces.txt +drwxr-xr-x 3.0 unx 0 bx 0 stor 20151225.001514 fonts/ +drwxr-xr-x 3.0 unx 0 bx 0 stor 20151225.001514 fractalexplorer/ +drwxr-xr-x 3.0 unx 0 bx 0 stor 20151225.001514 gfig/ +drwxr-xr-x 3.0 unx 0 bx 0 stor 20151225.001514 gflare/ +-rw------- 3.0 unx 355 tx 223 defN 20160108.011031 gimprc +drwxr-xr-x 3.0 unx 0 bx 0 stor 20151225.001514 gimpressionist/ +drwxr-xr-x 3.0 unx 0 bx 0 stor 20151225.001514 gradients/ +-rw-r--r-- 3.0 unx 430 tx 251 defN 20151225.001514 gtkrc +drwxr-xr-x 3.0 unx 0 bx 0 stor 20151225.001514 interpreters/ +drwxr-xr-x 3.0 unx 0 bx 0 stor 20151225.001514 levels/ +-rw-r--r-- 3.0 unx 76873 tx 8770 defN 20160918.164558 menurc +drwxr-xr-x 3.0 unx 0 bx 0 stor 20151225.001514 modules/ +drwxr-xr-x 3.0 unx 0 bx 0 stor 20151225.001514 palettes/ +-rw------- 3.0 unx 102 tx 86 defN 20160918.164559 parasiterc +drwxr-xr-x 3.0 unx 0 bx 0 stor 20151225.001514 patterns/ +-rw-r--r-- 3.0 unx 277486 tx 48556 defN 20151225.001526 pluginrc +drwxr-xr-x 3.0 unx 0 bx 0 stor 20151225.001514 plug-ins/ +-rw-rw-r-- 3.0 unx 209 tx 143 defN 20160918.164437 print-page-setup +-rw-rw-r-- 3.0 unx 506 tx 295 defN 20160918.164437 print-settings +-rw------- 3.0 unx 62 tx 43 defN 20160108.010813 profilerc +drwxr-xr-x 3.0 unx 0 bx 0 stor 20151225.001514 scripts/ +-rw------- 3.0 unx 2370 tx 685 defN 20160918.164557 sessionrc +-rw-rw-r-- 3.0 unx 34747 tx 7545 defN 20160918.164559 tags.xml +-rw------- 3.0 unx 4817 tx 589 defN 20160918.164559 templaterc +drwxr-xr-x 3.0 unx 0 bx 0 stor 20151225.001514 templates/ +-rw-rw-r-- 3.0 unx 310 tx 204 defN 20160918.164204 themerc +drwxr-xr-x 3.0 unx 0 bx 0 stor 20151225.001514 themes/ +drwxr-xr-x 3.0 unx 0 bx 0 stor 20151225.001514 tmp/ +drwxr-xr-x 3.0 unx 0 bx 0 stor 20160403.000739 tool-options/ +drwxr-xr-x 3.0 unx 0 bx 0 stor 20151225.001514 tool-presets/ +-rw------- 3.0 unx 3996 tx 528 defN 20160918.164558 toolrc +-rw------- 3.0 unx 1178 tx 388 defN 20160918.164559 unitrc +40 files, 408031 bytes uncompressed, 69340 bytes compressed: 83.0% diff --git a/tests/src/vfs/extfs/helpers-list/data/uzip.with-zipinfo.output b/tests/src/vfs/extfs/helpers-list/data/uzip.with-zipinfo.output new file mode 100644 index 0000000..dcf37d0 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/uzip.with-zipinfo.output @@ -0,0 +1,42 @@ +-rw-r--r-- 1 <<uid>> <<gid>> 6 2016-11-23 07:13:36 ./-filename with leading dash.txt +-rw-r--r-- 1 <<uid>> <<gid>> 6 2016-11-23 07:13:36 ./ filename with leading space.txt +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:14 ./brushes/ +-rw------- 1 <<uid>> <<gid>> 739 2016-09-18 16:45:57 ./colorrc +-rw------- 1 <<uid>> <<gid>> 1863 2016-09-18 16:45:58 ./controllerrc +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:14 ./curves/ +-rw------- 1 <<uid>> <<gid>> 1982 2016-09-18 16:45:57 ./dockrc +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:14 ./dynamics/ +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:14 ./environ/ +-rw-r--r-- 1 <<uid>> <<gid>> 6 2016-11-23 07:13:36 ./filename with spaces.txt +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:14 ./fonts/ +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:14 ./fractalexplorer/ +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:14 ./gfig/ +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:14 ./gflare/ +-rw------- 1 <<uid>> <<gid>> 355 2016-01-08 01:10:31 ./gimprc +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:14 ./gimpressionist/ +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:14 ./gradients/ +-rw-r--r-- 1 <<uid>> <<gid>> 430 2015-12-25 00:15:14 ./gtkrc +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:14 ./interpreters/ +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:14 ./levels/ +-rw-r--r-- 1 <<uid>> <<gid>> 76873 2016-09-18 16:45:58 ./menurc +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:14 ./modules/ +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:14 ./palettes/ +-rw------- 1 <<uid>> <<gid>> 102 2016-09-18 16:45:59 ./parasiterc +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:14 ./patterns/ +-rw-r--r-- 1 <<uid>> <<gid>> 277486 2015-12-25 00:15:26 ./pluginrc +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:14 ./plug-ins/ +-rw-rw-r-- 1 <<uid>> <<gid>> 209 2016-09-18 16:44:37 ./print-page-setup +-rw-rw-r-- 1 <<uid>> <<gid>> 506 2016-09-18 16:44:37 ./print-settings +-rw------- 1 <<uid>> <<gid>> 62 2016-01-08 01:08:13 ./profilerc +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:14 ./scripts/ +-rw------- 1 <<uid>> <<gid>> 2370 2016-09-18 16:45:57 ./sessionrc +-rw-rw-r-- 1 <<uid>> <<gid>> 34747 2016-09-18 16:45:59 ./tags.xml +-rw------- 1 <<uid>> <<gid>> 4817 2016-09-18 16:45:59 ./templaterc +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:14 ./templates/ +-rw-rw-r-- 1 <<uid>> <<gid>> 310 2016-09-18 16:42:04 ./themerc +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:14 ./themes/ +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:14 ./tmp/ +drwxr-xr-x 1 <<uid>> <<gid>> 0 2016-04-03 00:07:39 ./tool-options/ +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:14 ./tool-presets/ +-rw------- 1 <<uid>> <<gid>> 3996 2016-09-18 16:45:58 ./toolrc +-rw------- 1 <<uid>> <<gid>> 1178 2016-09-18 16:45:59 ./unitrc diff --git a/tests/src/vfs/extfs/helpers-list/data/uzip.without-zipinfo--mdy.env_vars b/tests/src/vfs/extfs/helpers-list/data/uzip.without-zipinfo--mdy.env_vars new file mode 100644 index 0000000..9c8ce7f --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/uzip.without-zipinfo--mdy.env_vars @@ -0,0 +1 @@ +MC_TEST_EXTFS_HAVE_ZIPINFO=0 diff --git a/tests/src/vfs/extfs/helpers-list/data/uzip.without-zipinfo--mdy.input b/tests/src/vfs/extfs/helpers-list/data/uzip.without-zipinfo--mdy.input new file mode 100644 index 0000000..2eb60ef --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/uzip.without-zipinfo--mdy.input @@ -0,0 +1,2 @@ + 0 Stored 0 0% 12-25-15 00:15 00000000 brushes/ + 739 Defl:N 164 78% 09-16-78 16:45 2d7277eb colorrc diff --git a/tests/src/vfs/extfs/helpers-list/data/uzip.without-zipinfo--mdy.output b/tests/src/vfs/extfs/helpers-list/data/uzip.without-zipinfo--mdy.output new file mode 100644 index 0000000..18c113e --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/uzip.without-zipinfo--mdy.output @@ -0,0 +1,2 @@ +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:00 ./brushes/ +-rw-r--r-- 1 <<uid>> <<gid>> 739 1978-09-16 16:45:00 ./colorrc diff --git a/tests/src/vfs/extfs/helpers-list/data/uzip.without-zipinfo--ymd.env_vars b/tests/src/vfs/extfs/helpers-list/data/uzip.without-zipinfo--ymd.env_vars new file mode 100644 index 0000000..9c8ce7f --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/uzip.without-zipinfo--ymd.env_vars @@ -0,0 +1 @@ +MC_TEST_EXTFS_HAVE_ZIPINFO=0 diff --git a/tests/src/vfs/extfs/helpers-list/data/uzip.without-zipinfo--ymd.input b/tests/src/vfs/extfs/helpers-list/data/uzip.without-zipinfo--ymd.input new file mode 100644 index 0000000..9e7e16a --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/uzip.without-zipinfo--ymd.input @@ -0,0 +1,42 @@ + 6 Stored 6 0% 2016-11-23 07:13 363a3020 -filename with leading dash.txt + 6 Stored 6 0% 2016-11-23 07:13 363a3020 filename with leading space.txt + 0 Stored 0 0% 2015-12-25 00:15 00000000 brushes/ + 739 Defl:N 164 78% 2016-09-18 16:45 2d7277eb colorrc + 1863 Defl:N 441 76% 2016-09-18 16:45 4a229bae controllerrc + 0 Stored 0 0% 2015-12-25 00:15 00000000 curves/ + 1982 Defl:N 423 79% 2016-09-18 16:45 0f21e877 dockrc + 0 Stored 0 0% 2015-12-25 00:15 00000000 dynamics/ + 0 Stored 0 0% 2015-12-25 00:15 00000000 environ/ + 6 Stored 6 0% 2016-11-23 07:13 363a3020 filename with spaces.txt + 0 Stored 0 0% 2015-12-25 00:15 00000000 fonts/ + 0 Stored 0 0% 2015-12-25 00:15 00000000 fractalexplorer/ + 0 Stored 0 0% 2015-12-25 00:15 00000000 gfig/ + 0 Stored 0 0% 2015-12-25 00:15 00000000 gflare/ + 355 Defl:N 223 37% 2016-01-08 01:10 05197193 gimprc + 0 Stored 0 0% 2015-12-25 00:15 00000000 gimpressionist/ + 0 Stored 0 0% 2015-12-25 00:15 00000000 gradients/ + 430 Defl:N 251 42% 2015-12-25 00:15 a3ed42bc gtkrc + 0 Stored 0 0% 2015-12-25 00:15 00000000 interpreters/ + 0 Stored 0 0% 2015-12-25 00:15 00000000 levels/ + 76873 Defl:N 8770 89% 2016-09-18 16:45 7d9cb346 menurc + 0 Stored 0 0% 2015-12-25 00:15 00000000 modules/ + 0 Stored 0 0% 2015-12-25 00:15 00000000 palettes/ + 102 Defl:N 86 16% 2016-09-18 16:45 62252c7b parasiterc + 0 Stored 0 0% 2015-12-25 00:15 00000000 patterns/ + 277486 Defl:N 48556 83% 2015-12-25 00:15 f846b075 pluginrc + 0 Stored 0 0% 2015-12-25 00:15 00000000 plug-ins/ + 209 Defl:N 143 32% 2016-09-18 16:44 1c6688d4 print-page-setup + 506 Defl:N 295 42% 2016-09-18 16:44 ce580111 print-settings + 62 Defl:N 43 31% 2016-01-08 01:08 d149fa62 profilerc + 0 Stored 0 0% 2015-12-25 00:15 00000000 scripts/ + 2370 Defl:N 685 71% 2016-09-18 16:45 b31b0c93 sessionrc + 34747 Defl:N 7545 78% 2016-09-18 16:45 6f219ddd tags.xml + 4817 Defl:N 589 88% 2016-09-18 16:45 edb121a1 templaterc + 0 Stored 0 0% 2015-12-25 00:15 00000000 templates/ + 310 Defl:N 204 34% 2016-09-18 16:42 0b2c424e themerc + 0 Stored 0 0% 2015-12-25 00:15 00000000 themes/ + 0 Stored 0 0% 2015-12-25 00:15 00000000 tmp/ + 0 Stored 0 0% 2016-04-03 00:07 00000000 tool-options/ + 0 Stored 0 0% 2015-12-25 00:15 00000000 tool-presets/ + 3996 Defl:N 528 87% 2016-09-18 16:45 f51984ae toolrc + 1178 Defl:N 388 67% 2016-09-18 16:45 b8420722 unitrc diff --git a/tests/src/vfs/extfs/helpers-list/data/uzip.without-zipinfo--ymd.output b/tests/src/vfs/extfs/helpers-list/data/uzip.without-zipinfo--ymd.output new file mode 100644 index 0000000..ef3c8fc --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/uzip.without-zipinfo--ymd.output @@ -0,0 +1,42 @@ +-rw-r--r-- 1 <<uid>> <<gid>> 6 2016-11-23 07:13:00 ./-filename with leading dash.txt +-rw-r--r-- 1 <<uid>> <<gid>> 6 2016-11-23 07:13:00 ./ filename with leading space.txt +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:00 ./brushes/ +-rw-r--r-- 1 <<uid>> <<gid>> 739 2016-09-18 16:45:00 ./colorrc +-rw-r--r-- 1 <<uid>> <<gid>> 1863 2016-09-18 16:45:00 ./controllerrc +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:00 ./curves/ +-rw-r--r-- 1 <<uid>> <<gid>> 1982 2016-09-18 16:45:00 ./dockrc +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:00 ./dynamics/ +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:00 ./environ/ +-rw-r--r-- 1 <<uid>> <<gid>> 6 2016-11-23 07:13:00 ./filename with spaces.txt +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:00 ./fonts/ +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:00 ./fractalexplorer/ +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:00 ./gfig/ +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:00 ./gflare/ +-rw-r--r-- 1 <<uid>> <<gid>> 355 2016-01-08 01:10:00 ./gimprc +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:00 ./gimpressionist/ +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:00 ./gradients/ +-rw-r--r-- 1 <<uid>> <<gid>> 430 2015-12-25 00:15:00 ./gtkrc +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:00 ./interpreters/ +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:00 ./levels/ +-rw-r--r-- 1 <<uid>> <<gid>> 76873 2016-09-18 16:45:00 ./menurc +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:00 ./modules/ +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:00 ./palettes/ +-rw-r--r-- 1 <<uid>> <<gid>> 102 2016-09-18 16:45:00 ./parasiterc +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:00 ./patterns/ +-rw-r--r-- 1 <<uid>> <<gid>> 277486 2015-12-25 00:15:00 ./pluginrc +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:00 ./plug-ins/ +-rw-r--r-- 1 <<uid>> <<gid>> 209 2016-09-18 16:44:00 ./print-page-setup +-rw-r--r-- 1 <<uid>> <<gid>> 506 2016-09-18 16:44:00 ./print-settings +-rw-r--r-- 1 <<uid>> <<gid>> 62 2016-01-08 01:08:00 ./profilerc +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:00 ./scripts/ +-rw-r--r-- 1 <<uid>> <<gid>> 2370 2016-09-18 16:45:00 ./sessionrc +-rw-r--r-- 1 <<uid>> <<gid>> 34747 2016-09-18 16:45:00 ./tags.xml +-rw-r--r-- 1 <<uid>> <<gid>> 4817 2016-09-18 16:45:00 ./templaterc +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:00 ./templates/ +-rw-r--r-- 1 <<uid>> <<gid>> 310 2016-09-18 16:42:00 ./themerc +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:00 ./themes/ +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:00 ./tmp/ +drwxr-xr-x 1 <<uid>> <<gid>> 0 2016-04-03 00:07:00 ./tool-options/ +drwxr-xr-x 1 <<uid>> <<gid>> 0 2015-12-25 00:15:00 ./tool-presets/ +-rw-r--r-- 1 <<uid>> <<gid>> 3996 2016-09-18 16:45:00 ./toolrc +-rw-r--r-- 1 <<uid>> <<gid>> 1178 2016-09-18 16:45:00 ./unitrc diff --git a/tests/src/vfs/extfs/helpers-list/data/uzoo.README b/tests/src/vfs/extfs/helpers-list/data/uzoo.README new file mode 100644 index 0000000..4c21006 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/uzoo.README @@ -0,0 +1,8 @@ + +The input file was created by running "zoo lq" on the archive at: + + https://www.midnight-commander.org/ticket/3696 + +Known bugs in our uzoo: +- It doesn't support filenames with spaces. +- It reports '0' gid. diff --git a/tests/src/vfs/extfs/helpers-list/data/uzoo.input b/tests/src/vfs/extfs/helpers-list/data/uzoo.input new file mode 100644 index 0000000..4659744 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/uzoo.input @@ -0,0 +1,18 @@ + 4 0% 4 26 Sep 16 12:56:02+61 теÑÑ‚/теÑÑ‚3/теÑÑ‚2.txt + 4 0% 4 26 Sep 16 12:56:00+61 теÑÑ‚/теÑÑ‚3/теÑÑ‚1.txt + 4 0% 4 26 Sep 16 12:56:08+61 теÑÑ‚/теÑÑ‚3/теÑÑ‚3.txt + 4 0% 4 26 Sep 16 12:56:02+61 теÑÑ‚/теÑÑ‚1/теÑÑ‚2.txt + 4 0% 4 26 Sep 16 12:56:00+61 теÑÑ‚/теÑÑ‚1/теÑÑ‚1.txt + 4 0% 4 26 Sep 16 12:56:08+61 теÑÑ‚/теÑÑ‚1/теÑÑ‚3.txt + 4 0% 4 26 Sep 16 12:56:02+61 теÑÑ‚/теÑÑ‚2/теÑÑ‚2.txt + 4 0% 4 26 Sep 16 12:56:00+61 теÑÑ‚/теÑÑ‚2/теÑÑ‚1.txt + 4 0% 4 26 Sep 16 12:56:08+61 теÑÑ‚/теÑÑ‚2/теÑÑ‚3.txt + 4 0% 4 26 Sep 16 12:56:02+61 теÑÑ‚/test1/теÑÑ‚2.txt + 4 0% 4 26 Sep 16 12:56:00+61 теÑÑ‚/test1/теÑÑ‚1.txt + 4 0% 4 26 Sep 16 12:56:08+61 теÑÑ‚/test1/теÑÑ‚3.txt + 4 0% 4 26 Sep 16 12:56:02+61 теÑÑ‚/test3/теÑÑ‚2.txt + 4 0% 4 26 Sep 16 12:56:00+61 теÑÑ‚/test3/теÑÑ‚1.txt + 4 0% 4 26 Sep 16 12:56:08+61 теÑÑ‚/test3/теÑÑ‚3.txt + 4 0% 4 26 Sep 16 12:56:02+61 теÑÑ‚/test2/теÑÑ‚2.txt + 4 0% 4 26 Sep 16 12:56:00+61 теÑÑ‚/test2/теÑÑ‚1.txt + 4 0% 4 26 Sep 16 12:56:08+61 теÑÑ‚/test2/теÑÑ‚3.txt diff --git a/tests/src/vfs/extfs/helpers-list/data/uzoo.output b/tests/src/vfs/extfs/helpers-list/data/uzoo.output new file mode 100644 index 0000000..2e9ad9a --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/data/uzoo.output @@ -0,0 +1,18 @@ +-rw-r--r-- 1 <<uid>> 0 4 2016-09-26 12:56:00 теÑÑ‚/теÑÑ‚3/теÑÑ‚2.txt +-rw-r--r-- 1 <<uid>> 0 4 2016-09-26 12:56:00 теÑÑ‚/теÑÑ‚3/теÑÑ‚1.txt +-rw-r--r-- 1 <<uid>> 0 4 2016-09-26 12:56:00 теÑÑ‚/теÑÑ‚3/теÑÑ‚3.txt +-rw-r--r-- 1 <<uid>> 0 4 2016-09-26 12:56:00 теÑÑ‚/теÑÑ‚1/теÑÑ‚2.txt +-rw-r--r-- 1 <<uid>> 0 4 2016-09-26 12:56:00 теÑÑ‚/теÑÑ‚1/теÑÑ‚1.txt +-rw-r--r-- 1 <<uid>> 0 4 2016-09-26 12:56:00 теÑÑ‚/теÑÑ‚1/теÑÑ‚3.txt +-rw-r--r-- 1 <<uid>> 0 4 2016-09-26 12:56:00 теÑÑ‚/теÑÑ‚2/теÑÑ‚2.txt +-rw-r--r-- 1 <<uid>> 0 4 2016-09-26 12:56:00 теÑÑ‚/теÑÑ‚2/теÑÑ‚1.txt +-rw-r--r-- 1 <<uid>> 0 4 2016-09-26 12:56:00 теÑÑ‚/теÑÑ‚2/теÑÑ‚3.txt +-rw-r--r-- 1 <<uid>> 0 4 2016-09-26 12:56:00 теÑÑ‚/test1/теÑÑ‚2.txt +-rw-r--r-- 1 <<uid>> 0 4 2016-09-26 12:56:00 теÑÑ‚/test1/теÑÑ‚1.txt +-rw-r--r-- 1 <<uid>> 0 4 2016-09-26 12:56:00 теÑÑ‚/test1/теÑÑ‚3.txt +-rw-r--r-- 1 <<uid>> 0 4 2016-09-26 12:56:00 теÑÑ‚/test3/теÑÑ‚2.txt +-rw-r--r-- 1 <<uid>> 0 4 2016-09-26 12:56:00 теÑÑ‚/test3/теÑÑ‚1.txt +-rw-r--r-- 1 <<uid>> 0 4 2016-09-26 12:56:00 теÑÑ‚/test3/теÑÑ‚3.txt +-rw-r--r-- 1 <<uid>> 0 4 2016-09-26 12:56:00 теÑÑ‚/test2/теÑÑ‚2.txt +-rw-r--r-- 1 <<uid>> 0 4 2016-09-26 12:56:00 теÑÑ‚/test2/теÑÑ‚1.txt +-rw-r--r-- 1 <<uid>> 0 4 2016-09-26 12:56:00 теÑÑ‚/test2/теÑÑ‚3.txt diff --git a/tests/src/vfs/extfs/helpers-list/mc_parse_ls_l.c b/tests/src/vfs/extfs/helpers-list/mc_parse_ls_l.c new file mode 100644 index 0000000..7c6ef18 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/mc_parse_ls_l.c @@ -0,0 +1,409 @@ +/* + A parser for file-listings formatted like 'ls -l'. + + Copyright (C) 2016-2023 + Free Software Foundation, Inc. + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +/** \file + * \brief A parser for file-listings formatted like 'ls -l'. + * + * This program parses file-listings the same way MC does. + * It's basically a wrapper around vfs_parse_ls_lga(). + * You can feed it the output of any of extfs's helpers. + * + * After parsing, the data is written out to stdout. The output + * format can be either YAML or a format similar to 'ls -l'. + * + * This program is the main tool our tester script is going to use. + */ + +#include <config.h> + +#include <stdio.h> +#include <stdlib.h> + +#include "lib/global.h" + +#include "lib/vfs/utilvfs.h" /* vfs_parse_ls_lga() */ +#include "lib/util.h" /* string_perm() */ +#include "lib/timefmt.h" /* FMT_LOCALTIME */ +#include "lib/widget.h" /* for the prototype of message() only */ + +/*** global variables ****************************************************************************/ + +/*** file scope macro definitions ****************************************************************/ + +/*** file scope type declarations ****************************************************************/ + +typedef enum +{ + FORMAT_YAML, + FORMAT_LS +} output_format_t; + +/*** forward declarations (file scope functions) *************************************************/ + +static gboolean +parse_format_name_argument (const gchar * option_name, const gchar * value, gpointer data, + GError ** error); + +/*** file scope variables ************************************************************************/ + +/* Command-line options. */ +static gboolean opt_drop_mtime = FALSE; +static gboolean opt_drop_ids = FALSE; +static gboolean opt_symbolic_ids = FALSE; +static output_format_t opt_output_format = FORMAT_LS; + +/* Misc. */ +static int error_count = 0; + +static GOptionEntry entries[] = { + {"drop-mtime", 0, 0, G_OPTION_ARG_NONE, &opt_drop_mtime, "Don't include mtime in the output.", + NULL}, + {"drop-ids", 0, 0, G_OPTION_ARG_NONE, &opt_drop_ids, "Don't include uid/gid in the output.", + NULL}, + {"symbolic-ids", 0, 0, G_OPTION_ARG_NONE, &opt_symbolic_ids, + "Print the strings '<<uid>>'/'<<gid>>' instead of the numeric IDs when they match the process' uid/gid.", + NULL}, + {"format", 'f', 0, G_OPTION_ARG_CALLBACK, parse_format_name_argument, + "Output format. Default: ls.", "<ls|yaml>"}, + G_OPTION_ENTRY_NULL +}; + +/* --------------------------------------------------------------------------------------------- */ +/*** file scope functions ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ +/** + * Command-line handling. + */ +/* --------------------------------------------------------------------------------------------- */ + +static gboolean +parse_format_name_argument (const gchar * option_name, const gchar * value, gpointer data, + GError ** error) +{ + (void) option_name; + (void) data; + + if (strcmp (value, "yaml") == 0) + opt_output_format = FORMAT_YAML; + else if (strcmp (value, "ls") == 0) + opt_output_format = FORMAT_LS; + else + { + g_set_error (error, MC_ERROR, G_OPTION_ERROR_FAILED, "unknown output format '%s'", value); + return FALSE; + } + + return TRUE; +} + +/* --------------------------------------------------------------------------------------------- */ + +static gboolean +parse_command_line (int *argc, char **argv[]) +{ + GError *error = NULL; + GOptionContext *context; + + context = + g_option_context_new + ("- Parses its input, which is expected to be in a format similar to 'ls -l', and writes the result to stdout."); + g_option_context_add_main_entries (context, entries, NULL); + if (!g_option_context_parse (context, argc, argv, &error)) + { + g_print ("option parsing failed: %s\n", error->message); + g_error_free (error); + + return FALSE; + } + + return TRUE; +} + +/* --------------------------------------------------------------------------------------------- */ +/** + * Utility functions. + */ +/* --------------------------------------------------------------------------------------------- */ + +static const char * +my_itoa (int i) +{ + static char buf[BUF_SMALL]; + + sprintf (buf, "%d", i); + return buf; +} + +/* --------------------------------------------------------------------------------------------- */ + +/** + * Returns the uid as-is, or as "<<uid>>" if the same as current user. + */ +static const char * +symbolic_uid (uid_t uid) +{ + return (opt_symbolic_ids && uid == getuid ())? "<<uid>>" : my_itoa ((int) uid); +} + +/* --------------------------------------------------------------------------------------------- */ + +static const char * +symbolic_gid (gid_t gid) +{ + return (opt_symbolic_ids && gid == getgid ())? "<<gid>>" : my_itoa ((int) gid); +} + +/* --------------------------------------------------------------------------------------------- */ + +/** + * Cuts off a string's line-end (as in Perl). + */ +static void +chomp (char *s) +{ + int i; + + i = strlen (s); + + /* Code taken from vfs_parse_ls_lga(), with modifications. */ + if ((--i >= 0) && (s[i] == '\r' || s[i] == '\n')) + s[i] = '\0'; + if ((--i >= 0) && (s[i] == '\r' || s[i] == '\n')) + s[i] = '\0'; +} + +/* --------------------------------------------------------------------------------------------- */ + +static const char * +string_date (time_t t) +{ + static char buf[BUF_SMALL]; + + /* + * If we ever want to be able to re-parse the output of this program, + * we'll need to use the American brain-damaged MM-DD-YYYY instead of + * YYYY-MM-DD because vfs_parse_ls_lga() doesn't currently recognize + * the latter. + */ + FMT_LOCALTIME (buf, sizeof buf, "%Y-%m-%d %H:%M:%S", t); + return buf; +} + +/* --------------------------------------------------------------------------------------------- */ + +/** + * Override MC's message(). + * + * vfs_parse_ls_lga() calls this on error. Since MC's uses tty/widgets, it + * will crash us. We replace it with a plain version. + */ +void +message (int flags, const char *title, const char *text, ...) +{ + char *p; + va_list ap; + + (void) flags; + (void) title; + + va_start (ap, text); + p = g_strdup_vprintf (text, ap); + va_end (ap); + printf ("message(): vfs_parse_ls_lga(): parsing error at: %s\n", p); + g_free (p); +} + +/* --------------------------------------------------------------------------------------------- */ +/** + * YAML output format. + */ +/* --------------------------------------------------------------------------------------------- */ + +static void +yaml_dump_stbuf (const struct stat *st) +{ + /* Various casts and flags here were taken/inspired by info_show_info(). */ + printf (" perm: %s\n", string_perm (st->st_mode)); + if (!opt_drop_ids) + { + printf (" uid: %s\n", symbolic_uid (st->st_uid)); + printf (" gid: %s\n", symbolic_gid (st->st_gid)); + } + printf (" size: %" PRIuMAX "\n", (uintmax_t) st->st_size); + printf (" nlink: %d\n", (int) st->st_nlink); + if (!opt_drop_mtime) + printf (" mtime: %s\n", string_date (st->st_mtime)); +} + +/* --------------------------------------------------------------------------------------------- */ + +static void +yaml_dump_string (const char *name, const char *val) +{ + char *q; + + q = g_shell_quote (val); + printf (" %s: %s\n", name, q); + g_free (q); +} + +/* --------------------------------------------------------------------------------------------- */ + +static void +yaml_dump_record (gboolean success, const char *input_line, const struct stat *st, + const char *filename, const char *linkname) +{ + printf ("-\n"); /* Start new item in the list. */ + + if (success) + { + if (filename != NULL) + yaml_dump_string ("name", filename); + if (linkname != NULL) + yaml_dump_string ("linkname", linkname); + yaml_dump_stbuf (st); + } + else + { + yaml_dump_string ("cannot parse input line", input_line); + } +} + +/* --------------------------------------------------------------------------------------------- */ +/** + * 'ls' output format. + */ +/* --------------------------------------------------------------------------------------------- */ + +static void +ls_dump_stbuf (const struct stat *st) +{ + /* Various casts and flags here were taken/inspired by info_show_info(). */ + printf ("%s %3d ", string_perm (st->st_mode), (int) st->st_nlink); + if (!opt_drop_ids) + { + printf ("%8s ", symbolic_uid (st->st_uid)); + printf ("%8s ", symbolic_gid (st->st_gid)); + } + printf ("%10" PRIuMAX " ", (uintmax_t) st->st_size); + if (!opt_drop_mtime) + printf ("%s ", string_date (st->st_mtime)); +} + +/* --------------------------------------------------------------------------------------------- */ + +static void +ls_dump_record (gboolean success, const char *input_line, const struct stat *st, + const char *filename, const char *linkname) +{ + if (success) + { + ls_dump_stbuf (st); + if (filename != NULL) + printf ("%s", filename); + if (linkname != NULL) + printf (" -> %s", linkname); + printf ("\n"); + } + else + { + printf ("cannot parse input line: '%s'\n", input_line); + } +} + +/* ------------------------------------------------------------------------------ */ +/** + * Main code. + */ +/* ------------------------------------------------------------------------------ */ + +static void +process_ls_line (const char *line) +{ + struct stat st; + char *filename, *linkname; + gboolean success; + + memset (&st, 0, sizeof st); + filename = NULL; + linkname = NULL; + + success = vfs_parse_ls_lga (line, &st, &filename, &linkname, NULL); + + if (!success) + error_count++; + + if (opt_output_format == FORMAT_YAML) + yaml_dump_record (success, line, &st, filename, linkname); + else + ls_dump_record (success, line, &st, filename, linkname); + + g_free (filename); + g_free (linkname); +} + +/* ------------------------------------------------------------------------------ */ + +static void +process_input (FILE * input) +{ + char line[BUF_4K]; + + while (fgets (line, sizeof line, input) != NULL) + { + chomp (line); /* Not mandatory. Makes error messages nicer. */ + if (strncmp (line, "total ", 6) == 0) /* Convenience only: makes 'ls -l' parse cleanly. */ + continue; + process_ls_line (line); + } +} + +/* ------------------------------------------------------------------------------ */ + +int +main (int argc, char *argv[]) +{ + FILE *input; + + if (!parse_command_line (&argc, &argv)) + return EXIT_FAILURE; + + if (argc >= 2) + { + input = fopen (argv[1], "r"); + if (input == NULL) + { + perror (argv[1]); + return EXIT_FAILURE; + } + } + else + { + input = stdin; + } + + process_input (input); + + return (error_count > 0) ? EXIT_FAILURE : EXIT_SUCCESS; +} + +/* ------------------------------------------------------------------------------ */ diff --git a/tests/src/vfs/extfs/helpers-list/mc_xcat b/tests/src/vfs/extfs/helpers-list/mc_xcat new file mode 100755 index 0000000..7871a8f --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/mc_xcat @@ -0,0 +1,16 @@ +#!/bin/sh + +# +# This program is intended to be identical to 'cat' with the exception that +# it ignores any arguments past the 1st one. +# +# To understand why it's needed, first read the section about +# MC_TEST_EXTFS_LIST_CMD in the README. As explained there, the command in +# MC_TEST_EXTFS_LIST_CMD has to ignore any extra arguments passed to it. +# The tester achieves this by invoking a helper thus (roughly): +# +# export MC_TEST_EXTFS_LIST_CMD="mc_xcat /path/to/fake/input" +# sh /path/to/helper list /dev/null +# + +exec cat "$1" diff --git a/tests/src/vfs/extfs/helpers-list/misc/Makefile.am b/tests/src/vfs/extfs/helpers-list/misc/Makefile.am new file mode 100644 index 0000000..909d497 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/misc/Makefile.am @@ -0,0 +1,2 @@ + +EXTRA_DIST = rpm/rpm2tags.pl rpm/test.spec diff --git a/tests/src/vfs/extfs/helpers-list/misc/Makefile.in b/tests/src/vfs/extfs/helpers-list/misc/Makefile.in new file mode 100644 index 0000000..d3e051d --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/misc/Makefile.in @@ -0,0 +1,580 @@ +# Makefile.in generated by automake 1.16.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2021 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = tests/src/vfs/extfs/helpers-list/misc +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/m4.include/gnulib/mode_t.m4 \ + $(top_srcdir)/m4.include/gnulib/stat-size.m4 \ + $(top_srcdir)/m4.include/gnulib/fstypename.m4 \ + $(top_srcdir)/m4.include/gnulib/fsusage.m4 \ + $(top_srcdir)/m4.include/gnulib/mountlist.m4 \ + $(top_srcdir)/m4.include/gnulib/windows-stat-inodes.m4 \ + $(top_srcdir)/m4.include/gnulib/sys_types_h.m4 \ + $(top_srcdir)/m4.include/ax_path_lib_pcre.m4 \ + $(top_srcdir)/m4.include/ax_check_pcre2.m4 \ + $(top_srcdir)/m4.include/dx_doxygen.m4 \ + $(top_srcdir)/m4.include/ax_require_defined.m4 \ + $(top_srcdir)/m4.include/ax_check_compile_flag.m4 \ + $(top_srcdir)/m4.include/ax_append_flag.m4 \ + $(top_srcdir)/m4.include/ax_append_compile_flags.m4 \ + $(top_srcdir)/m4.include/mc-cflags.m4 \ + $(top_srcdir)/m4.include/ax_gcc_func_attribute.m4 \ + $(top_srcdir)/m4.include/mc-check-search-type.m4 \ + $(top_srcdir)/m4.include/mc-get-fs-info.m4 \ + $(top_srcdir)/m4.include/mc-with-x.m4 \ + $(top_srcdir)/m4.include/mc-use-termcap.m4 \ + $(top_srcdir)/m4.include/mc-with-screen.m4 \ + $(top_srcdir)/m4.include/mc-with-screen-ncurses.m4 \ + $(top_srcdir)/m4.include/mc-with-screen-slang.m4 \ + $(top_srcdir)/m4.include/mc-with-internal-edit.m4 \ + $(top_srcdir)/m4.include/mc-subshell.m4 \ + $(top_srcdir)/m4.include/mc-background.m4 \ + $(top_srcdir)/m4.include/mc-ext2fs-attr.m4 \ + $(top_srcdir)/m4.include/mc-glib.m4 \ + $(top_srcdir)/m4.include/mc-vfs.m4 \ + $(top_srcdir)/m4.include/vfs/rpc.m4 \ + $(top_srcdir)/m4.include/vfs/socket.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-extfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-sfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-ftp.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-sftp.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-fish.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-undelfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-tarfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-cpiofs.m4 \ + $(top_srcdir)/m4.include/mc-version.m4 \ + $(top_srcdir)/m4.include/mc-tests.m4 \ + $(top_srcdir)/m4.include/mc-i18n.m4 \ + $(top_srcdir)/m4.include/mc-assert.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +COM_ERR_CFLAGS = @COM_ERR_CFLAGS@ +COM_ERR_LIBS = @COM_ERR_LIBS@ +CP1251 = @CP1251@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DOC_LINGUAS = @DOC_LINGUAS@ +DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +DX_CONFIG = @DX_CONFIG@ +DX_DOCDIR = @DX_DOCDIR@ +DX_DOT = @DX_DOT@ +DX_DOXYGEN = @DX_DOXYGEN@ +DX_DVIPS = @DX_DVIPS@ +DX_EGREP = @DX_EGREP@ +DX_ENV = @DX_ENV@ +DX_FLAG_chi = @DX_FLAG_chi@ +DX_FLAG_chm = @DX_FLAG_chm@ +DX_FLAG_doc = @DX_FLAG_doc@ +DX_FLAG_dot = @DX_FLAG_dot@ +DX_FLAG_html = @DX_FLAG_html@ +DX_FLAG_man = @DX_FLAG_man@ +DX_FLAG_pdf = @DX_FLAG_pdf@ +DX_FLAG_ps = @DX_FLAG_ps@ +DX_FLAG_rtf = @DX_FLAG_rtf@ +DX_FLAG_xml = @DX_FLAG_xml@ +DX_HHC = @DX_HHC@ +DX_LATEX = @DX_LATEX@ +DX_MAKEINDEX = @DX_MAKEINDEX@ +DX_PDFLATEX = @DX_PDFLATEX@ +DX_PERL = @DX_PERL@ +DX_PROJECT = @DX_PROJECT@ +E2P_CFLAGS = @E2P_CFLAGS@ +E2P_LIBS = @E2P_LIBS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ETAGS = @ETAGS@ +EXEEXT = @EXEEXT@ +EXT2FS_CFLAGS = @EXT2FS_CFLAGS@ +EXT2FS_LIBS = @EXT2FS_LIBS@ +EXTHELPERSDIR = @EXTHELPERSDIR@ +FGREP = @FGREP@ +FILECMD = @FILECMD@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ +GMODULE_CFLAGS = @GMODULE_CFLAGS@ +GMODULE_LIBS = @GMODULE_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +HAVE_FILECMD = @HAVE_FILECMD@ +HAVE_ZIPINFO = @HAVE_ZIPINFO@ +HAVE_nroff = @HAVE_nroff@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBMC_RELEASE = @LIBMC_RELEASE@ +LIBMC_VERSION = @LIBMC_VERSION@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSSH_CFLAGS = @LIBSSH_CFLAGS@ +LIBSSH_LIBS = @LIBSSH_LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANDOC = @MANDOC@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_DATE = @MAN_DATE@ +MAN_FLAGS = @MAN_FLAGS@ +MAN_VERSION = @MAN_VERSION@ +MCLIBS = @MCLIBS@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCRE_CFLAGS = @PCRE_CFLAGS@ +PCRE_LIBS = @PCRE_LIBS@ +PERL = @PERL@ +PERL_FOR_BUILD = @PERL_FOR_BUILD@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POSUB = @POSUB@ +PYTHON = @PYTHON@ +RANLIB = @RANLIB@ +RUBY = @RUBY@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SLANG_CFLAGS = @SLANG_CFLAGS@ +SLANG_LIBS = @SLANG_LIBS@ +STRIP = @STRIP@ +TESTS_LDFLAGS = @TESTS_LDFLAGS@ +UNZIP = @UNZIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +X11_WWW = @X11_WWW@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +ZIP = @ZIP@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = rpm/rpm2tags.pl rpm/test.spec +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/src/vfs/extfs/helpers-list/misc/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu tests/src/vfs/extfs/helpers-list/misc/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/tests/src/vfs/extfs/helpers-list/misc/rpm/rpm2tags.pl b/tests/src/vfs/extfs/helpers-list/misc/rpm/rpm2tags.pl new file mode 100644 index 0000000..c776407 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/misc/rpm/rpm2tags.pl @@ -0,0 +1,103 @@ +use strict; +use warnings; +use Data::Dumper; + +my $help = <<EOF; +WHAT +---- + +This script converts an RPM package into what we call a "tags file", +which is simply an associative array listing all the tags and their +values. + +WHY +--- + +For our rpm helper tests we need an RPM file. But we also want the tests +to be able to run on systems where the rpm binary isn't installed. The +solution: our tests work on "tags files" instead of real RPM files. + +HOW +--- + +Use it like this: + + \$ perl $0 /path/to/some/package.rpm > test.input + +You can run this script only on systems where 'rpm' is installed. + +WHEW +---- + +After all was done the author of this script discovered something not +mentioned in rpm's manpage: one can do "rpm -qp --xml pkg.rpm" to +serialize the metadata and get the same effect. But this would just move +the complexity to the test (in handling XML). +EOF + +# Tag variations we're interested in and wish to record as well. +my @formatted_tags = qw( + BUILDTIME:date + CHANGELOGTIME:date + + REQUIREFLAGS:depflags + PROVIDEFLAGS:depflags + OBSOLETEFLAGS:depflags + CONFLICTFLAGS:depflags +); + +# Big tags we want to omit to save space. +my %skip = map {$_ => 1} qw( + HEADERIMMUTABLE +); + +# Make 'rpm' print dates in the format our helper expects. +$ENV{'LC_TIME'} = 'C'; + +sub rpm2tags +{ + my ($rpm_pkg) = @_; + + my %tags = (); + + chomp(my @all_tags = `rpm --querytags`); + @all_tags = grep {!$skip{$_}} @all_tags; + + foreach my $tag (@all_tags, @formatted_tags) { + $tags{$tag} = `rpm -qp --qf "%{$tag}" "$rpm_pkg"`; + } + + # Add pseudo tags: + $tags{'_INFO'} = `rpm -qip "$rpm_pkg"`; + + return %tags; +} + +sub prolog +{ + my $cmdline = join(' ', 'perl', $0, @ARGV); + return <<EOF; +# -*- mode: perl -*- +# vim: filetype=perl +# +# This "tags file" was created by running the following command: +# +# \$ $cmdline +# +# This file is used in our tests instead of the corresponding RPM file. +# This lets us run the tests on systems where 'rpm' is not installed. +EOF +} + +sub main +{ + if (!$ARGV[0] || $ARGV[0] eq "--help" || $ARGV[0] eq "-h") { + print $help; + exit; + } + my %tags = rpm2tags($ARGV[0]); + $Data::Dumper::Terse = 1; + print(prolog(), "\n", '$tags = ', Dumper(\%tags), ";\n"); +} + +main(); diff --git a/tests/src/vfs/extfs/helpers-list/misc/rpm/test.spec b/tests/src/vfs/extfs/helpers-list/misc/rpm/test.spec new file mode 100644 index 0000000..04e106c --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/misc/rpm/test.spec @@ -0,0 +1,85 @@ +# +# This spec file is used to build the test*.rpm package we use in one of +# our tests. +# +# The advantage of using our own custom package, instead of downloading a +# random one from the net, is that we get the chance here to define all the +# tags our rpm helper is supposed to support. +# +# Build this package with: +# +# $ rpmbuild -bb test.spec +# +# Then create the input for the test with: +# +# $ perl /path/to/rpm2tags.pl ~/rpmbuild/RPMS/noarch/test*.rpm > rpm.custom.input +# +Name: test +Summary: Testing +Epoch: 1 +Version: 2.3 +Release: 4%{?dist} +URL: http://example.com +Group: Development/System +License: MIT +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root +BuildArch: noarch +Conflicts: notest +Obsoletes: testing +Distribution: Test Distro +Packager: Test Packager +Vendor: Test Vendor + + +%description +Multi-line description field +with "double", 'single quotes', and $weird | \characters i\n = i\\t, empty line... + +...and a tab: [ ]. + +%install +[ "%{buildroot}" != / ] && %{__rm} -rf "%{buildroot}" +%{__mkdir_p} %{buildroot}%{_tmppath} +echo %{name} > %{buildroot}%{_tmppath}/%{name}.txt + + +%pretrans +echo "Pre-transaction script" + + +%pre +echo "Pre-installation script" + + +%post +echo "Post-installation script" + + +%preun +echo "Pre-uninstallation script" + + +%postun +echo "Post-uninstallation script" + + +%posttrans +echo "Post-transaction script" + + +%verifyscript +echo "Verify script" + + +%clean +[ "%{buildroot}" != / ] && %{__rm} -rf "%{buildroot}" + + +%files +%defattr(-,root,root,-) +%{_tmppath}/%{name}.txt + + +%changelog +* Fri Dec 30 2016 Jiri Tyr <jiri.tyr at gmail.com> 1:2.3-4 +- Initial build. diff --git a/tests/src/vfs/extfs/helpers-list/test_all b/tests/src/vfs/extfs/helpers-list/test_all new file mode 100755 index 0000000..f5f9be6 --- /dev/null +++ b/tests/src/vfs/extfs/helpers-list/test_all @@ -0,0 +1,462 @@ +#!/bin/sh + +# A tester for extfs helpers. +# +# Copyright (C) 2016-2017 +# The Free Software Foundation, Inc. +# +# This file is part of the Midnight Commander. +# +# The Midnight Commander is free software: you can redistribute it +# and/or modify 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. +# +# The Midnight Commander 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/>. + +help() { + cat << EOS + +NAME + +$(basename "$0") - Tests the 'list' command of extfs helpers. + +SYNOPSIS + + $(basename "$0") \\ + --data-dir /path/to/where/data/files/are/stored \\ + --helpers-dir /path/to/where/helpers/are/stored \\ + --data-build-dir /path/to/where/config.sh/is/stored + +(But you're more likely to invoke this program with the 'run' script +created by 'make check'; or by 'make check' itself.) + +DESCRIPTION + +This program tests extfs helpers by feeding them input and comparing +their output to the expected output. + +See README for full details. + +You need to tell this program primarily two things: where the helpers are +stored, and where the "data files" are stored. The data files are *.input +files that are fed to the helpers and *.output files that are the correct +output expected from these helpers. + +You also need to tell this program where the build flavor of the "data +files" is stored. Most notably this is where the 'config.sh' file is +created during build time. You do this with '--data-build-dir'. + +EOS +} + +#"' + +# +# Some helpers use the 'sort' utility. The "expected output" files we +# provide must be generated in the same locale these helpers are to be run +# by the tester or else 'sort' will produce a different output than ours, +# failing the tests. +# +# We settle on the C locale. +# +LC_ALL=C +export LC_ALL + +############################ Global variables ############################## + +# The directories used. +data_dir= +data_build_dir= +helpers_dir1= +helpers_dir2= + +opt_create_output=no # "yes" if '--create-output' provided. +opt_run_mcdiff_on_error=no # "yes" if '--mcdiff' provided. + +############################ Coding guidance ############################### + +# +# Portability notes: +# +# - We do `local var="$whatever"` instead of `local var=$whatever` for +# compatibility with Dash. See http://unix.stackexchange.com/questions/97560. +# +# - The 'local' keyword used in this file isn't mandatory. Feel free to +# remove it if it isn't supported by your archaic shell. +# + +############################ Utility functions ############################# + +# +# Does $1 contain $2? +# +# Accepts basic regex. +# +has_string() { + local haystack="$1" # quotes needed for Dash, as may contain spaces (see notes above). + local needle="$2" + echo "$haystack" | grep "$needle" > /dev/null +} + +# +# Given "/path/to/basename.and.some.ext", returns "basename" +# +basename_sans_extensions() { + local base="$(basename "$1")" + echo "${base%%.*}" +} + +# +# Does an executable exist? +# +has_prog() { + # see http://stackoverflow.com/questions/592620 + command -v "$1" >/dev/null 2>&1 +} + +# +# Are we running interactively? Or is our output redirected to a file/pipe? +# +is_interactive() { + [ -t 1 ] +} + +# +# Can we use colors? +# +has_colors() { + is_interactive && has_string "$TERM" 'linux\|xterm\|screen\|tmux\|putty' +} + +init_colors() { + if has_colors; then + local esc="$(printf '\033')" # for portability + C_bold="$esc[1m" + C_green="$esc[1;32m" + C_red="$esc[1;31m" + C_magenta="$esc[1;35m" + C_norm="$esc[0m" + fi +} + +# +# A few colorful alternatives to 'echo'. +# +header() { echo $C_bold"$@"$C_norm; } +err() { echo $C_red"$@"$C_norm; } +notice() { echo $C_magenta"$@"$C_norm; } +success() { echo $C_green"$@"$C_norm; } + +die() { + err "Error: $@" + exit 1 +} + +assert_dir_exists() { + [ -d "$1" ] || die "The directory '$1' doesn't exist, or is not a directory." +} + +# +# Creates a temporary file. +# +temp_file() { + local template="$1" + # BSD's doesn't support -t. + mktemp "${TMPDIR:-/tmp}/$template" +} + +################################ Main code ################################# + +# +# Prints out the command to run a helper, if it can find it. +# +# For example, +# +# find_helper uzip /path/to/helpers/dir +# +# prints: +# +# /usr/bin/perl -w /path/to/helpers/dir/uzip +# +# Since helpers in the build tree don't yet have executable bit set, we +# need to extract the shebang line. +# +find_helper() { + local helper_name="$1" + local dir="$2" + + local try="$dir/$helper_name" + if [ -f "$try" ]; then + helper_CMD="$(head -1 $try | cut -c 3-) $try" # reason #1 we don't allow spaces in pathnames. + true + else + false + fi +} + +# +# Returns the path of 'config.sh'. +# +path_of_config_sh() { + echo "$data_build_dir/config.sh" +} + +# +# Export variables to be used by tests. +# +# See README for their documentation. +# +export_useful_variables() { + local input="$1" + + # Frequently used variables: + MC_TEST_EXTFS_LIST_CMD="mc_xcat $input" # reason #2 we don't allow spaces in pathnames. + export MC_TEST_EXTFS_LIST_CMD + + # Infrequently used variables: + MC_TEST_EXTFS_INPUT=$input + export MC_TEST_EXTFS_INPUT + MC_TEST_EXTFS_DATA_DIR=$data_dir + export MC_TEST_EXTFS_DATA_DIR + MC_TEST_EXTFS_DATA_BUILD_DIR=$data_build_dir + export MC_TEST_EXTFS_DATA_BUILD_DIR + MC_TEST_EXTFS_CONFIG_SH=$(path_of_config_sh) + export MC_TEST_EXTFS_CONFIG_SH +} + +# +# The crux of this program. +# +run() { + + local error_count=0 + local pass_count=0 + + for input in "$data_dir"/*.input; do + + has_string "$input" '\*' && break # we can't use 'shopt -s nullglob' as it's bash-specific. + + header "Testing $input" + + has_string "$input" " " && die "Error: filename contains spaces." + + # + # Set up variables: + # + + local helper_name="$(basename_sans_extensions "$input")" + local expected_parsed_output="${input%.input}.output" + local env_vars_file="${input%.input}.env_vars" + local args_file="${input%.input}.args" + + local do_create_output=no + + if [ ! -f "$expected_parsed_output" ]; then + # Corresponding *.output file doesn't exist. We either create it, later, or exit with error. + if [ $opt_create_output = "yes" ]; then + do_create_output=yes + else + err + err "Missing file: '$expected_parsed_output'." + err "You have to create an '.output' file for each '.input' one." + err + notice "Tip: invoke this program with '--create-output' to" + notice "automatically create missing '.output' files." + notice + exit 1 + fi + fi + + find_helper "$helper_name" "$helpers_dir1" || + find_helper "$helper_name" "$helpers_dir2" || + die "I can't find helper '$helper_name' in either $helpers_dir1 or $helpers_dir2" + + local extra_parser_args="" + [ -f "$args_file" ] && extra_parser_args="$(cat "$args_file")" + + local actual_output="$(temp_file $helper_name.actual-output.XXXXXXXX)" + local actual_parsed_output="$(temp_file $helper_name.actual-parsed-output.XXXXXXXX)" + + # + # Variables are all set. Now do the actual stuff: + # + + ( + export_useful_variables "$input" + if [ -f "$env_vars_file" ]; then + set -a # "allexport: Export all variables assigned to." + . "$env_vars_file" + set +a + fi + $helper_CMD list /dev/null > "$actual_output" + ) + + error_count=$((error_count + 1)) # we'll decrement it later. + + if [ ! -s "$actual_output" ]; then + err + err "The helper '$helper_name' produced no output for this input. Something is wrong." + err + err "Make sure this helper supports testability: that it uses \$MC_TEST_EXTFS_LIST_CMD." + err + err "You may try running the helper yourself with:" + err + err " \$ MC_TEST_EXTFS_LIST_CMD=\"mc_xcat $input\" \\" + err " $helper_CMD list /dev/null" + err + continue + fi + + # '--symbolic-ids': uid/gid aren't portable between computers, + # of course, so we always represent them symbolically when possible. + if ! mc_parse_ls_l --symbolic-ids $extra_parser_args "$actual_output" > "$actual_parsed_output"; then + err + err "ERROR: Parsing of the output of the helper '$helper_name' has failed." + err "This means that $helper_name has produced output that MC won't be able to parse." + err "Run the parsing command yourself ('mc_parse_ls_l $extra_parser_args $actual_output')" + err "to figure out the problem." + err + continue + fi + + if [ $do_create_output = "yes" ]; then + # We arrive here if we were invoked with '--create-output' and + # the .output file doesn't exist. We create it and move to the next iteration. + cp "$actual_parsed_output" "$expected_parsed_output" + notice "The output file has been created in $expected_parsed_output" + continue + fi + + if ! cmp "$expected_parsed_output" "$actual_parsed_output"; then + err + err "ERROR: $helper_name has produced output that's different than the expected output." + err + err " Expected output (after parsing): $expected_parsed_output" + err " Actual output (after parsing): $actual_parsed_output" + err + err "This might mean that a bug was introduced into $helper_name. Or that a bug was fixed." + err "Please compare the files." + err + err "If the actual output is the correct one, just copy the latter file" + err "onto the former (and commit to the git repository)." + err + if is_interactive; then + if [ $opt_run_mcdiff_on_error = "yes" ]; then + notice "Hit ENTER to launch mcdiff ..." + read dummy_var # dash needs this. + ${MCDIFF:-mcdiff} "$expected_parsed_output" "$actual_parsed_output" + else + notice "Tip: invoke this program with '--mcdiff' to automatically launch" + notice "mcdiff to visually inspect the diff." + notice + notice "(Running this program non-interactively (i.e., redirecting the" + notice "output to a file or pipe) automatically adds diff to the output.)" + notice + fi + else + err "------------ diff of the expected output vs the actual output: -------------" + diff -U2 "$expected_parsed_output" "$actual_parsed_output" + err "------------------------------- end of diff --------------------------------" + fi + continue + fi + + rm "$actual_output" "$actual_parsed_output" + + error_count=$((error_count - 1)) # cancel the earlier "+1". + pass_count=$((pass_count + 1)) + + success "PASSED." + + done + + [ $pass_count = "0" -a $error_count = "0" ] && notice "Note: The data directory contains no *.input files." + + [ $error_count = "0" ] # exit status of function. +} + +parse_command_line_arguments() { + # We want --long-options, so we don't use 'getopts'. + while [ -n "$1" ]; do + case "$1" in + --data-dir) + data_dir=$2 + shift 2 + ;; + --data-build-dir) + data_build_dir=$2 + shift 2 + ;; + --helpers-dir) + if [ -z "$helpers_dir1" ]; then + helpers_dir1=$2 + else + helpers_dir2=$2 + fi + shift 2 + ;; + --create-output) + opt_create_output=yes + shift + ;; + --mcdiff) + opt_run_mcdiff_on_error=yes + shift + ;; + --help|-h) + help + exit + ;; + *) + die "Unknown command-line option $1" + ;; + esac + done +} + +# +# Check that everything is set up correctly. +# +verify_setup() { + [ -n "$data_dir" ] || die "You didn't specify the data dir (--data-dir). Run me with --help for info." + [ -n "$data_build_dir" ] || die "You didn't specify the data build dir (--data-build-dir). Run me with --help for info." + [ -n "$helpers_dir1" ] || die "You didn't specify the helpers dir (--helpers-dir). Run me with --help for info." + [ -z "$helpers_dir2" ] && helpers_dir2=$helpers_dir1 # we're being lazy. + + local dir + for dir in "$data_dir" "$data_build_dir" "$helpers_dir1" "$helpers_dir2"; do + assert_dir_exists "$dir" + has_string "$dir" " " && die "$dir: Sorry, spaces aren't allowed in pathnames." # search "reason", twice, above. + done + + [ -e "$(path_of_config_sh)" ] || die "Missing file $(path_of_config_sh). You probably have a mistake in the '--data-build-dir' path." + + local missing_progs="" + check_prog() { + if ! has_prog "$1"; then + err "I can't see the program '$1'." + missing_progs="${missing_progs}${missing_progs:+ and }'$1'" + fi + } + + check_prog "mc_parse_ls_l" + check_prog "mc_xcat" + check_prog "mktemp" # non-POSIX + [ -z "$missing_progs" ] || die "You need to add to your PATH the directories containing the executables $missing_progs." +} + +main() { + init_colors + parse_command_line_arguments "$@" + verify_setup + run # being the last command executed, its exit status is that of this whole script. +} + +main "$@" diff --git a/tests/src/vfs/ftpfs/Makefile.am b/tests/src/vfs/ftpfs/Makefile.am new file mode 100644 index 0000000..294604b --- /dev/null +++ b/tests/src/vfs/ftpfs/Makefile.am @@ -0,0 +1,32 @@ +PACKAGE_STRING = "/src/vfs/ftpfs" + +AM_CPPFLAGS = \ + $(GLIB_CFLAGS) \ + -DTEST_DATA_DIR=\"$(abs_srcdir)/data\" \ + -I$(top_srcdir) \ + -I$(top_srcdir)/lib/vfs \ + @CHECK_CFLAGS@ + +AM_LDFLAGS = @TESTS_LDFLAGS@ + +LIBS = @CHECK_LIBS@ \ + $(top_builddir)/src/libinternal.la \ + $(top_builddir)/lib/libmc.la + +if ENABLE_MCLIB +LIBS += $(GLIB_LIBS) +endif + +EXTRA_DIST = \ + data/aix_list.input \ + data/aix_list.output \ + data/ms_list.input \ + data/ms_list.output + +TESTS = \ + ftpfs_parse_long_list + +check_PROGRAMS = $(TESTS) + +ftpfs_parse_long_list_SOURCES = \ + ftpfs_parse_long_list.c diff --git a/tests/src/vfs/ftpfs/Makefile.in b/tests/src/vfs/ftpfs/Makefile.in new file mode 100644 index 0000000..12b61ea --- /dev/null +++ b/tests/src/vfs/ftpfs/Makefile.in @@ -0,0 +1,1123 @@ +# Makefile.in generated by automake 1.16.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2021 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@ENABLE_MCLIB_TRUE@am__append_1 = $(GLIB_LIBS) +TESTS = ftpfs_parse_long_list$(EXEEXT) +check_PROGRAMS = $(am__EXEEXT_1) +subdir = tests/src/vfs/ftpfs +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/m4.include/gnulib/mode_t.m4 \ + $(top_srcdir)/m4.include/gnulib/stat-size.m4 \ + $(top_srcdir)/m4.include/gnulib/fstypename.m4 \ + $(top_srcdir)/m4.include/gnulib/fsusage.m4 \ + $(top_srcdir)/m4.include/gnulib/mountlist.m4 \ + $(top_srcdir)/m4.include/gnulib/windows-stat-inodes.m4 \ + $(top_srcdir)/m4.include/gnulib/sys_types_h.m4 \ + $(top_srcdir)/m4.include/ax_path_lib_pcre.m4 \ + $(top_srcdir)/m4.include/ax_check_pcre2.m4 \ + $(top_srcdir)/m4.include/dx_doxygen.m4 \ + $(top_srcdir)/m4.include/ax_require_defined.m4 \ + $(top_srcdir)/m4.include/ax_check_compile_flag.m4 \ + $(top_srcdir)/m4.include/ax_append_flag.m4 \ + $(top_srcdir)/m4.include/ax_append_compile_flags.m4 \ + $(top_srcdir)/m4.include/mc-cflags.m4 \ + $(top_srcdir)/m4.include/ax_gcc_func_attribute.m4 \ + $(top_srcdir)/m4.include/mc-check-search-type.m4 \ + $(top_srcdir)/m4.include/mc-get-fs-info.m4 \ + $(top_srcdir)/m4.include/mc-with-x.m4 \ + $(top_srcdir)/m4.include/mc-use-termcap.m4 \ + $(top_srcdir)/m4.include/mc-with-screen.m4 \ + $(top_srcdir)/m4.include/mc-with-screen-ncurses.m4 \ + $(top_srcdir)/m4.include/mc-with-screen-slang.m4 \ + $(top_srcdir)/m4.include/mc-with-internal-edit.m4 \ + $(top_srcdir)/m4.include/mc-subshell.m4 \ + $(top_srcdir)/m4.include/mc-background.m4 \ + $(top_srcdir)/m4.include/mc-ext2fs-attr.m4 \ + $(top_srcdir)/m4.include/mc-glib.m4 \ + $(top_srcdir)/m4.include/mc-vfs.m4 \ + $(top_srcdir)/m4.include/vfs/rpc.m4 \ + $(top_srcdir)/m4.include/vfs/socket.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-extfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-sfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-ftp.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-sftp.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-fish.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-undelfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-tarfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-cpiofs.m4 \ + $(top_srcdir)/m4.include/mc-version.m4 \ + $(top_srcdir)/m4.include/mc-tests.m4 \ + $(top_srcdir)/m4.include/mc-i18n.m4 \ + $(top_srcdir)/m4.include/mc-assert.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__EXEEXT_1 = ftpfs_parse_long_list$(EXEEXT) +am_ftpfs_parse_long_list_OBJECTS = ftpfs_parse_long_list.$(OBJEXT) +ftpfs_parse_long_list_OBJECTS = $(am_ftpfs_parse_long_list_OBJECTS) +ftpfs_parse_long_list_LDADD = $(LDADD) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/ftpfs_parse_long_list.Po +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(ftpfs_parse_long_list_SOURCES) +DIST_SOURCES = $(ftpfs_parse_long_list_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red='[0;31m'; \ + grn='[0;32m'; \ + lgn='[1;32m'; \ + blu='[1;34m'; \ + mgn='[0;35m'; \ + brg='[1m'; \ + std='[m'; \ + fi; \ +} +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ + $(top_srcdir)/config/test-driver +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +COM_ERR_CFLAGS = @COM_ERR_CFLAGS@ +COM_ERR_LIBS = @COM_ERR_LIBS@ +CP1251 = @CP1251@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DOC_LINGUAS = @DOC_LINGUAS@ +DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +DX_CONFIG = @DX_CONFIG@ +DX_DOCDIR = @DX_DOCDIR@ +DX_DOT = @DX_DOT@ +DX_DOXYGEN = @DX_DOXYGEN@ +DX_DVIPS = @DX_DVIPS@ +DX_EGREP = @DX_EGREP@ +DX_ENV = @DX_ENV@ +DX_FLAG_chi = @DX_FLAG_chi@ +DX_FLAG_chm = @DX_FLAG_chm@ +DX_FLAG_doc = @DX_FLAG_doc@ +DX_FLAG_dot = @DX_FLAG_dot@ +DX_FLAG_html = @DX_FLAG_html@ +DX_FLAG_man = @DX_FLAG_man@ +DX_FLAG_pdf = @DX_FLAG_pdf@ +DX_FLAG_ps = @DX_FLAG_ps@ +DX_FLAG_rtf = @DX_FLAG_rtf@ +DX_FLAG_xml = @DX_FLAG_xml@ +DX_HHC = @DX_HHC@ +DX_LATEX = @DX_LATEX@ +DX_MAKEINDEX = @DX_MAKEINDEX@ +DX_PDFLATEX = @DX_PDFLATEX@ +DX_PERL = @DX_PERL@ +DX_PROJECT = @DX_PROJECT@ +E2P_CFLAGS = @E2P_CFLAGS@ +E2P_LIBS = @E2P_LIBS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ETAGS = @ETAGS@ +EXEEXT = @EXEEXT@ +EXT2FS_CFLAGS = @EXT2FS_CFLAGS@ +EXT2FS_LIBS = @EXT2FS_LIBS@ +EXTHELPERSDIR = @EXTHELPERSDIR@ +FGREP = @FGREP@ +FILECMD = @FILECMD@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ +GMODULE_CFLAGS = @GMODULE_CFLAGS@ +GMODULE_LIBS = @GMODULE_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +HAVE_FILECMD = @HAVE_FILECMD@ +HAVE_ZIPINFO = @HAVE_ZIPINFO@ +HAVE_nroff = @HAVE_nroff@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBMC_RELEASE = @LIBMC_RELEASE@ +LIBMC_VERSION = @LIBMC_VERSION@ +LIBOBJS = @LIBOBJS@ +LIBS = @CHECK_LIBS@ $(top_builddir)/src/libinternal.la \ + $(top_builddir)/lib/libmc.la $(am__append_1) +LIBSSH_CFLAGS = @LIBSSH_CFLAGS@ +LIBSSH_LIBS = @LIBSSH_LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANDOC = @MANDOC@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_DATE = @MAN_DATE@ +MAN_FLAGS = @MAN_FLAGS@ +MAN_VERSION = @MAN_VERSION@ +MCLIBS = @MCLIBS@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = "/src/vfs/ftpfs" +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCRE_CFLAGS = @PCRE_CFLAGS@ +PCRE_LIBS = @PCRE_LIBS@ +PERL = @PERL@ +PERL_FOR_BUILD = @PERL_FOR_BUILD@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POSUB = @POSUB@ +PYTHON = @PYTHON@ +RANLIB = @RANLIB@ +RUBY = @RUBY@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SLANG_CFLAGS = @SLANG_CFLAGS@ +SLANG_LIBS = @SLANG_LIBS@ +STRIP = @STRIP@ +TESTS_LDFLAGS = @TESTS_LDFLAGS@ +UNZIP = @UNZIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +X11_WWW = @X11_WWW@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +ZIP = @ZIP@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AM_CPPFLAGS = \ + $(GLIB_CFLAGS) \ + -DTEST_DATA_DIR=\"$(abs_srcdir)/data\" \ + -I$(top_srcdir) \ + -I$(top_srcdir)/lib/vfs \ + @CHECK_CFLAGS@ + +AM_LDFLAGS = @TESTS_LDFLAGS@ +EXTRA_DIST = \ + data/aix_list.input \ + data/aix_list.output \ + data/ms_list.input \ + data/ms_list.output + +ftpfs_parse_long_list_SOURCES = \ + ftpfs_parse_long_list.c + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/src/vfs/ftpfs/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu tests/src/vfs/ftpfs/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +ftpfs_parse_long_list$(EXEEXT): $(ftpfs_parse_long_list_OBJECTS) $(ftpfs_parse_long_list_DEPENDENCIES) $(EXTRA_ftpfs_parse_long_list_DEPENDENCIES) + @rm -f ftpfs_parse_long_list$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ftpfs_parse_long_list_OBJECTS) $(ftpfs_parse_long_list_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftpfs_parse_long_list.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + elif test -n "$$redo_logs"; then \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: $(check_PROGRAMS) + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +ftpfs_parse_long_list.log: ftpfs_parse_long_list$(EXEEXT) + @p='ftpfs_parse_long_list$(EXEEXT)'; \ + b='ftpfs_parse_long_list'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/ftpfs_parse_long_list.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/ftpfs_parse_long_list.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \ + check-am clean clean-checkPROGRAMS clean-generic clean-libtool \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + recheck tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/tests/src/vfs/ftpfs/data/aix_list.input b/tests/src/vfs/ftpfs/data/aix_list.input new file mode 100644 index 0000000..9296955 --- /dev/null +++ b/tests/src/vfs/ftpfs/data/aix_list.input @@ -0,0 +1,96 @@ +-rw-rw---- 1 darkna promak 6624 Jun 26 10:21 ${plktmp}ddd +-rw-rw---- 1 brydro promak 0 Mar 11 2007 * +drwxrws--- 3 promak promak 256 Oct 01 2007 .cpan +-rwxr----- 1 promak promak 879 Aug 13 2009 .profile +-rw------- 1 promak promak 6344 Jul 05 00:11 .sh_history +drwx--S--- 2 promak promak 256 Jan 23 2009 .ssh +-rw------- 1 promak promak 277 Jun 30 00:41 .vi_history +drwxrwsrwx 21 promak promak 4096 Dec 22 2010 A +drwxrws--- 104 promak promak 16384 May 25 20:37 JP +drwxrws--- 3 promak promak 4096 Feb 01 14:43 MDM +drwx--x--- 2 promak promak 256 Mar 12 2007 Mail +drwxrws--- 22 promak promak 4096 Jun 28 18:09 N +drwxrws--- 26 promak promak 4096 May 25 23:20 O +drwxrws--- 10 promak promak 4096 Jun 21 10:18 PB +drwxrws--- 4 promak promak 4096 Aug 12 2009 S +drwxr-s--- 13 promak promak 4096 Nov 26 2009 TECH +-rw-rw---- 1 matpil promak 0 Jul 05 09:10 TMP_FILED +-rw-rw---- 1 promak promak 2808 Sep 05 2011 ala.txt +-rw-rw---- 1 promak promak 228 Apr 16 2009 archiwum.log +drwxr-s--- 2 promak promak 256 Mar 23 2011 bin +-rw-rw---- 1 brydro promak 69 Apr 25 14:23 brydro20120425122315.txt +-rw-rw---- 1 darkna promak 0 Jul 03 08:15 core +-rw-rw---- 1 promak promak 2664 Jul 31 2007 dupadupa.sql +-rwxr-x--- 1 promak promak 7340 Aug 25 2007 dupkop.sh +-rw-rw---- 1 promak promak 16365 Jul 19 2010 duppppa +drwxr-s--- 2 promak promak 256 Jun 22 2011 err.log +-rw-rw---- 1 promak promak 0 Mar 12 2007 err_bkx +drwxr-s--- 2 promak promak 4096 Aug 12 2009 etc +-rw-rw-r-- 1 promak promak 94 Feb 21 09:18 ftp594398.cfg +-rw-r----- 1 promak promak 2855 Apr 22 2009 goenv_arch +-rw-r----- 1 promak promak 2875 Aug 12 2009 goenv_nsdr +-rw-r----- 1 promak promak 2821 Aug 12 2009 goenv_optksg +-rw-r----- 1 promak promak 10691433 Mar 01 14:22 ike.elg +-rw-rw---- 1 promak promak 32136 Mar 20 11:14 index.html +drwxrws--- 65 promak promak 4096 Mar 01 12:38 jkk +-rw-r----- 1 promak promak 55 Feb 22 2011 jkk.awk +-rw-rw---- 1 matpil promak 64 Jul 04 19:19 jkk.log +-rw-rw---- 1 promak promak 338 Mar 12 2007 jkkver.sh +-rw-rw---- 1 matpil promak 12 Jun 13 12:37 jpdatatmp.txt +-rw-rw---- 1 promak promak 132 Jun 25 2010 jpsir.log +-rw-r----- 1 promak promak 3 Mar 12 2007 koniecstrony +-rw-rw-rw- 1 promak promak 64 Jul 04 17:38 ksg_kart_drw.unl +-rw-rw---- 1 promak promak 190 Aug 17 2009 ksg_kartpw.test.unl +drwxr-s--- 2 promak promak 256 Aug 28 2009 libsh +drwxr-xr-x 2 root system 256 Mar 06 2007 lost+found +-rw-rw---- 1 matpil promak 69 Mar 27 19:57 matpil20120327175745.txt +-rw-rw---- 1 matpil promak 81 May 14 19:57 matpil20120514175733.txt +-rw------- 1 promak promak 10743 Aug 13 2009 mbox +-rwxr-x--- 1 promak promak 68 Mar 12 2007 odproappl +-rw-rw---- 1 promak promak 83 Nov 19 2010 papier_notow.sql +-rw-rw-r-- 1 promak promak 1785 Jun 14 2011 plikwyj.txt +-rw-r--r-- 1 promak promak 8477579 Jul 02 23:24 proappl.err +-rwx------ 1 promak promak 1957 Aug 24 2009 proappl.sh +-rwx------ 1 promak promak 674 Mar 12 2007 proappl2f80 +-rwx------ 1 promak promak 9272 Mar 28 2007 prokop.bkp +-rwx------ 1 promak promak 1107611 Jul 04 22:57 prokop.log +-rw-r--r-- 1 promak promak 20194873 Jul 04 23:23 prokop.promak +-rwxr-x--- 1 promak promak 8769 May 09 18:17 prokop.sh +-rwx------ 1 promak promak 8072 Jun 26 2010 prokop.sh.old +-rw-r--r-- 1 promak promak 345415 Jun 30 22:25 prokop.wsunle +-rwx------ 1 promak promak 6004 Mar 12 2007 prokop2 +-rwx------ 1 promak promak 6169 Mar 12 2007 prokopF50 +-rwx------ 1 promak promak 6156 Mar 12 2007 prokopF80 +-rw-rw---- 1 promak promak 0 Aug 12 2010 promak +-rwx------ 1 promak promak 201476 Jul 04 23:06 promak.log +-rw-rw---- 1 promak promak 4594135 Aug 12 2009 promak_pliki.txt +-rw-r--r-- 1 promak promak 222319 Jul 05 09:05 promonusr.err +-rwx------ 1 promak promak 334 Apr 22 2009 promonusr.sh +-rw-r--r-- 1 promak promak 7058202 Jul 05 06:07 prostat.err +-rwx------ 1 promak promak 525 Sep 19 2009 prostat.sh +-rw-r--r-- 1 promak promak 536893 Jul 04 19:15 prowsunle.err +-rwx------ 1 promak promak 868 Nov 27 2008 prowsunle.sh +-rw-rw---- 1 barros promak 0 Jul 14 2010 salda_z_bazy +-rw-rw---- 1 promak promak 1932 Jun 19 13:00 smit.log +-rw-rw---- 1 promak promak 908 Jun 19 13:00 smit.script +-rw-rw---- 1 promak promak 1174 Jun 19 13:00 smit.transaction +-rw-rw-rw- 1 promak promak 613 Jun 20 2011 sqexplain.out +-rwxr-xr-x 1 promak promak 45 Mar 12 2007 srozl.sh +-rwxr-x--- 1 promak promak 1602 Aug 12 2009 taruj.sh +-rw-rw---- 1 darkna promak 1270950 Jan 23 16:41 tax_dznk_nz.unl +drwxrws--- 14 promak promak 4096 Aug 04 2009 temp +drwxrwx--- 3 promak promak 4096 Mar 23 2011 tmp +-rw-rw---- 1 promak promak 75 Jul 22 2010 tmp_drw_pwnul.unl +-rw-rw-rw- 1 promak promak 104 Jul 04 17:38 tmp_konta4nik.unl +-rw-rw-rw- 1 promak promak 196 Jun 11 09:29 tmpa_drw_portfel09:29:44.774 +-rw-rw-rw- 1 promak promak 196 Jun 11 09:29 tmpa_drw_portfel09:29:44.967 +-rw-rw-rw- 1 promak promak 0 Jun 11 09:29 tmpa_drw_portfel_pw09:29:44.774 +-rw-rw-rw- 1 promak promak 0 Jun 11 09:29 tmpa_drw_portfel_pw09:29:44.967 +-rw-rw-rw- 1 promak promak 3293 Jun 11 09:29 tmpa_drw_pw09:29:44.774 +-rw-rw-rw- 1 promak promak 3293 Jun 11 09:29 tmpa_drw_pw09:29:44.967 +-rwxr-x--- 1 promak promak 1562 Dec 04 2009 ws_go +-rwxr-x--- 1 promak promak 406 Aug 14 2009 ws_off +-rw-rw---- 1 promak promak 41803 Jun 30 22:13 wsunle.log +-rw-r--r-- 1 promak promak 1601 Apr 04 2007 wsunload.err +-rw-rw---- 1 promak promak 129 Mar 29 2011 zagraniczne.log +-rw-r----- 1 promak promak 57 Mar 12 2007 zrestartuj_informixa diff --git a/tests/src/vfs/ftpfs/data/aix_list.output b/tests/src/vfs/ftpfs/data/aix_list.output new file mode 100644 index 0000000..144d1a7 --- /dev/null +++ b/tests/src/vfs/ftpfs/data/aix_list.output @@ -0,0 +1,96 @@ +${plktmp}ddd +* +.cpan +.profile +.sh_history +.ssh +.vi_history +A +JP +MDM +Mail +N +O +PB +S +TECH +TMP_FILED +ala.txt +archiwum.log +bin +brydro20120425122315.txt +core +dupadupa.sql +dupkop.sh +duppppa +err.log +err_bkx +etc +ftp594398.cfg +goenv_arch +goenv_nsdr +goenv_optksg +ike.elg +index.html +jkk +jkk.awk +jkk.log +jkkver.sh +jpdatatmp.txt +jpsir.log +koniecstrony +ksg_kart_drw.unl +ksg_kartpw.test.unl +libsh +lost+found +matpil20120327175745.txt +matpil20120514175733.txt +mbox +odproappl +papier_notow.sql +plikwyj.txt +proappl.err +proappl.sh +proappl2f80 +prokop.bkp +prokop.log +prokop.promak +prokop.sh +prokop.sh.old +prokop.wsunle +prokop2 +prokopF50 +prokopF80 +promak +promak.log +promak_pliki.txt +promonusr.err +promonusr.sh +prostat.err +prostat.sh +prowsunle.err +prowsunle.sh +salda_z_bazy +smit.log +smit.script +smit.transaction +sqexplain.out +srozl.sh +taruj.sh +tax_dznk_nz.unl +temp +tmp +tmp_drw_pwnul.unl +tmp_konta4nik.unl +tmpa_drw_portfel09:29:44.774 +tmpa_drw_portfel09:29:44.967 +tmpa_drw_portfel_pw09:29:44.774 +tmpa_drw_portfel_pw09:29:44.967 +tmpa_drw_pw09:29:44.774 +tmpa_drw_pw09:29:44.967 +ws_go +ws_off +wsunle.log +wsunload.err +zagraniczne.log +zrestartuj_informixa diff --git a/tests/src/vfs/ftpfs/data/ms_list.input b/tests/src/vfs/ftpfs/data/ms_list.input new file mode 100644 index 0000000..e9d6bc5 --- /dev/null +++ b/tests/src/vfs/ftpfs/data/ms_list.input @@ -0,0 +1,11 @@ +10-15-13 10:08AM <DIR> analytics +05-27-14 05:16AM <DIR> aspnet_client +11-20-14 12:36PM 161645801 DiscIntercity.tsv +11-20-14 12:47PM 2031110 DiscLocal.tsv +03-22-15 01:15PM <DIR> INC0023508 +12-23-14 12:35PM 3403603000 Initial_KPI_20141223_62808477.CSV +10-14-13 04:07PM <DIR> segment +11-20-14 02:54AM 399282436 SSUnlimAll.tsv +10-14-13 04:07PM <DIR> subscriber +03-22-15 05:51PM <DIR> tmp +11-20-14 11:45AM 773305597 UnlimOnnet.tsv diff --git a/tests/src/vfs/ftpfs/data/ms_list.output b/tests/src/vfs/ftpfs/data/ms_list.output new file mode 100644 index 0000000..147ef83 --- /dev/null +++ b/tests/src/vfs/ftpfs/data/ms_list.output @@ -0,0 +1,11 @@ +analytics +aspnet_client +DiscIntercity.tsv +DiscLocal.tsv +INC0023508 +Initial_KPI_20141223_62808477.CSV +segment +SSUnlimAll.tsv +subscriber +tmp +UnlimOnnet.tsv diff --git a/tests/src/vfs/ftpfs/ftpfs_parse_long_list.c b/tests/src/vfs/ftpfs/ftpfs_parse_long_list.c new file mode 100644 index 0000000..2943364 --- /dev/null +++ b/tests/src/vfs/ftpfs/ftpfs_parse_long_list.c @@ -0,0 +1,167 @@ +/* src/vfs/ftpfs - tests for ftpfs_parse_long_list() function. + + Copyright (C) 2021-2023 + Free Software Foundation, Inc. + + Written by: + Andrew Borodin <aborodin@vmail.ru>, 2021 + + This file is part of the Midnight Commander. + + The Midnight Commander is free software: you can redistribute it + and/or modify 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. + + The Midnight Commander 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/>. + */ + +#define TEST_SUITE_NAME "/src/vfs/ftpfs" + +#include "tests/mctest.h" + +#include <stdio.h> + +#include "direntry.c" +#include "src/vfs/ftpfs/ftpfs_parse_ls.c" + +/* --------------------------------------------------------------------------------------------- */ + +static struct vfs_s_subclass ftpfs_subclass; +static struct vfs_class *me = VFS_CLASS (&ftpfs_subclass); + +static struct vfs_s_super *super; + +/* --------------------------------------------------------------------------------------------- */ + +/* @Before */ +static void +setup (void) +{ + vfs_init_subclass (&ftpfs_subclass, "ftpfs", VFSF_NOLINKS | VFSF_REMOTE | VFSF_USETMP, "ftp"); + + super = vfs_s_new_super (me); + super->name = g_strdup (PATH_SEP_STR); + super->root = vfs_s_new_inode (me, super, vfs_s_default_stat (me, S_IFDIR | 0755)); +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @After */ +static void +teardown (void) +{ + vfs_s_free_super (me, super); +} + +/* --------------------------------------------------------------------------------------------- */ + +static GSList * +read_list (const char *fname) +{ + FILE *f; + char buf[BUF_MEDIUM]; + GSList *ret = NULL; + + f = fopen (fname, "r"); + if (f == NULL) + return NULL; + + while (fgets (buf, sizeof (buf), f) != NULL) + ret = g_slist_prepend (ret, g_strdup (buf)); + + fclose (f); + + return ret; +} + +/* --------------------------------------------------------------------------------------------- */ + +/* @DataSource("test_ftpfs_parse_long_list_ds") */ +/* *INDENT-OFF* */ +static const struct test_ftpfs_parse_long_list_ds +{ + const char *name; +} test_ftpfs_parse_long_list_ds[] = +{ + { /* 0. Ticket #2841 */ + "aix" + }, + { /* 1. Ticket #3174 */ + "ms" + } +}; +/* *INDENT-ON* */ + +/* @Test(dataSource = "test_ftpfs_parse_long_list_ds") */ +/* *INDENT-OFF* */ +START_PARAMETRIZED_TEST (test_ftpfs_parse_long_list, test_ftpfs_parse_long_list_ds) +/* *INDENT-ON* */ +{ + /* given */ + char *name; + GSList *input, *parsed, *output; + GSList *parsed_iter, *output_iter; + int err_count; + + /* when */ + name = g_strdup_printf ("%s/%s_list.input", TEST_DATA_DIR, data->name); + input = read_list (name); + g_free (name); + mctest_assert_not_null (input); + + name = g_strdup_printf ("%s/%s_list.output", TEST_DATA_DIR, data->name); + output = read_list (name); + g_free (name); + mctest_assert_not_null (output); + + parsed = ftpfs_parse_long_list (me, super->root, input, &err_count); + + /* then */ + for (parsed_iter = parsed, output_iter = output; + parsed_iter != NULL && output_iter != NULL; + parsed_iter = g_slist_next (parsed_iter), output_iter = g_slist_next (output_iter)) + mctest_assert_str_eq (VFS_ENTRY (parsed_iter->data)->name, (char *) output_iter->data); + + mctest_assert_null (parsed_iter); + mctest_assert_null (output_iter); + + for (parsed_iter = parsed, output_iter = output; parsed_iter != NULL; + parsed_iter = g_slist_next (parsed_iter)) + vfs_s_free_entry (me, VFS_ENTRY (parsed_iter->data)); + + g_slist_free (parsed); + + g_slist_free_full (input, g_free); + g_slist_free_full (output, g_free); +} +/* *INDENT-OFF* */ +END_PARAMETRIZED_TEST +/* *INDENT-ON* */ + +/* --------------------------------------------------------------------------------------------- */ + +int +main (void) +{ + TCase *tc_core; + + tc_core = tcase_create ("Core"); + + tcase_add_checked_fixture (tc_core, setup, teardown); + + /* Add new tests here: *************** */ + mctest_add_parameterized_test (tc_core, test_ftpfs_parse_long_list, + test_ftpfs_parse_long_list_ds); + /* *********************************** */ + + return mctest_run_all (tc_core); +} + +/* --------------------------------------------------------------------------------------------- */ |