I'd like to add also the following "optimization" patch. Regards, Stefano
-*-*-*- Internationalization tests: prefer `make distdir' over `make dist'. Instead of running `make dist', then uncompressing the created tarball, and then grepping the uncompressed tar archive, we can simply run `make distdit' and anylize. This is both faster and cleaner. * tests/pot-msgidbugs.test: Test updated to use `make distdir' instead of `make dist' where possible. * tests/pot-no-linguas.test: Likewise. * tests/pot-override1.test: Likewise. * tests/pot-xgettext1.test: Likewise. * tests/pot-xgettext2.test: Likewise. * tests/pot-xgettext3.test: Likewise. * tests/pot-xgettext4.test: Likewise. * tests/pot-download1.test: Likewise, and check the created distdir instead of the distribution tarball (which is not even created anymore). ($distdir): New variable. * tests/pot-format-csharp1.test: Likewise. * tests/pot-format-java1.test: Likewise. * tests/pot-format-java2.test: Likewise. * tests/pot-format-qt1.test: Likewise. * tests/pot-format-tcl1.test: Likewise. * tests/pot-linguas.test: Likewise. * tests/pot-noinst.test: Likewise. * tests/pot-samedir.test: Likewise. * tests/pot-topsrcdir.test: Likewise.
From 8321a5638a17764849e259e12c4669fffb3d0dcc Mon Sep 17 00:00:00 2001 From: Stefano Lattarini <stefano.lattar...@gmail.com> Date: Mon, 6 Sep 2010 16:52:25 +0200 Subject: [PATCH] Internationalization tests: prefer `make distdir' over `make dist'. Instead of running `make dist', then uncompressing the created tarball, and then grepping the uncompressed tar archive, we can simply run `make distdit' and anylize. This is both faster and cleaner. * tests/pot-msgidbugs.test: Test updated to use `make distdir' instead of `make dist' where possible. * tests/pot-no-linguas.test: Likewise. * tests/pot-override1.test: Likewise. * tests/pot-xgettext1.test: Likewise. * tests/pot-xgettext2.test: Likewise. * tests/pot-xgettext3.test: Likewise. * tests/pot-xgettext4.test: Likewise. * tests/pot-download1.test: Likewise, and check the created distdir instead of the distribution tarball (which is not even created anymore). ($distdir): New variable. * tests/pot-format-csharp1.test: Likewise. * tests/pot-format-java1.test: Likewise. * tests/pot-format-java2.test: Likewise. * tests/pot-format-qt1.test: Likewise. * tests/pot-format-tcl1.test: Likewise. * tests/pot-linguas.test: Likewise. * tests/pot-noinst.test: Likewise. * tests/pot-samedir.test: Likewise. * tests/pot-topsrcdir.test: Likewise. --- ChangeLog | 27 +++++++++++++++++++++++++++ tests/pot-download1.test | 10 +++++----- tests/pot-format-csharp1.test | 27 ++++++++++++++------------- tests/pot-format-java1.test | 27 ++++++++++++++------------- tests/pot-format-java2.test | 27 ++++++++++++++------------- tests/pot-format-qt1.test | 27 ++++++++++++++------------- tests/pot-format-tcl1.test | 27 ++++++++++++++------------- tests/pot-linguas.test | 24 ++++++++++++------------ tests/pot-msgidbugs.test | 8 ++++---- tests/pot-no-linguas.test | 8 ++++---- tests/pot-noinst.test | 25 +++++++++++++------------ tests/pot-override1.test | 8 ++++---- tests/pot-samedir.test | 31 ++++++++++++++++--------------- tests/pot-topsrcdir.test | 25 +++++++++++++------------ tests/pot-xgettext1.test | 4 ++-- tests/pot-xgettext2.test | 4 ++-- tests/pot-xgettext3.test | 4 ++-- tests/pot-xgettext4.test | 4 ++-- 18 files changed, 176 insertions(+), 141 deletions(-) diff --git a/ChangeLog b/ChangeLog index 351324f..8bac14e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,32 @@ 2010-09-06 Stefano Lattarini <stefano.lattar...@gmail.com> + Internationalization tests: prefer `make distdir' over `make dist'. + Instead of running `make dist', then uncompressing the created + tarball, and then grepping the uncompressed tar archive, we can + simply run `make distdit' and anylize. This is both faster and + cleaner. + * tests/pot-msgidbugs.test: Test updated to use `make distdir' + instead of `make dist' where possible. + * tests/pot-no-linguas.test: Likewise. + * tests/pot-override1.test: Likewise. + * tests/pot-xgettext1.test: Likewise. + * tests/pot-xgettext2.test: Likewise. + * tests/pot-xgettext3.test: Likewise. + * tests/pot-xgettext4.test: Likewise. + * tests/pot-download1.test: Likewise, and check the created + distdir instead of the distribution tarball (which is not even + created anymore). + ($distdir): New variable. + * tests/pot-format-csharp1.test: Likewise. + * tests/pot-format-java1.test: Likewise. + * tests/pot-format-java2.test: Likewise. + * tests/pot-format-qt1.test: Likewise. + * tests/pot-format-tcl1.test: Likewise. + * tests/pot-linguas.test: Likewise. + * tests/pot-noinst.test: Likewise. + * tests/pot-samedir.test: Likewise. + * tests/pot-topsrcdir.test: Likewise. + Fixlets for internationalization tests. * tests/pot-copyright.test: Add trailing `:' command. Use `$MAKE', not bare `make'. diff --git a/tests/pot-download1.test b/tests/pot-download1.test index 01aead1..8198d7e 100755 --- a/tests/pot-download1.test +++ b/tests/pot-download1.test @@ -46,6 +46,8 @@ $ACLOCAL $AUTOMAKE -a $AUTOCONF +distdir=$me-1.0 + for builddir in . sub; do if test $builddir = '.'; then sourcedir='.' @@ -62,12 +64,10 @@ for builddir in . sub; do $MAKE install test -f "$instdir"/share/locale/de/LC_MESSAGES/clisp.mo - # Check that after "make dist", the tarball does not include the German + # Check that the distribution tarball does not include the German # translation. - $MAKE dist - gzip -d -c < pot-download1-1.0.tar.gz | tar tf - > filelist - grep '^pot-download1-1\.0/clisp-de\.po$' filelist && Exit 1 - rm -f filelist + $MAKE distdir + test ! -r $distdir/clisp-de.po # Sanity check. $MAKE distcheck diff --git a/tests/pot-format-csharp1.test b/tests/pot-format-csharp1.test index 1daf13f..7e85c4d 100755 --- a/tests/pot-format-csharp1.test +++ b/tests/pot-format-csharp1.test @@ -113,6 +113,8 @@ msgid "Hello, world!" msgstr "" END +distdir=$me-1.0 + for builddir in . sub; do for config_options in '' 'LINGUAS="es de"'; do if test $builddir = '.'; then @@ -166,11 +168,11 @@ for builddir in . sub; do test ! -f "$instdir"/share/locale/fr...@latin/LC_MESSAGES/foo-bar.mo test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo - # Check that "make dist" creates the expected .pot file. + # Check that "make distdir" creates the expected .pot file. rm -f $sourcedir/posub/foo-bar.pot - $MAKE dist + $MAKE distdir test -f $sourcedir/posub/foo-bar.pot test $builddir = '.' || test ! -f posub/foo-bar.pot @@ -189,17 +191,16 @@ for builddir in . sub; do # Check that the tarball contains posub/foo-bar-{de,fr}.{po,resources.dll} # but not the others, regardless whether LINGUAS was specified or not. - gzip -d -c < pot-format-csharp1-1.0.tar.gz | tar tf - > filelist - grep '^pot-format-csharp1-1\.0/posub/foo-bar-de\.po$' filelist - grep '^pot-format-csharp1-1\.0/posub/de/foo-bar\.resources\.dll$' filelist - grep '^pot-format-csharp1-1\.0/posub/foo-bar-fr...@latin\.po$' filelist - grep '^pot-format-csharp1-1\.0/posub/fr-CA-Latn/foo-bar\.resources\.dll$' filelist - grep '^pot-format-csharp1-1\.0/posub/foo-bar-es\.po$' filelist && Exit 1 - grep '^pot-format-csharp1-1\.0/posub/es/foo-bar\.resources\.dll$' filelist && Exit 1 - grep '^pot-format-csharp1-1\.0/posub/foo-bar-de\.mo$' filelist && Exit 1 - grep '^pot-format-csharp1-1\.0/posub/foo-bar-fr...@latin\.mo$' filelist && Exit 1 - grep '^pot-format-csharp1-1\.0/posub/foo-bar-es\.mo$' filelist && Exit 1 - rm -f filelist + test -d $distdir # sanity check + test -f $distdir/posub/foo-bar-de.po + test -f $distdir/posub/de/foo-bar.resources.dll + test -f $distdir/posub/foo-bar-fr...@latin.po + test -f $distdir/posub/fr-CA-Latn/foo-bar.resources.dll + test ! -r $distdir/posub/foo-bar-es.po + test ! -r $distdir/posub/es/foo-bar.resources.dll + test ! -r $distdir/posub/foo-bar-de.mo + test ! -r $distdir/posub/foo-bar-fr...@latin.mo + test ! -r $distdir/posub/foo-bar-es.mo # Sanity check. $MAKE distcheck diff --git a/tests/pot-format-java1.test b/tests/pot-format-java1.test index e148d43..c5fdfd4 100755 --- a/tests/pot-format-java1.test +++ b/tests/pot-format-java1.test @@ -114,6 +114,8 @@ msgid "Hello, world!" msgstr "" END +distdir=$me-1.0 + for builddir in . sub; do for config_options in '' 'LINGUAS="es de"'; do if test $builddir = '.'; then @@ -167,11 +169,11 @@ for builddir in . sub; do test ! -f "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.mo test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo - # Check that "make dist" creates the expected .pot file. + # Check that "make distdir" creates the expected .pot file. rm -f $sourcedir/posub/foo-bar.pot - $MAKE dist + $MAKE distdir test -f $sourcedir/posub/foo-bar.pot test $builddir = '.' || test ! -f posub/foo-bar.pot @@ -190,17 +192,16 @@ for builddir in . sub; do # Check that the tarball contains posub/foo-bar-{de,fr}.{po,properties} # but not the others, regardless whether LINGUAS was specified or not. - gzip -d -c < pot-format-java1-1.0.tar.gz | tar tf - > filelist - grep '^pot-format-java1-1\.0/posub/foo-bar-de\.po$' filelist - grep '^pot-format-java1-1\.0/posub/foo-bar_de\.properties$' filelist - grep '^pot-format-java1-1\.0/posub/foo-bar-fr\.po$' filelist - grep '^pot-format-java1-1\.0/posub/foo-bar_fr\.properties$' filelist - grep '^pot-format-java1-1\.0/posub/foo-bar-es\.po$' filelist && Exit 1 - grep '^pot-format-java1-1\.0/posub/foo-bar_es\.properties$' filelist && Exit 1 - grep '^pot-format-java1-1\.0/posub/foo-bar-de\.mo$' filelist && Exit 1 - grep '^pot-format-java1-1\.0/posub/foo-bar-fr\.mo$' filelist && Exit 1 - grep '^pot-format-java1-1\.0/posub/foo-bar-es\.mo$' filelist && Exit 1 - rm -f filelist + test -d $distdir # sanity check + test -f $distdir/posub/foo-bar-de.po + test -f $distdir/posub/foo-bar_de.properties + test -f $distdir/posub/foo-bar-fr.po + test -f $distdir/posub/foo-bar_fr.properties + test ! -r $distdir/posub/foo-bar-es.po + test ! -r $distdir/posub/foo-bar_es.properties + test ! -r $distdir/posub/foo-bar-de.mo + test ! -r $distdir/posub/foo-bar-fr.mo + test ! -r $distdir/posub/foo-bar-es.mo # Sanity check. $MAKE distcheck diff --git a/tests/pot-format-java2.test b/tests/pot-format-java2.test index ef60cf7..644bc47 100755 --- a/tests/pot-format-java2.test +++ b/tests/pot-format-java2.test @@ -114,6 +114,8 @@ msgid "Hello, world!" msgstr "" END +distdir=$me-1.0 + for builddir in . sub; do for config_options in '' 'LINGUAS="es de"'; do if test $builddir = '.'; then @@ -167,11 +169,11 @@ for builddir in . sub; do test ! -f "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.mo test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo - # Check that "make dist" creates the expected .pot file. + # Check that "make distdir" creates the expected .pot file. rm -f $sourcedir/posub/foo-bar.pot - $MAKE dist + $MAKE distdir test -f $sourcedir/posub/foo-bar.pot test $builddir = '.' || test ! -f posub/foo-bar.pot @@ -190,17 +192,16 @@ for builddir in . sub; do # Check that the tarball contains posub/foo-bar-{de,fr}.{po,class} but not # the others, regardless whether LINGUAS was specified or not. - gzip -d -c < pot-format-java2-1.0.tar.gz | tar tf - > filelist - grep '^pot-format-java2-1\.0/posub/foo-bar-de\.po$' filelist - grep '^pot-format-java2-1\.0/posub/foo-bar_de\.class$' filelist - grep '^pot-format-java2-1\.0/posub/foo-bar-fr\.po$' filelist - grep '^pot-format-java2-1\.0/posub/foo-bar_fr\.class$' filelist - grep '^pot-format-java2-1\.0/posub/foo-bar-es\.po$' filelist && Exit 1 - grep '^pot-format-java2-1\.0/posub/foo-bar_es\.class$' filelist && Exit 1 - grep '^pot-format-java2-1\.0/posub/foo-bar-de\.mo$' filelist && Exit 1 - grep '^pot-format-java2-1\.0/posub/foo-bar-fr\.mo$' filelist && Exit 1 - grep '^pot-format-java2-1\.0/posub/foo-bar-es\.mo$' filelist && Exit 1 - rm -f filelist + test -d $distdir # sanity check + test -f $distdir/posub/foo-bar-de.po + test -f $distdir/posub/foo-bar_de.class + test -f $distdir/posub/foo-bar-fr.po + test -f $distdir/posub/foo-bar_fr.class + test ! -r $distdir/posub/foo-bar-es.po + test ! -r $distdir/posub/foo-bar_es.class + test ! -r $distdir/posub/foo-bar-de.mo + test ! -r $distdir/posub/foo-bar-fr.mo + test ! -r $distdir/posub/foo-bar-es.mo # Sanity check. $MAKE distcheck diff --git a/tests/pot-format-qt1.test b/tests/pot-format-qt1.test index ca6da0b..c88f6cd 100755 --- a/tests/pot-format-qt1.test +++ b/tests/pot-format-qt1.test @@ -139,6 +139,8 @@ msgid "Hello, world!" msgstr "" END +distdir=$me-1.0 + for builddir in . sub; do for config_options in '' 'LINGUAS="es de"'; do if test $builddir = '.'; then @@ -190,11 +192,11 @@ for builddir in . sub; do test ! -f "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.mo test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo - # Check that "make dist" creates the expected .pot file. + # Check that "make distdir" creates the expected .pot file. rm -f $sourcedir/posub/foo-bar.pot - $MAKE dist + $MAKE distdir test -f $sourcedir/posub/foo-bar.pot test $builddir = '.' || test ! -f posub/foo-bar.pot @@ -211,17 +213,16 @@ for builddir in . sub; do # Check that the tarball contains posub/foo-bar-{de,fr}.{po,qm} but not # the others, regardless whether LINGUAS was specified or not. - gzip -d -c < pot-format-qt1-1.0.tar.gz | tar tf - > filelist - grep '^pot-format-qt1-1\.0/posub/foo-bar-de\.po$' filelist - grep '^pot-format-qt1-1\.0/posub/foo-bar-de\.qm$' filelist - grep '^pot-format-qt1-1\.0/posub/foo-bar-fr\.po$' filelist - grep '^pot-format-qt1-1\.0/posub/foo-bar-fr\.qm$' filelist - grep '^pot-format-qt1-1\.0/posub/foo-bar-es\.po$' filelist && Exit 1 - grep '^pot-format-qt1-1\.0/posub/foo-bar-es\.qm$' filelist && Exit 1 - grep '^pot-format-qt1-1\.0/posub/foo-bar-de\.mo$' filelist && Exit 1 - grep '^pot-format-qt1-1\.0/posub/foo-bar-fr\.mo$' filelist && Exit 1 - grep '^pot-format-qt1-1\.0/posub/foo-bar-es\.mo$' filelist && Exit 1 - rm -f filelist + test -d $distdir # sanity check + test -f $distdir/posub/foo-bar-de.po + test -f $distdir/posub/foo-bar-de.qm + test -f $distdir/posub/foo-bar-fr.po + test -f $distdir/posub/foo-bar-fr.qm + test ! -r $distdir/posub/foo-bar-es.po + test ! -r $distdir/posub/foo-bar-es.qm + test ! -r $distdir/posub/foo-bar-de.mo + test ! -r $distdir/posub/foo-bar-fr.mo + test ! -r $distdir/posub/foo-bar-es.mo # Sanity check. $MAKE distcheck diff --git a/tests/pot-format-tcl1.test b/tests/pot-format-tcl1.test index 284b1ce..ab3d5ae 100755 --- a/tests/pot-format-tcl1.test +++ b/tests/pot-format-tcl1.test @@ -109,6 +109,8 @@ msgid "Hello, world!" msgstr "" END +distdir=$me-1.0 + for builddir in . sub; do for config_options in '' 'LINGUAS="es de"'; do if test $builddir = '.'; then @@ -162,11 +164,11 @@ for builddir in . sub; do test ! -f "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.mo test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo - # Check that "make dist" creates the expected .pot file. + # Check that "make distdir" creates the expected .pot file. rm -f $sourcedir/posub/foo-bar.pot - $MAKE dist + $MAKE distdir test -f $sourcedir/posub/foo-bar.pot test $builddir = '.' || test ! -f posub/foo-bar.pot @@ -185,17 +187,16 @@ for builddir in . sub; do # Check that the tarball contains posub/foo-bar-{de,fr}.{po,msg} but not # the others, regardless whether LINGUAS was specified or not. - gzip -d -c < pot-format-tcl1-1.0.tar.gz | tar tf - > filelist - grep '^pot-format-tcl1-1\.0/posub/foo-bar-de\.po$' filelist - grep '^pot-format-tcl1-1\.0/posub/foo-bar/de\.msg$' filelist - grep '^pot-format-tcl1-1\.0/posub/foo-bar-fr_CA\.po$' filelist - grep '^pot-format-tcl1-1\.0/posub/foo-bar/fr_ca\.msg$' filelist - grep '^pot-format-tcl1-1\.0/posub/foo-bar-es\.po$' filelist && Exit 1 - grep '^pot-format-tcl1-1\.0/posub/foo-bar/es\.msg$' filelist && Exit 1 - grep '^pot-format-tcl1-1\.0/posub/foo-bar-de\.mo$' filelist && Exit 1 - grep '^pot-format-tcl1-1\.0/posub/foo-bar-fr_CA\.mo$' filelist && Exit 1 - grep '^pot-format-tcl1-1\.0/posub/foo-bar-es\.mo$' filelist && Exit 1 - rm -f filelist + test -d $distdir # sanity check + test -f $distdir/posub/foo-bar-de.po + test -f $distdir/posub/foo-bar/de.msg + test -f $distdir/posub/foo-bar-fr_CA.po + test -f $distdir/posub/foo-bar/fr_ca.msg + test ! -r $distdir/posub/foo-bar-es.po + test ! -r $distdir/posub/foo-bar/es.msg + test ! -r $distdir/posub/foo-bar-de.mo + test ! -r $distdir/posub/foo-bar-fr_CA.mo + test ! -r $distdir/posub/foo-bar-es.mo # Sanity check. $MAKE distcheck diff --git a/tests/pot-linguas.test b/tests/pot-linguas.test index 7f7f42f..595c095 100755 --- a/tests/pot-linguas.test +++ b/tests/pot-linguas.test @@ -120,6 +120,8 @@ msgid "See the documentation for details." msgstr "" END +distdir=$me-1.0 + for builddir in . sub; do for config_options in '' 'LINGUAS="es de"'; do if test $builddir = '.'; then @@ -172,11 +174,11 @@ END test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo fi - # Check that "make dist" creates the expected .pot file. + # Check that "make distdir" creates the expected .pot file. rm -f $sourcedir/posub/foo-bar.pot - $MAKE dist + $MAKE distdir test -f $sourcedir/posub/foo-bar.pot test $builddir = '.' || test ! -f posub/foo-bar.pot @@ -191,14 +193,12 @@ END # Check that the tarball contains posub/foo-bar-{de,fr}.{po,mo} but not # the others, regardless whether LINGUAS was specified or not. - gzip -d -c < pot-linguas-1.0.tar.gz | tar tf - > filelist - grep '^pot-linguas-1\.0/posub/foo-bar-de\.po$' filelist - grep '^pot-linguas-1\.0/posub/foo-bar-de\.mo$' filelist - grep '^pot-linguas-1\.0/posub/foo-bar-fr\.po$' filelist - grep '^pot-linguas-1\.0/posub/foo-bar-fr\.mo$' filelist - grep '^pot-linguas-1\.0/posub/foo-bar-es\.po$' filelist && Exit 1 - grep '^pot-linguas-1\.0/posub/foo-bar-es\.mo$' filelist && Exit 1 - rm -f filelist + test -f $distdir/posub/foo-bar-de.po + test -f $distdir/posub/foo-bar-de.mo + test -f $distdir/posub/foo-bar-fr.po + test -f $distdir/posub/foo-bar-fr.mo + test ! -r $distdir/posub/foo-bar-es.po + test ! -r $distdir/posub/foo-bar-es.mo # Try modifying a source file. cat > $sourcedir/src/main.c << 'END' @@ -240,7 +240,7 @@ END cmp $sourcedir/posub/foo-bar-es.pobak $sourcedir/posub/foo-bar-es.po cmp $sourcedir/posub/foo-bar-es.mobak $sourcedir/posub/foo-bar-es.mo - # Check that "make dist" updates the POT file, the PO files, and the + # Check that "make distdir" updates the POT file, the PO files, and the # MO files listed in the _LINGUAS variable, regardless whether LINGUAS # was specified or not. cp -p $sourcedir/posub/foo-bar.potbak $sourcedir/posub/foo-bar.pot @@ -248,7 +248,7 @@ END cp -p $sourcedir/posub/foo-bar-de.mobak $sourcedir/posub/foo-bar-de.mo cp -p $sourcedir/posub/foo-bar-fr.pobak $sourcedir/posub/foo-bar-fr.po cp -p $sourcedir/posub/foo-bar-fr.mobak $sourcedir/posub/foo-bar-fr.mo - $MAKE dist + $MAKE distdir grep great $sourcedir/posub/foo-bar.pot grep great $sourcedir/posub/foo-bar-de.po cmp $sourcedir/posub/foo-bar-de.mobak $sourcedir/posub/foo-bar-de.mo && Exit 1 diff --git a/tests/pot-msgidbugs.test b/tests/pot-msgidbugs.test index 3b3b954..aba3df2 100755 --- a/tests/pot-msgidbugs.test +++ b/tests/pot-msgidbugs.test @@ -87,11 +87,11 @@ for builddir in . sub1; do $sourcedir/configure --prefix="$instdir" $MAKE - # Check that "make dist" creates the expected .pot file. + # Check that "make distdir" creates the expected .pot file. # (It is created under $sourcedir, because the .pot file is distributed. # Cf. the GNU standards, node "Makefile Basics".) - $MAKE dist + $MAKE distdir test -f $sourcedir/posub/foo-bar.pot test $builddir = '.' || test ! -f posub/foo-bar.pot @@ -150,11 +150,11 @@ for builddir in . sub2; do $sourcedir/configure --prefix="$instdir" $MAKE - # Check that "make dist" creates the expected .pot file. + # Check that "make distdir" creates the expected .pot file. # (It is created under $sourcedir, because the .pot file is distributed. # Cf. the GNU standards, node "Makefile Basics".) - $MAKE dist + $MAKE distdir test -f $sourcedir/posub/foo-bar.pot test $builddir = '.' || test ! -f posub/foo-bar.pot diff --git a/tests/pot-no-linguas.test b/tests/pot-no-linguas.test index 86039d8..4f34264 100755 --- a/tests/pot-no-linguas.test +++ b/tests/pot-no-linguas.test @@ -113,11 +113,11 @@ int main () } END - # Check that "make dist" creates the expected .pot file. + # Check that "make distdir" creates the expected .pot file. # (It is created under $sourcedir, because the .pot file is distributed. # Cf. the GNU standards, node "Makefile Basics".) - $MAKE dist + $MAKE distdir test -f $sourcedir/posub/foo-bar.pot test $builddir = '.' || test ! -f posub/foo-bar.pot @@ -156,8 +156,8 @@ END $MAKE diff $sourcedir/posub/foo-bar.potbak $sourcedir/posub/foo-bar.pot - # Check that "make dist" updates the POT file. - $MAKE dist + # Check that "make distdir" updates the POT file. + $MAKE distdir grep great $sourcedir/posub/foo-bar.pot # Check that "make install" updates the POT file. diff --git a/tests/pot-noinst.test b/tests/pot-noinst.test index 7dfa2a9..70fb831 100755 --- a/tests/pot-noinst.test +++ b/tests/pot-noinst.test @@ -117,6 +117,8 @@ msgid "See the documentation for details." msgstr "" END +distdir=$me-1.0 + for builddir in . sub; do for config_options in '' 'LINGUAS="es de"'; do if test $builddir = '.'; then @@ -153,12 +155,12 @@ END test ! -f "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.mo test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo - # Check that "make dist" creates the expected .pot file, .po files + # Check that "make distdir" creates the expected .pot file, .po files # and .mo files. # (They are created under $sourcedir, because the files are distributed. # Cf. the GNU standards, node "Makefile Basics".) - $MAKE dist + $MAKE distdir test -f $sourcedir/posub/foo-bar.pot test $builddir = '.' || test ! -f posub/foo-bar.pot @@ -173,14 +175,13 @@ END # Check that the tarball contains posub/foo-bar-{de,fr}.{po,mo} but not # the others, regardless whether LINGUAS was specified or not. - gzip -d -c < pot-noinst-1.0.tar.gz | tar tf - > filelist - grep '^pot-noinst-1\.0/posub/foo-bar-de\.po$' filelist - grep '^pot-noinst-1\.0/posub/foo-bar-de\.mo$' filelist - grep '^pot-noinst-1\.0/posub/foo-bar-fr\.po$' filelist - grep '^pot-noinst-1\.0/posub/foo-bar-fr\.mo$' filelist - grep '^pot-noinst-1\.0/posub/foo-bar-es\.po$' filelist && Exit 1 - grep '^pot-noinst-1\.0/posub/foo-bar-es\.mo$' filelist && Exit 1 - rm -f filelist + test -d $distdir # sanity check + test -f $distdir/posub/foo-bar-de.po + test -f $distdir/posub/foo-bar-de.mo + test -f $distdir/posub/foo-bar-fr.po + test -f $distdir/posub/foo-bar-fr.mo + test ! -r $distdir/posub/foo-bar-es.po + test ! -r $distdir/posub/foo-bar-es.mo # Try modifying a source file. cat > $sourcedir/src/main.c << 'END' @@ -221,10 +222,10 @@ END cmp $sourcedir/posub/foo-bar-es.pobak $sourcedir/posub/foo-bar-es.po cmp $sourcedir/posub/foo-bar-es.mobak $sourcedir/posub/foo-bar-es.mo - # Check that "make dist" updates the POT file, the PO files, and the + # Check that "make distdir" updates the POT file, the PO files, and the # MO files listed in the _LINGUAS variable, regardless whether LINGUAS # was specified or not. - $MAKE dist + $MAKE distdir grep great $sourcedir/posub/foo-bar.pot grep great $sourcedir/posub/foo-bar-de.po grep great $sourcedir/posub/foo-bar-fr.po diff --git a/tests/pot-override1.test b/tests/pot-override1.test index bf51b88..e2e4a77 100755 --- a/tests/pot-override1.test +++ b/tests/pot-override1.test @@ -90,11 +90,11 @@ int main () } END - # Check that "make dist" creates the expected .pot file. + # Check that "make distdir" creates the expected .pot file. # (It is created under $sourcedir, because the .pot file is distributed. # Cf. the GNU standards, node "Makefile Basics".) - $MAKE dist + $MAKE distdir test -f $sourcedir/posub/foo-bar.pot test $builddir = '.' || test ! -f posub/foo-bar.pot @@ -125,8 +125,8 @@ END $MAKE diff $sourcedir/posub/foo-bar.potbak $sourcedir/posub/foo-bar.pot - # Check that "make dist" updates the POT file. - $MAKE dist + # Check that "make distdir" updates the POT file. + $MAKE distdir grep great $sourcedir/posub/foo-bar.pot # Check that "make install" updates the POT file. diff --git a/tests/pot-samedir.test b/tests/pot-samedir.test index 6c321a9..ccdd41d 100755 --- a/tests/pot-samedir.test +++ b/tests/pot-samedir.test @@ -147,6 +147,8 @@ msgid "See the documentation for details." msgstr "" END +distdir=$me-1.0 + for builddir in . sub; do if test $builddir = '.'; then sourcedir='.' @@ -194,24 +196,23 @@ for builddir in . sub; do cmp "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.mo \ "$instdir"/share/locale/de/LC_MESSAGES/foo-baz.mo && Exit 1 - $MAKE dist + $MAKE distdir # Check that the tarball contains the .po files and .mo files for the # specified languages, but not more. - gzip -d -c < pot-samedir-1.0.tar.gz | tar tf - > filelist - grep '^pot-samedir-1\.0/posub/foo-bar-de\.po$' filelist - grep '^pot-samedir-1\.0/posub/foo-bar-de\.mo$' filelist - grep '^pot-samedir-1\.0/posub/foo-bar-fr\.po$' filelist - grep '^pot-samedir-1\.0/posub/foo-bar-fr\.mo$' filelist - grep '^pot-samedir-1\.0/posub/foo-bar-it\.po$' filelist && Exit 1 - grep '^pot-samedir-1\.0/posub/foo-bar-it\.mo$' filelist && Exit 1 - grep '^pot-samedir-1\.0/posub/foo-baz-de\.po$' filelist - grep '^pot-samedir-1\.0/posub/foo-baz-de\.mo$' filelist - grep '^pot-samedir-1\.0/posub/foo-baz-it\.po$' filelist - grep '^pot-samedir-1\.0/posub/foo-baz-it\.mo$' filelist - grep '^pot-samedir-1\.0/posub/foo-baz-fr\.po$' filelist && Exit 1 - grep '^pot-samedir-1\.0/posub/foo-baz-fr\.mo$' filelist && Exit 1 - rm -f filelist + test -d $distdir # sanity check + test -f $distdir/posub/foo-bar-de.po + test -f $distdir/posub/foo-bar-de.mo + test -f $distdir/posub/foo-bar-fr.po + test -f $distdir/posub/foo-bar-fr.mo + test -f $distdir/posub/foo-baz-de.po + test -f $distdir/posub/foo-baz-de.mo + test -f $distdir/posub/foo-baz-it.po + test -f $distdir/posub/foo-baz-it.mo + test ! -r $distdir/posub/foo-bar-it.po + test ! -r $distdir/posub/foo-bar-it.mo + test ! -r $distdir/posub/foo-baz-fr.po + test ! -r $distdir/posub/foo-baz-fr.mo # Sanity check. $MAKE distcheck diff --git a/tests/pot-topsrcdir.test b/tests/pot-topsrcdir.test index d9a3433..3745f3e 100755 --- a/tests/pot-topsrcdir.test +++ b/tests/pot-topsrcdir.test @@ -117,6 +117,8 @@ msgid "See the documentation for details." msgstr "" END +distdir=$me-1.0 + for builddir in . sub; do for config_options in '' 'LINGUAS="es de"'; do if test $builddir = '.'; then @@ -169,11 +171,11 @@ END test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo fi - # Check that "make dist" creates the expected .pot file. + # Check that "make distdir" creates the expected .pot file. rm -f $sourcedir/foo-bar.pot - $MAKE dist + $MAKE distdir test -f $sourcedir/foo-bar.pot test $builddir = '.' || test ! -f foo-bar.pot @@ -188,14 +190,13 @@ END # Check that the tarball contains foo-bar-{de,fr}.{po,mo} but not # the others, regardless whether LINGUAS was specified or not. - gzip -d -c < pot-linguas-1.0.tar.gz | tar tf - > filelist - grep '^foo-bar-de\.po$' filelist - grep '^foo-bar-de\.mo$' filelist - grep '^foo-bar-fr\.po$' filelist - grep '^foo-bar-fr\.mo$' filelist - grep '^foo-bar-es\.po$' filelist && Exit 1 - grep '^foo-bar-es\.mo$' filelist && Exit 1 - rm -f filelist + test -d $distdir # sanity check + test -f $distdir/foo-bar-de.po + test -f $distdir/foo-bar-de.mo + test -f $distdir/foo-bar-fr.po + test -f $distdir/foo-bar-fr.mo + test ! -r $distdir/foo-bar-es.po + test ! -r $distdir/foo-bar-es.mo # Try modifying a source file. cat > $sourcedir/src/main.c << 'END' @@ -237,7 +238,7 @@ END cmp $sourcedir/foo-bar-es.pobak $sourcedir/foo-bar-es.po cmp $sourcedir/foo-bar-es.mobak $sourcedir/foo-bar-es.mo - # Check that "make dist" updates the POT file, the PO files, and the + # Check that "make distdir" updates the POT file, the PO files, and the # MO files listed in the _LINGUAS variable, regardless whether LINGUAS # was specified or not. cp -p $sourcedir/foo-bar.potbak $sourcedir/foo-bar.pot @@ -245,7 +246,7 @@ END cp -p $sourcedir/foo-bar-de.mobak $sourcedir/foo-bar-de.mo cp -p $sourcedir/foo-bar-fr.pobak $sourcedir/foo-bar-fr.po cp -p $sourcedir/foo-bar-fr.mobak $sourcedir/foo-bar-fr.mo - $MAKE dist + $MAKE distdir grep great $sourcedir/foo-bar.pot grep great $sourcedir/foo-bar-de.po grep great $sourcedir/foo-bar-fr.po diff --git a/tests/pot-xgettext1.test b/tests/pot-xgettext1.test index 7409685..d018fa7 100755 --- a/tests/pot-xgettext1.test +++ b/tests/pot-xgettext1.test @@ -84,11 +84,11 @@ for builddir in . sub; do $sourcedir/configure --prefix="$instdir" $MAKE - # Check that "make dist" creates the expected .pot file. + # Check that "make distdir" creates the expected .pot file. # (It is created under $sourcedir, because the .pot file is distributed. # Cf. the GNU standards, node "Makefile Basics".) - $MAKE dist + $MAKE distdir test -f $sourcedir/posub/foo-bar.pot test $builddir = '.' || test ! -f posub/foo-bar.pot diff --git a/tests/pot-xgettext2.test b/tests/pot-xgettext2.test index d7b81b0..0bd2407 100755 --- a/tests/pot-xgettext2.test +++ b/tests/pot-xgettext2.test @@ -84,11 +84,11 @@ for builddir in . sub; do $sourcedir/configure --prefix="$instdir" $MAKE - # Check that "make dist" creates the expected .pot file. + # Check that "make distdir" creates the expected .pot file. # (It is created under $sourcedir, because the .pot file is distributed. # Cf. the GNU standards, node "Makefile Basics".) - $MAKE dist + $MAKE distdir test -f $sourcedir/posub/foo-bar.pot test $builddir = '.' || test ! -f posub/foo-bar.pot diff --git a/tests/pot-xgettext3.test b/tests/pot-xgettext3.test index 65d2dea..ef5ad8b 100755 --- a/tests/pot-xgettext3.test +++ b/tests/pot-xgettext3.test @@ -99,11 +99,11 @@ for builddir in . sub; do $sourcedir/configure --prefix="$instdir" $MAKE - # Check that "make dist" creates the expected .pot file. + # Check that "make distdir" creates the expected .pot file. # (It is created under $sourcedir, because the .pot file is distributed. # Cf. the GNU standards, node "Makefile Basics".) - $MAKE dist + $MAKE distdir test -f $sourcedir/posub/foo-bar.pot test $builddir = '.' || test ! -f posub/foo-bar.pot diff --git a/tests/pot-xgettext4.test b/tests/pot-xgettext4.test index 6fd1cd4..61b59de 100755 --- a/tests/pot-xgettext4.test +++ b/tests/pot-xgettext4.test @@ -94,11 +94,11 @@ for builddir in . sub; do $sourcedir/configure --prefix="$instdir" $MAKE - # Check that "make dist" creates the expected .pot file. + # Check that "make distdir" creates the expected .pot file. # (It is created under $sourcedir, because the .pot file is distributed. # Cf. the GNU standards, node "Makefile Basics".) - $MAKE dist + $MAKE distdir test -f $sourcedir/maude.pot test $builddir = '.' || test ! -f maude.pot -- 1.7.1