From: Stefano Lattarini Date: Fri, 12 Nov 2010 19:35:35 +0000 (+0100) Subject: Fix bug in test `backcompat6.test' (MSYS portability). X-Git-Tag: ng-0.5a~339^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b0f11b32ad032af887d3e783f6e01407b96de1f;p=thirdparty%2Fautomake.git Fix bug in test `backcompat6.test' (MSYS portability). * tests/backcompat6.test (Makefile.am): Grep the output from the test program, rather than diffing it, to avoid spurious failures on MinGW/MSYS due to LF vs. CRLF line endings. Reported by Ralf Wildenhues. --- diff --git a/ChangeLog b/ChangeLog index 5bc575b78..bf2e61761 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2010-11-12 Stefano Lattarini + + Fix bug in test `backcompat6.test' (MSYS portability). + * tests/backcompat6.test (Makefile.am): Grep the output from the + test program, rather than diffing it, to avoid spurious failures + on MinGW/MSYS due to LF vs. CRLF line endings. + Reported by Ralf Wildenhues. + 2010-11-09 Stefano Lattarini Fix bug in test `backcompat4.test' (stale autom4te cache). diff --git a/tests/backcompat6.test b/tests/backcompat6.test index 534ecb1b7..0d63bcc9a 100755 --- a/tests/backcompat6.test +++ b/tests/backcompat6.test @@ -53,19 +53,15 @@ END cat >> Makefile.am <<'END' bin_PROGRAMS = foo foo_SOURCES = quux.c -DISTCLEANFILES = *.tmp check-local: - rm -f exp got - echo 'PACKAGE = nonesuch-zardoz' > exp.tmp - echo 'VERSION = nonesuch-0.1' >> exp.tmp - echo 'PACKAGE = $(PACKAGE)' > got1.tmp - echo 'VERSION = $(VERSION)' >> got1.tmp - ./foo > got2.tmp - cat exp.tmp - cat got1.tmp - cat got2.tmp - diff exp.tmp got1.tmp - diff exp.tmp got2.tmp + test x'$(PACKAGE)' = x'nonesuch-zardoz' + test x'$(VERSION)' = x'nonesuch-0.1' + ./foo # for debugging + ## Do not anchor the regexps w.r.t. the end of line, because on + ## MinGW/MSYS, grep may assume LF line endings only, while our + ## `foo' program may generate CRLF line endings. + ./foo | grep '^PACKAGE = nonesuch-zardoz!' + ./foo | echo '^VERSION = nonesuch-0\.1!' END cat > quux.c <<'END' @@ -73,7 +69,7 @@ cat > quux.c <<'END' #include int main (void) { - printf("PACKAGE = %s\nVERSION = %s\n", PACKAGE, VERSION); + printf("PACKAGE = %s!\nVERSION = %s!\n", PACKAGE, VERSION); return 0; } END