+2016-10-18 Bruno Haible <bruno@clisp.org>
+
+ getprogname tests: Avoid failure in packages that use libtool.
+ * tests/test-getprogname.c (main): Strip "lt-" prefix.
+ Based on a patch by Jim Meyering.
+
2016-10-16 Bruno Haible <bruno@clisp.org>
getprogname: Fix test failure on Cygwin. Comments.
{
char const *p = getprogname ();
+ /* libtool creates a temporary executable whose name is sometimes prefixed
+ with "lt-" (depends on the platform). But the name of the temporary
+ executable is a detail that should not be visible to the end user and to
+ the test suite. Remove this "lt-" prefix here. */
+ if (strncmp (p, "lt-", 3) == 0)
+ p += 3;
+
/* Note: You can make this test fail
a) by running it on a case-insensitive file system (such as on Windows,
Cygwin, or on Mac OS X with a case-insensitive HFS+ file system),