From 4daf6a5b92ef5d5156dba5401ae231b0063e4692 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Fri, 10 Oct 2014 12:56:42 +0900 Subject: [PATCH] tests: Add test for Debian bug#764580 * gettext-tools/tests/autopoint-2: Check if m4_assert is properly redefined while tracing. --- gettext-tools/tests/ChangeLog | 6 ++++++ gettext-tools/tests/autopoint-2 | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/gettext-tools/tests/ChangeLog b/gettext-tools/tests/ChangeLog index 22fdc63c0..07fc0f861 100644 --- a/gettext-tools/tests/ChangeLog +++ b/gettext-tools/tests/ChangeLog @@ -1,3 +1,9 @@ +2014-10-10 Daiki Ueno + + tests: Add test for Debian bug#764580 + * autopoint-2: Check if m4_assert is properly redefined while + tracing. + 2014-10-08 Daiki Ueno tests: Improve test coverage of C and Vala scanners diff --git a/gettext-tools/tests/autopoint-2 b/gettext-tools/tests/autopoint-2 index 30cc4e0be..fe6ff9c68 100755 --- a/gettext-tools/tests/autopoint-2 +++ b/gettext-tools/tests/autopoint-2 @@ -136,3 +136,35 @@ test -f m4/po.m4 || exit 1 test -f po/Makefile.in.in || exit 1 rm -fr m4 po + +# Check for certain built-in macros are not in effect when tracing: +# +cat <configure.ac +AC_INIT +AC_CONFIG_SRCDIR(hello.c) + +dnl m4_shiftn internally calls m4_assert, which is disabled by autopoint +m4_define([_gt_recurse], +[m4_ifblank([\$1], , [_gt_recurse(m4_shiftn(1, \$@))])]) +_gt_recurse([a], [b], , [c]) + +AC_PROG_CC +AM_GNU_GETTEXT([external]) +AM_GNU_GETTEXT_VERSION([$required_gettext_version]) + +AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([po/Makefile.in]) +AC_OUTPUT +EOF + +$gettext_datadir/autopoint >/dev/null 2>autopoint.err +test $? = 0 || { cat autopoint.err; exit 1; } + +test ! -d intl || exit 1 +test -d m4 || exit 1 +test -d po || exit 1 + +test -f m4/po.m4 || exit 1 +test -f po/Makefile.in.in || exit 1 + +rm -fr m4 po -- 2.47.2