doc: rewrite the "Unusual File Names" section
[diffutils.git] / tests / Makefile.am
blobadbb10d40c78a35cdc10f17157a602b12b57088c
1 # tests for GNU diff
3 TESTS = \
4   basic \
5   bignum \
6   binary \
7   brief-vs-stat-zero-kernel-lies \
8   bug-64316 \
9   cmp \
10   colliding-file-names \
11   diff3 \
12   excess-slash \
13   expand-tabs \
14   help-version  \
15   ifdef \
16   invalid-re    \
17   function-line-vs-leading-space \
18   ignore-case \
19   ignore-matching-lines \
20   ignore-tab-expansion \
21   label-vs-func \
22   large-subopt \
23   new-file \
24   no-dereference \
25   no-newline-at-eof \
26   side-by-side \
27   starting-file \
28   stdin \
29   strcoll-0-names \
30   filename-quoting \
31   strip-trailing-cr \
32   timezone \
33   colors \
34   y2038-vs-32bit
36 XFAIL_TESTS = large-subopt
38 EXTRA_DIST = \
39   $(TESTS) init.cfg init.sh t-local.sh envvar-check \
40   large-subopt.in1 \
41   large-subopt.in2
43 # Note that the first lines are statements.  They ensure that environment
44 # variables that can perturb tests are unset or set to expected values.
45 # The rest are envvar settings that propagate build-related Makefile
46 # variables to test scripts.
47 TESTS_ENVIRONMENT =                                     \
48   tmp__=$${TMPDIR-/tmp};                                \
49   test -d "$$tmp__" && test -w "$$tmp__" || tmp__=.;    \
50   . $(srcdir)/envvar-check;                             \
51   TMPDIR=$$tmp__; export TMPDIR;                        \
52                                                         \
53   if test -n "$$BASH_VERSION" || (eval "export v=x") 2>/dev/null; then \
54     export_with_values () { export "$$@"; };            \
55   else                                                  \
56     export_with_values ()                               \
57     {                                                   \
58       sed_extract_var='s/=.*//';                        \
59       sed_quote_value="s/'/'\\\\''/g;s/=\\(.*\\)/='\\1'/";\
60       for arg in "$$@"; do                              \
61         var=`echo "$$arg" | sed "$$sed_extract_var"`;   \
62         arg=`echo "$$arg" | sed "$$sed_quote_value"`;   \
63         eval "$$arg";                                   \
64         export "$$var";                                 \
65       done;                                             \
66     };                                                  \
67   fi;                                                   \
68                                                         \
69   export_with_values                                    \
70   VERSION='$(VERSION)'                                  \
71   LOCALE_FR='$(LOCALE_FR)'                              \
72   LOCALE_FR_UTF8='$(LOCALE_FR_UTF8)'                    \
73   AWK=$(AWK)                                            \
74   GREP_OPTIONS=''                                       \
75   LC_ALL=C                                              \
76   abs_top_builddir='$(abs_top_builddir)'                \
77   abs_top_srcdir='$(abs_top_srcdir)'                    \
78   abs_srcdir='$(abs_srcdir)'                            \
79   built_programs="`$(built_programs)`"                  \
80   srcdir='$(srcdir)'                                    \
81   top_srcdir='$(top_srcdir)'                            \
82   CC='$(CC)'                                            \
83   DIFFUTILS_TEST_NAME=`echo $$tst|sed 's,^\./,,;s,/,-,g'` \
84   MAKE=$(MAKE)                                          \
85   MALLOC_PERTURB_=$(MALLOC_PERTURB_)                    \
86   PACKAGE_BUGREPORT='$(PACKAGE_BUGREPORT)'              \
87   PACKAGE_VERSION=$(PACKAGE_VERSION)                    \
88   PERL='$(PERL)'                                        \
89   SHELL='$(SHELL)'                                      \
90   PREFERABLY_POSIX_SHELL='$(PREFERABLY_POSIX_SHELL)'    \
91   REPLACE_GETCWD=$(REPLACE_GETCWD)                      \
92   PATH='$(abs_top_builddir)/src$(PATH_SEPARATOR)'"$$PATH"       \
93   ; 9>&2
95 LOG_COMPILER= $(SHELL)
97 built_programs =                                                        \
98   echo 'spy:;@echo $$(PROGRAMS)'                                        \
99     | { (cd ../src && MAKEFLAGS= $(MAKE) -s -f Makefile -f - spy)       \
100           | tr ' ' '\n'                                                 \
101           | sed '/^$$/d; s,$(EXEEXT)$$,,'                               \
102           | sort -u                                                     \
103           | tr '\n' ' '; echo; }                                        \
104     | sed 's/ $$//'
106 VERBOSE = yes