2010-09-06 Stefano Lattarini <stefano.lattarini@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 distdir' and analyze the contents of the created
+ distibution directory. 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'.
$AUTOMAKE -a
$AUTOCONF
+distdir=$me-1.0
+
for builddir in . sub; do
if test $builddir = '.'; then
sourcedir='.'
$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
msgstr ""
END
+distdir=$me-1.0
+
for builddir in . sub; do
for config_options in '' 'LINGUAS="es de"'; do
if test $builddir = '.'; then
test ! -f "$instdir"/share/locale/fr_CA@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
# 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_CA@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_CA@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_CA@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_CA@latin.mo
+ test ! -r $distdir/posub/foo-bar-es.mo
# Sanity check.
$MAKE distcheck
msgstr ""
END
+distdir=$me-1.0
+
for builddir in . sub; do
for config_options in '' 'LINGUAS="es de"'; do
if test $builddir = '.'; then
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
# 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
msgstr ""
END
+distdir=$me-1.0
+
for builddir in . sub; do
for config_options in '' 'LINGUAS="es de"'; do
if test $builddir = '.'; then
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
# 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
msgstr ""
END
+distdir=$me-1.0
+
for builddir in . sub; do
for config_options in '' 'LINGUAS="es de"'; do
if test $builddir = '.'; then
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
# 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
msgstr ""
END
+distdir=$me-1.0
+
for builddir in . sub; do
for config_options in '' 'LINGUAS="es de"'; do
if test $builddir = '.'; then
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
# 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
msgstr ""
END
+distdir=$me-1.0
+
for builddir in . sub; do
for config_options in '' 'LINGUAS="es de"'; do
if test $builddir = '.'; then
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
# 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'
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
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
# NOTE: This is *not* a useless use of cat. See comments above.
cat $sourcedir/posub/foo-bar-de.po | grep great
$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
$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
}
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
$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.
msgstr ""
END
+distdir=$me-1.0
+
for builddir in . sub; do
for config_options in '' 'LINGUAS="es de"'; do
if test $builddir = '.'; then
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
# 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'
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
# NOTE: This is *not* a useless use of cat. The *.po files can contain
# non-ASCII characters, which might cause problems with some `grep'
}
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
$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.
msgstr ""
END
+distdir=$me-1.0
+
for builddir in . sub; do
if test $builddir = '.'; then
sourcedir='.'
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
msgstr ""
END
+distdir=$me-1.0
+
for builddir in . sub; do
for config_options in '' 'LINGUAS="es de"'; do
if test $builddir = '.'; then
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
# 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'
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
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
# NOTE: This is *not* a useless use of cat. See comments above.
cat $sourcedir/foo-bar-de.po | grep great
$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
$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
$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
$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