* tests/test-exclude.c (main): Skip tests that use FNM_CASEFOLD
and FNM_LEADING_DIR on systems that lack the definitions. This affects
at least Solaris 9. Reported and diagnosed by Dagobert Michelsen in
http://thread.gmane.org/gmane.comp.gnu.grep.bugs/3947/focus=3950
+2011-11-11 Jim Meyering <meyering@redhat.com>
+
+ test-exclude: skip tests rather than failing on deficient systems
+ * tests/test-exclude.c (main): Skip tests that use FNM_CASEFOLD
+ and FNM_LEADING_DIR on systems that lack the definitions. This affects
+ at least Solaris 9. Reported and diagnosed by Dagobert Michelsen in
+ http://thread.gmane.org/gmane.comp.gnu.grep.bugs/3947/focus=3950
+
2011-11-10 Bruno Haible <bruno@clisp.org>
ptsname_r test: Avoid gcc warning on glibc systems.
exclude_options &= ~flag;
else
exclude_options |= flag;
+
+ /* Skip this test if invoked with -leading-dir on a system that
+ lacks support for FNM_LEADING_DIR. */
+ if (strcmp (s, "leading-dir") == 0 && FNM_LEADING_DIR == 0)
+ exit (77);
+
+ /* Likewise for -casefold and FNM_CASEFOLD. */
+ if (strcmp (s, "casefold") == 0 && FNM_CASEFOLD == 0)
+ exit (77);
}
else if (add_exclude_file (add_exclude, exclude, opt,
exclude_options, '\n') != 0)