[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: automake po / pot file integration: first tests available
From: |
Stefano Lattarini |
Subject: |
Re: automake po / pot file integration: first tests available |
Date: |
Tue, 7 Sep 2010 00:13:34 +0200 |
User-agent: |
KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) |
> > Part 1 and 2 are OK.
> >
> > In part 3, in pot-linguas.test, pot-noinst.test,
> > pot-topsrcdir.test, you simplified
> > cat $sourcedir/posub/foo-bar-de.po | grep great >/dev/null
> > to
> > grep great $sourcedir/posub/foo-bar-de.po
> >
> > This is an invalid simplification for files that contain
> > non-ASCII characters, because 'grep' on OpenBSD 4.0 then merely
> > outputs
> >
> > "Binary file (standard input) matches"
> >
> > for the case where the input is standard input, and similarly for
> > a command- line argument. The only workaround I found (on
> > 2008-01-12) for this problem is to use 'grep' with a pipe, not a
> > regular file, as input.
>
> You're right, this apparently useless use of cat is done in some
> other places in the automake testsuite too. I'll try to revert
> all the wrong cat removals; BTW, do you think looking for them
> with:
> $ grep -i 'grep.*\.po\>'
> is enough?
What a stupid question for me to ask. You already listed the
problematic files and contructs above! Sorry for the noise.
> > This is not an issue for POT files, which - in the Automake test
> > cases - only contain ASCII characters. But in the PO files, I
> > want to be able to use non-ASCII characters here and there
> > without much thinking. It's only by luck that the German and
> > French PO files that I used there happen to contain only ASCII
> > characters; this may change in the future.
> >
> > The rest of part 3 is OK.
> >
> > Thanks for all these fixes!
>
> Thanks four your reviews. I'll post a revised "patch n.3" soonish.
An updated patch is attached.
-*-*-*-
This is what I squashed in "patch n.3":
diff --git a/tests/pot-linguas.test b/tests/pot-linguas.test
index 7f7f42f..8e96b08 100755
--- a/tests/pot-linguas.test
+++ b/tests/pot-linguas.test
@@ -233,8 +233,12 @@ END
# was specified or not.
$MAKE install
grep great $sourcedir/posub/foo-bar.pot
- grep great $sourcedir/posub/foo-bar-de.po
- grep great $sourcedir/posub/foo-bar-fr.po
+ # NOTE: This is *not* a useless use of cat. The *.po files can contain
+ # nonprinting characters, which might cause problems with some `grep'
+ # program. BSD `grep' works from a pipe, but not a seekable file. GNU
+ # or BSD `grep -a' works on files, but is not portable.
+ cat $sourcedir/posub/foo-bar-de.po | grep great
+ cat $sourcedir/posub/foo-bar-fr.po | grep great
cmp $sourcedir/posub/foo-bar-de.mobak $sourcedir/posub/foo-bar-de.mo &&
Exit 1
cmp $sourcedir/posub/foo-bar-fr.mobak $sourcedir/posub/foo-bar-fr.mo &&
Exit 1
cmp $sourcedir/posub/foo-bar-es.pobak $sourcedir/posub/foo-bar-es.po
@@ -250,16 +254,18 @@ END
cp -p $sourcedir/posub/foo-bar-fr.mobak $sourcedir/posub/foo-bar-fr.mo
$MAKE dist
grep great $sourcedir/posub/foo-bar.pot
- grep great $sourcedir/posub/foo-bar-de.po
+ # NOTE: This is *not* a useless use of cat. See comments above.
+ cat $sourcedir/posub/foo-bar-de.po | grep great
+ cat $sourcedir/posub/foo-bar-fr.po | grep great
cmp $sourcedir/posub/foo-bar-de.mobak $sourcedir/posub/foo-bar-de.mo &&
Exit 1
- grep great $sourcedir/posub/foo-bar-fr.po
cmp $sourcedir/posub/foo-bar-fr.mobak $sourcedir/posub/foo-bar-fr.mo &&
Exit 1
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 the updated PO files contain 'previous msgid' fields.
- grep '^#| msgid "Hello, world\.\\n"$' $sourcedir/posub/foo-bar-de.po
- grep '^#| msgid "Hello, world\.\\n"$' $sourcedir/posub/foo-bar-fr.po
+ # NOTE: This is *not* a useless use of cat. See comments above.
+ cat $sourcedir/posub/foo-bar-de.po | grep '^#| msgid "Hello, world\.\\n"$'
+ cat $sourcedir/posub/foo-bar-fr.po | grep '^#| msgid "Hello, world\.\\n"$'
# Sanity check.
$MAKE distcheck
diff --git a/tests/pot-noinst.test b/tests/pot-noinst.test
index 7dfa2a9..3068cb6 100755
--- a/tests/pot-noinst.test
+++ b/tests/pot-noinst.test
@@ -226,16 +226,21 @@ END
# was specified or not.
$MAKE dist
grep great $sourcedir/posub/foo-bar.pot
- grep great $sourcedir/posub/foo-bar-de.po
- grep great $sourcedir/posub/foo-bar-fr.po
+ # NOTE: This is *not* a useless use of cat. The *.po files can contain
+ # nonprinting characters, which might cause problems with some `grep'
+ # program. BSD `grep' works from a pipe, but not a seekable file. GNU
+ # or BSD `grep -a' works on files, but is not portable.
+ cat $sourcedir/posub/foo-bar-de.po | grep great
+ cat $sourcedir/posub/foo-bar-fr.po | grep great
cmp $sourcedir/posub/foo-bar-de.mobak $sourcedir/posub/foo-bar-de.mo &&
Exit 1
cmp $sourcedir/posub/foo-bar-fr.mobak $sourcedir/posub/foo-bar-fr.mo &&
Exit 1
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 the updated PO files contain 'previous msgid' fields.
- grep '^#| msgid "Hello, world\.\\n"$' $sourcedir/posub/foo-bar-de.po
- grep '^#| msgid "Hello, world\.\\n"$' $sourcedir/posub/foo-bar-fr.po
+ # NOTE: This is *not* a useless use of cat. See comments above.
+ cat $sourcedir/posub/foo-bar-de.po | grep '^#| msgid "Hello, world\.\\n"$'
+ cat $sourcedir/posub/foo-bar-fr.po | grep '^#| msgid "Hello, world\.\\n"$'
# Sanity check.
$MAKE distcheck
diff --git a/tests/pot-topsrcdir.test b/tests/pot-topsrcdir.test
index d9a3433..a92b9d9 100755
--- a/tests/pot-topsrcdir.test
+++ b/tests/pot-topsrcdir.test
@@ -230,8 +230,12 @@ END
# was specified or not.
$MAKE install
grep great $sourcedir/foo-bar.pot
- grep great $sourcedir/foo-bar-de.po
- grep great $sourcedir/foo-bar-fr.po
+ # NOTE: This is *not* a useless use of cat. The *.po files can contain
+ # nonprinting characters, which might cause problems with some `grep'
+ # program. BSD `grep' works from a pipe, but not a seekable file. GNU
+ # or BSD `grep -a' works on files, but is not portable.
+ cat $sourcedir/foo-bar-de.po | grep great
+ cat $sourcedir/foo-bar-fr.po | grep great
cmp $sourcedir/foo-bar-de.mobak $sourcedir/foo-bar-de.mo && Exit 1
cmp $sourcedir/foo-bar-fr.mobak $sourcedir/foo-bar-fr.mo && Exit 1
cmp $sourcedir/foo-bar-es.pobak $sourcedir/foo-bar-es.po
@@ -247,16 +251,18 @@ END
cp -p $sourcedir/foo-bar-fr.mobak $sourcedir/foo-bar-fr.mo
$MAKE dist
grep great $sourcedir/foo-bar.pot
- grep great $sourcedir/foo-bar-de.po
- grep great $sourcedir/foo-bar-fr.po
+ # NOTE: This is *not* a useless use of cat. See comments above.
+ cat $sourcedir/foo-bar-de.po | grep great
+ cat $sourcedir/foo-bar-fr.po | grep great
cmp $sourcedir/foo-bar-de.mobak $sourcedir/foo-bar-de.mo && Exit 1
cmp $sourcedir/foo-bar-fr.mobak $sourcedir/foo-bar-fr.mo && Exit 1
cmp $sourcedir/foo-bar-es.pobak $sourcedir/foo-bar-es.po
cmp $sourcedir/foo-bar-es.mobak $sourcedir/foo-bar-es.mo
# Check that the updated PO files contain 'previous msgid' fields.
- grep '^#| msgid "Hello, world\.\\n"$' $sourcedir/foo-bar-de.po
- grep '^#| msgid "Hello, world\.\\n"$' $sourcedir/foo-bar-fr.po
+ # NOTE: This is *not* a useless use of cat. See comments above.
+ cat $sourcedir/foo-bar-de.po | grep '^#| msgid "Hello, world\.\\n"$'
+ cat $sourcedir/foo-bar-fr.po | grep '^#| msgid "Hello, world\.\\n"$'
# Sanity check.
$MAKE distcheck
-*-*-*-
Regards,
Stefano
From b8c61af6c30c5969f1d19adb2fda592103e5538a Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Mon, 6 Sep 2010 14:32:30 +0200
Subject: [PATCH] Fixlets for internationalization tests.
* tests/pot-copyright.test: Add trailing `:' command.
* tests/pot-empty.test: Likewise.
* tests/pot-download1.test: Likewise. Use `Exit', not `exit'.
($required): Remove gzip, as we must take it for granted anyway.
* tests/pot-format-qt1.test: Use `Exit', not `exit'. Use `$MAKE',
not bare `make'. Add trailing `:' command. Avoid useless use of
cat. Do not redirect output of grep, cmp, etc. to /dev/null.
Other minor cosmetic changes.
* tests/pot-format-java1.test: Likewise, and ...
($required): Remove gzip, as we must take it for granted anyway.
* tests/pot-format-java2.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.
* tests/pot-format-csharp1.test: Likewise, and quote all literal
dots in grep regexps.
* tests/pot-enable1.test: Use `$MAKE', not bare `make'. Do not
redirect grep output to /dev/null. Add trailing `:' command.
(Makefile.am): Explicitly declare phony target as such.
* tests/pot-enable2.test: Likewise.
* tests/pot-msgidbugs.test: Use `$MAKE', not bare `make'. Avoid
useless use of cat. Add trailing `:' command.
* tests/pot-xgettext1.test: Likewise.
* tests/pot-xgettext2.test: Likewise.
* tests/pot-xgettext3.test: Likewise.
* tests/pot-xgettext4.test: Likewise.
* tests/pot-no-linguas.test: Likewise, and do not redirect grep
output to /dev/null.
* tests/pot-override1.test: Likewise.
* tests/pot-macro-warn.test: Avoid useless use of `AUTOMAKE_run'.
Add trailing `:' command.
* tests/pot-warn1.test: Likewise.
* tests/pot-warn2.test: Likewise.
---
ChangeLog | 40 ++++++++++++++++
tests/pot-copyright.test | 10 +++--
tests/pot-download1.test | 17 +++----
tests/pot-empty.test | 12 +++--
tests/pot-enable1.test | 11 +++--
tests/pot-enable2.test | 11 +++--
tests/pot-format-csharp1.test | 45 +++++++-----------
tests/pot-format-java1.test | 45 +++++++-----------
tests/pot-format-java2.test | 45 +++++++-----------
tests/pot-format-qt1.test | 44 +++++++-----------
tests/pot-format-tcl1.test | 45 +++++++-----------
tests/pot-linguas.test | 99 +++++++++++++++++++---------------------
tests/pot-macro-warn.test | 3 +-
tests/pot-msgidbugs.test | 20 +++++----
tests/pot-no-linguas.test | 26 ++++++-----
tests/pot-noinst.test | 90 ++++++++++++++++++-------------------
tests/pot-override1.test | 22 +++++----
tests/pot-samedir.test | 54 +++++++++-------------
tests/pot-topsrcdir.test | 99 +++++++++++++++++++---------------------
tests/pot-warn1.test | 3 +-
tests/pot-warn2.test | 4 +-
tests/pot-xgettext1.test | 12 +++--
tests/pot-xgettext2.test | 12 +++--
tests/pot-xgettext3.test | 12 +++--
tests/pot-xgettext4.test | 12 +++--
25 files changed, 398 insertions(+), 395 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ef24a5d..484ceb7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,45 @@
2010-09-06 Stefano Lattarini <address@hidden>
+ Fixlets for internationalization tests.
+ * tests/pot-copyright.test: Add trailing `:' command. Use
+ `$MAKE', not bare `make'.
+ * tests/pot-empty.test: Likewise.
+ * tests/pot-download1.test: Likewise. Use `Exit', not `exit'.
+ ($required): Remove gzip, as we must take it for granted anyway.
+ * tests/pot-format-qt1.test: Use `Exit', not `exit'. Use `$MAKE',
+ not bare `make'. Add trailing `:' command. Avoid useless use of
+ cat. Do not redirect output of grep, cmp, etc. to /dev/null.
+ Other minor cosmetic changes.
+ * tests/pot-format-java1.test: Likewise, and ...
+ ($required): Remove gzip, as we must take it for granted anyway.
+ * tests/pot-format-java2.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.
+ * tests/pot-format-csharp1.test: Likewise, and quote all literal
+ dots in grep regexps.
+ * tests/pot-enable1.test: Use `$MAKE', not bare `make'. Do not
+ redirect grep output to /dev/null. Add trailing `:' command.
+ (Makefile.am): Explicitly declare phony target as such.
+ * tests/pot-enable2.test: Likewise.
+ * tests/pot-msgidbugs.test: Use `$MAKE', not bare `make'. Avoid
+ useless use of cat. Add trailing `:' command.
+ * tests/pot-xgettext1.test: Likewise.
+ * tests/pot-xgettext2.test: Likewise.
+ * tests/pot-xgettext3.test: Likewise.
+ * tests/pot-xgettext4.test: Likewise.
+ * tests/pot-no-linguas.test: Likewise, and do not redirect grep
+ output to /dev/null.
+ * tests/pot-override1.test: Likewise.
+ * tests/pot-macro-warn.test: Avoid useless use of `AUTOMAKE_run'.
+ Add trailing `:' command.
+ * tests/pot-warn1.test: Likewise.
+ * tests/pot-warn2.test: Likewise.
+
+2010-09-06 Stefano Lattarini <address@hidden>
+
List internationalization tests in tests/Makefile.am.
* tests/Makefile.am (TESTS, XFAIL_TESTS): Add internationalization
tests `pot-*.test' introduced in previous commits.
diff --git a/tests/pot-copyright.test b/tests/pot-copyright.test
index e4f9ff2..fb11367 100755
--- a/tests/pot-copyright.test
+++ b/tests/pot-copyright.test
@@ -82,13 +82,13 @@ for builddir in . sub; do
instdir="`pwd`/instdir"
cd $builddir
$sourcedir/configure --prefix="$instdir"
- make
+ $MAKE
# Check that "make dist" 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 dist
test -f $sourcedir/posub/foo-bar.pot
test $builddir = '.' || test ! -f posub/foo-bar.pot
@@ -97,10 +97,12 @@ for builddir in . sub; do
rm -f actual
# Sanity check.
- make distcheck
+ $MAKE distcheck
# Clean up.
- make distclean
+ $MAKE distclean
rm -rf "$instdir"
cd $sourcedir
done
+
+:
diff --git a/tests/pot-download1.test b/tests/pot-download1.test
index a70845b..01aead1 100755
--- a/tests/pot-download1.test
+++ b/tests/pot-download1.test
@@ -16,7 +16,6 @@
# Check the download of translations from the Translation Project.
-required='gzip'
. ./defs || Exit 1
set -e
@@ -57,26 +56,26 @@ for builddir in . sub; do
instdir="`pwd`/instdir"
cd $builddir
LINGUAS="de" $sourcedir/configure --prefix="$instdir"
- make
+ $MAKE
# Check that after "make install", a German translation has been installed.
- make install
+ $MAKE install
test -f "$instdir"/share/locale/de/LC_MESSAGES/clisp.mo
# Check that after "make dist", the tarball does not include the German
# translation.
- make dist
+ $MAKE dist
gzip -d -c < pot-download1-1.0.tar.gz | tar tf - > filelist
- if grep '^pot-download1-1\.0/clisp-de\.po$' filelist >/dev/null; then
- exit 1
- fi
+ grep '^pot-download1-1\.0/clisp-de\.po$' filelist && Exit 1
rm -f filelist
# Sanity check.
- make distcheck
+ $MAKE distcheck
# Clean up.
- make distclean
+ $MAKE distclean
rm -rf "$instdir"
cd $sourcedir
done
+
+:
diff --git a/tests/pot-empty.test b/tests/pot-empty.test
index 09bca2b..46611aa 100755
--- a/tests/pot-empty.test
+++ b/tests/pot-empty.test
@@ -57,13 +57,13 @@ for builddir in . sub; do
instdir="`pwd`/instdir"
cd $builddir
$sourcedir/configure --prefix="$instdir"
- make
- make dist
+ $MAKE
+ $MAKE dist
# Check that no .pot file was created.
test ! -f posub/foo-bar.pot
- make install
+ $MAKE install
# Check that still, no .pot file was created.
test ! -f posub/foo-bar.pot
@@ -72,10 +72,12 @@ for builddir in . sub; do
test ! -d "$instdir"/share/locale/de/LC_MESSAGES
# Sanity check.
- make distcheck
+ $MAKE distcheck
# Clean up.
- make distclean
+ $MAKE distclean
rm -rf "$instdir"
cd $sourcedir
done
+
+:
diff --git a/tests/pot-enable1.test b/tests/pot-enable1.test
index 77b154d..ff98d83 100755
--- a/tests/pot-enable1.test
+++ b/tests/pot-enable1.test
@@ -23,6 +23,7 @@
set -e
cat > Makefile.am << 'END'
+.PHONY: check-USE_NLS-yes check-USE_NLS-no
check-USE_NLS-yes:
test "@USE_NLS@" = yes
check-USE_NLS-no:
@@ -39,14 +40,16 @@ $AUTOMAKE -a
$AUTOCONF
# Check that the --help output advertises --disable-nls.
-./configure --help | grep ' --disable-nls ' >/dev/null
+./configure --help | grep ' --disable-nls '
# Check that --enable-nls causes USE_NLS to be yes.
./configure --enable-nls
-make check-USE_NLS-yes
+$MAKE check-USE_NLS-yes
-make distclean
+$MAKE distclean
# Check that --disable-nls causes USE_NLS to be no.
./configure --disable-nls
-make check-USE_NLS-no
+$MAKE check-USE_NLS-no
+
+:
diff --git a/tests/pot-enable2.test b/tests/pot-enable2.test
index 02bde5b..31ab56b 100755
--- a/tests/pot-enable2.test
+++ b/tests/pot-enable2.test
@@ -23,6 +23,7 @@
set -e
cat > Makefile.am << 'END'
+.PHONY: check-USE_NLS-yes check-USE_NLS-no
check-USE_NLS-yes:
test "@USE_NLS@" = yes
check-USE_NLS-no:
@@ -39,14 +40,16 @@ $AUTOMAKE -a
$AUTOCONF
# Check that the --help output advertises --disable-nls.
-./configure --help | grep ' --disable-nls ' >/dev/null
+./configure --help | grep ' --disable-nls '
# Check that --enable-nls causes USE_NLS to be yes.
./configure --enable-nls
-make check-USE_NLS-yes
+$MAKE check-USE_NLS-yes
-make distclean
+$MAKE distclean
# Check that --disable-nls causes USE_NLS to be no.
./configure --disable-nls
-make check-USE_NLS-no
+$MAKE check-USE_NLS-no
+
+:
diff --git a/tests/pot-format-csharp1.test b/tests/pot-format-csharp1.test
index 8c7f6c7..1daf13f 100755
--- a/tests/pot-format-csharp1.test
+++ b/tests/pot-format-csharp1.test
@@ -16,7 +16,6 @@
# Check the creation of compiled message catalogs in C# format.
-required='gzip'
. ./defs || Exit 1
set -e
@@ -125,18 +124,18 @@ for builddir in . sub; do
instdir="`pwd`/instdir"
cd $builddir
env $config_options $sourcedir/configure --prefix="$instdir"
- make
+ $MAKE
# Check that "make install" creates the expected .pot file, .po files
# and .resources.dll files.
# (They are created under $sourcedir, because the files are distributed.
# Cf. the GNU standards, node "Makefile Basics".)
- make install
+ $MAKE install
test -f $sourcedir/posub/foo-bar.pot
test $builddir = '.' || test ! -f posub/foo-bar.pot
- cat $sourcedir/posub/foo-bar.pot | grep -v 'POT-Creation-Date' | LC_ALL=C
tr -d '\r' > actual
+ grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d
'\r' > actual
diff actual $sourcedir/expected
rm -f actual
@@ -171,11 +170,11 @@ for builddir in . sub; do
rm -f $sourcedir/posub/foo-bar.pot
- make dist
+ $MAKE dist
test -f $sourcedir/posub/foo-bar.pot
test $builddir = '.' || test ! -f posub/foo-bar.pot
- cat $sourcedir/posub/foo-bar.pot | grep -v 'POT-Creation-Date' | LC_ALL=C
tr -d '\r' > actual
+ grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d
'\r' > actual
diff actual $sourcedir/expected
rm -f actual
@@ -191,33 +190,25 @@ 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 >/dev/null
- grep '^pot-format-csharp1-1\.0/posub/de/foo-bar\.resources.dll$' filelist
>/dev/null
- grep '^pot-format-csharp1-1\.0/posub/address@hidden' filelist >/dev/null
- grep '^pot-format-csharp1-1\.0/posub/fr-CA-Latn/foo-bar\.resources.dll$'
filelist >/dev/null
- if grep '^pot-format-csharp1-1\.0/posub/foo-bar-es\.po$' filelist
>/dev/null; then
- exit 1
- fi
- if grep '^pot-format-csharp1-1\.0/posub/es/foo-bar\.resources.dll$'
filelist >/dev/null; then
- exit 1
- fi
- if grep '^pot-format-csharp1-1\.0/posub/foo-bar-de\.mo$' filelist
>/dev/null; then
- exit 1
- fi
- if grep '^pot-format-csharp1-1\.0/posub/address@hidden' filelist
>/dev/null; then
- exit 1
- fi
- if grep '^pot-format-csharp1-1\.0/posub/foo-bar-es\.mo$' filelist
>/dev/null; then
- exit 1
- fi
+ 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/address@hidden' 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/address@hidden' filelist && Exit 1
+ grep '^pot-format-csharp1-1\.0/posub/foo-bar-es\.mo$' filelist && Exit 1
rm -f filelist
# Sanity check.
- make distcheck
+ $MAKE distcheck
# Clean up.
- make distclean
+ $MAKE distclean
rm -rf "$instdir"
cd $sourcedir
done
done
+
+:
diff --git a/tests/pot-format-java1.test b/tests/pot-format-java1.test
index 6a9259b..e148d43 100755
--- a/tests/pot-format-java1.test
+++ b/tests/pot-format-java1.test
@@ -18,7 +18,6 @@
# FIXME: Resource names with a dash maybe don't work. If so, it should be
# mentioned in the documentation.
-required='gzip'
. ./defs || Exit 1
set -e
@@ -126,18 +125,18 @@ for builddir in . sub; do
instdir="`pwd`/instdir"
cd $builddir
env $config_options $sourcedir/configure --prefix="$instdir"
- make
+ $MAKE
# Check that "make install" creates the expected .pot file, .po files
# and .properties files.
# (They are created under $sourcedir, because the files are distributed.
# Cf. the GNU standards, node "Makefile Basics".)
- make install
+ $MAKE install
test -f $sourcedir/posub/foo-bar.pot
test $builddir = '.' || test ! -f posub/foo-bar.pot
- cat $sourcedir/posub/foo-bar.pot | grep -v 'POT-Creation-Date' | LC_ALL=C
tr -d '\r' > actual
+ grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d
'\r' > actual
diff actual $sourcedir/expected
rm -f actual
@@ -172,11 +171,11 @@ for builddir in . sub; do
rm -f $sourcedir/posub/foo-bar.pot
- make dist
+ $MAKE dist
test -f $sourcedir/posub/foo-bar.pot
test $builddir = '.' || test ! -f posub/foo-bar.pot
- cat $sourcedir/posub/foo-bar.pot | grep -v 'POT-Creation-Date' | LC_ALL=C
tr -d '\r' > actual
+ grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d
'\r' > actual
diff actual $sourcedir/expected
rm -f actual
@@ -192,33 +191,25 @@ 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 >/dev/null
- grep '^pot-format-java1-1\.0/posub/foo-bar_de\.properties$' filelist
>/dev/null
- grep '^pot-format-java1-1\.0/posub/foo-bar-fr\.po$' filelist >/dev/null
- grep '^pot-format-java1-1\.0/posub/foo-bar_fr\.properties$' filelist
>/dev/null
- if grep '^pot-format-java1-1\.0/posub/foo-bar-es\.po$' filelist
>/dev/null; then
- exit 1
- fi
- if grep '^pot-format-java1-1\.0/posub/foo-bar_es\.properties$' filelist
>/dev/null; then
- exit 1
- fi
- if grep '^pot-format-java1-1\.0/posub/foo-bar-de\.mo$' filelist
>/dev/null; then
- exit 1
- fi
- if grep '^pot-format-java1-1\.0/posub/foo-bar-fr\.mo$' filelist
>/dev/null; then
- exit 1
- fi
- if grep '^pot-format-java1-1\.0/posub/foo-bar-es\.mo$' filelist
>/dev/null; then
- exit 1
- fi
+ 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
# Sanity check.
- make distcheck
+ $MAKE distcheck
# Clean up.
- make distclean
+ $MAKE distclean
rm -rf "$instdir"
cd $sourcedir
done
done
+
+:
diff --git a/tests/pot-format-java2.test b/tests/pot-format-java2.test
index e05d08c..ef60cf7 100755
--- a/tests/pot-format-java2.test
+++ b/tests/pot-format-java2.test
@@ -18,7 +18,6 @@
# FIXME: Class names with a dash probably don't work. If so, it should be
# mentioned in the documentation.
-required='gzip'
. ./defs || Exit 1
set -e
@@ -126,18 +125,18 @@ for builddir in . sub; do
instdir="`pwd`/instdir"
cd $builddir
env $config_options $sourcedir/configure --prefix="$instdir"
- make
+ $MAKE
# Check that "make install" creates the expected .pot file, .po files
# and .class files.
# (They are created under $sourcedir, because the files are distributed.
# Cf. the GNU standards, node "Makefile Basics".)
- make install
+ $MAKE install
test -f $sourcedir/posub/foo-bar.pot
test $builddir = '.' || test ! -f posub/foo-bar.pot
- cat $sourcedir/posub/foo-bar.pot | grep -v 'POT-Creation-Date' | LC_ALL=C
tr -d '\r' > actual
+ grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d
'\r' > actual
diff actual $sourcedir/expected
rm -f actual
@@ -172,11 +171,11 @@ for builddir in . sub; do
rm -f $sourcedir/posub/foo-bar.pot
- make dist
+ $MAKE dist
test -f $sourcedir/posub/foo-bar.pot
test $builddir = '.' || test ! -f posub/foo-bar.pot
- cat $sourcedir/posub/foo-bar.pot | grep -v 'POT-Creation-Date' | LC_ALL=C
tr -d '\r' > actual
+ grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d
'\r' > actual
diff actual $sourcedir/expected
rm -f actual
@@ -192,33 +191,25 @@ 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 >/dev/null
- grep '^pot-format-java2-1\.0/posub/foo-bar_de\.class$' filelist >/dev/null
- grep '^pot-format-java2-1\.0/posub/foo-bar-fr\.po$' filelist >/dev/null
- grep '^pot-format-java2-1\.0/posub/foo-bar_fr\.class$' filelist >/dev/null
- if grep '^pot-format-java2-1\.0/posub/foo-bar-es\.po$' filelist
>/dev/null; then
- exit 1
- fi
- if grep '^pot-format-java2-1\.0/posub/foo-bar_es\.class$' filelist
>/dev/null; then
- exit 1
- fi
- if grep '^pot-format-java2-1\.0/posub/foo-bar-de\.mo$' filelist
>/dev/null; then
- exit 1
- fi
- if grep '^pot-format-java2-1\.0/posub/foo-bar-fr\.mo$' filelist
>/dev/null; then
- exit 1
- fi
- if grep '^pot-format-java2-1\.0/posub/foo-bar-es\.mo$' filelist
>/dev/null; then
- exit 1
- fi
+ 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
# Sanity check.
- make distcheck
+ $MAKE distcheck
# Clean up.
- make distclean
+ $MAKE distclean
rm -rf "$instdir"
cd $sourcedir
done
done
+
+:
diff --git a/tests/pot-format-qt1.test b/tests/pot-format-qt1.test
index 797a347..ca6da0b 100755
--- a/tests/pot-format-qt1.test
+++ b/tests/pot-format-qt1.test
@@ -150,18 +150,18 @@ for builddir in . sub; do
instdir="`pwd`/instdir"
cd $builddir
env $config_options $sourcedir/configure --prefix="$instdir"
- make
+ $MAKE
# Check that "make install" creates the expected .pot file, .po files
# and .qm files.
# (They are created under $sourcedir, because the files are distributed.
# Cf. the GNU standards, node "Makefile Basics".)
- make install
+ $MAKE install
test -f $sourcedir/posub/foo-bar.pot
test $builddir = '.' || test ! -f posub/foo-bar.pot
- cat $sourcedir/posub/foo-bar.pot | grep -v 'POT-Creation-Date' | LC_ALL=C
tr -d '\r' > actual
+ grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d
'\r' > actual
diff actual $sourcedir/expected
rm -f actual
@@ -194,11 +194,11 @@ for builddir in . sub; do
rm -f $sourcedir/posub/foo-bar.pot
- make dist
+ $MAKE dist
test -f $sourcedir/posub/foo-bar.pot
test $builddir = '.' || test ! -f posub/foo-bar.pot
- cat $sourcedir/posub/foo-bar.pot | grep -v 'POT-Creation-Date' | LC_ALL=C
tr -d '\r' > actual
+ grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d
'\r' > actual
diff actual $sourcedir/expected
rm -f actual
@@ -212,33 +212,25 @@ 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 >/dev/null
- grep '^pot-format-qt1-1\.0/posub/foo-bar-de\.qm$' filelist >/dev/null
- grep '^pot-format-qt1-1\.0/posub/foo-bar-fr\.po$' filelist >/dev/null
- grep '^pot-format-qt1-1\.0/posub/foo-bar-fr\.qm$' filelist >/dev/null
- if grep '^pot-format-qt1-1\.0/posub/foo-bar-es\.po$' filelist >/dev/null;
then
- exit 1
- fi
- if grep '^pot-format-qt1-1\.0/posub/foo-bar-es\.qm$' filelist >/dev/null;
then
- exit 1
- fi
- if grep '^pot-format-qt1-1\.0/posub/foo-bar-de\.mo$' filelist >/dev/null;
then
- exit 1
- fi
- if grep '^pot-format-qt1-1\.0/posub/foo-bar-fr\.mo$' filelist >/dev/null;
then
- exit 1
- fi
- if grep '^pot-format-qt1-1\.0/posub/foo-bar-es\.mo$' filelist >/dev/null;
then
- exit 1
- fi
+ 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
# Sanity check.
- make distcheck
+ $MAKE distcheck
# Clean up.
- make distclean
+ $MAKE distclean
rm -rf "$instdir"
cd $sourcedir
done
done
+
+:
diff --git a/tests/pot-format-tcl1.test b/tests/pot-format-tcl1.test
index 109245e..284b1ce 100755
--- a/tests/pot-format-tcl1.test
+++ b/tests/pot-format-tcl1.test
@@ -16,7 +16,6 @@
# Check the creation of compiled message catalogs in Tcl format.
-required='gzip'
. ./defs || Exit 1
set -e
@@ -121,18 +120,18 @@ for builddir in . sub; do
instdir="`pwd`/instdir"
cd $builddir
env $config_options $sourcedir/configure --prefix="$instdir"
- make
+ $MAKE
# Check that "make install" creates the expected .pot file, .po files
# and .msg files.
# (They are created under $sourcedir, because the files are distributed.
# Cf. the GNU standards, node "Makefile Basics".)
- make install
+ $MAKE install
test -f $sourcedir/posub/foo-bar.pot
test $builddir = '.' || test ! -f posub/foo-bar.pot
- cat $sourcedir/posub/foo-bar.pot | grep -v 'POT-Creation-Date' | LC_ALL=C
tr -d '\r' > actual
+ grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d
'\r' > actual
diff actual $sourcedir/expected
rm -f actual
@@ -167,11 +166,11 @@ for builddir in . sub; do
rm -f $sourcedir/posub/foo-bar.pot
- make dist
+ $MAKE dist
test -f $sourcedir/posub/foo-bar.pot
test $builddir = '.' || test ! -f posub/foo-bar.pot
- cat $sourcedir/posub/foo-bar.pot | grep -v 'POT-Creation-Date' | LC_ALL=C
tr -d '\r' > actual
+ grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d
'\r' > actual
diff actual $sourcedir/expected
rm -f actual
@@ -187,33 +186,25 @@ 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 >/dev/null
- grep '^pot-format-tcl1-1\.0/posub/foo-bar/de\.msg$' filelist >/dev/null
- grep '^pot-format-tcl1-1\.0/posub/foo-bar-fr_CA\.po$' filelist >/dev/null
- grep '^pot-format-tcl1-1\.0/posub/foo-bar/fr_ca\.msg$' filelist >/dev/null
- if grep '^pot-format-tcl1-1\.0/posub/foo-bar-es\.po$' filelist >/dev/null;
then
- exit 1
- fi
- if grep '^pot-format-tcl1-1\.0/posub/foo-bar/es\.msg$' filelist
>/dev/null; then
- exit 1
- fi
- if grep '^pot-format-tcl1-1\.0/posub/foo-bar-de\.mo$' filelist >/dev/null;
then
- exit 1
- fi
- if grep '^pot-format-tcl1-1\.0/posub/foo-bar-fr_CA\.mo$' filelist
>/dev/null; then
- exit 1
- fi
- if grep '^pot-format-tcl1-1\.0/posub/foo-bar-es\.mo$' filelist >/dev/null;
then
- exit 1
- fi
+ 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
# Sanity check.
- make distcheck
+ $MAKE distcheck
# Clean up.
- make distclean
+ $MAKE distclean
rm -rf "$instdir"
cd $sourcedir
done
done
+
+:
diff --git a/tests/pot-linguas.test b/tests/pot-linguas.test
index 428152b..8e96b08 100755
--- a/tests/pot-linguas.test
+++ b/tests/pot-linguas.test
@@ -22,7 +22,6 @@
# FIXME: Should "make install" really update the PO files and MO files?
# Current po/Makefile.in.in does not do it.
-required='gzip'
. ./defs || Exit 1
set -e
@@ -132,7 +131,7 @@ for builddir in . sub; do
instdir="`pwd`/instdir"
cd $builddir
env $config_options $sourcedir/configure --prefix="$instdir"
- make
+ $MAKE
cat > $sourcedir/src/main.c << 'END'
#include <stdio.h>
@@ -148,11 +147,11 @@ END
# (They are created under $sourcedir, because the files are distributed.
# Cf. the GNU standards, node "Makefile Basics".)
- make install
+ $MAKE install
test -f $sourcedir/posub/foo-bar.pot
test $builddir = '.' || test ! -f posub/foo-bar.pot
- cat $sourcedir/posub/foo-bar.pot | grep -v 'POT-Creation-Date' | LC_ALL=C
tr -d '\r' > actual
+ grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d
'\r' > actual
diff actual $sourcedir/expected
rm -f actual
@@ -177,11 +176,11 @@ END
rm -f $sourcedir/posub/foo-bar.pot
- make dist
+ $MAKE dist
test -f $sourcedir/posub/foo-bar.pot
test $builddir = '.' || test ! -f posub/foo-bar.pot
- cat $sourcedir/posub/foo-bar.pot | grep -v 'POT-Creation-Date' | LC_ALL=C
tr -d '\r' > actual
+ grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d
'\r' > actual
diff actual $sourcedir/expected
rm -f actual
@@ -193,16 +192,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 >/dev/null
- grep '^pot-linguas-1\.0/posub/foo-bar-de\.mo$' filelist >/dev/null
- grep '^pot-linguas-1\.0/posub/foo-bar-fr\.po$' filelist >/dev/null
- grep '^pot-linguas-1\.0/posub/foo-bar-fr\.mo$' filelist >/dev/null
- if grep '^pot-linguas-1\.0/posub/foo-bar-es\.po$' filelist >/dev/null; then
- exit 1
- fi
- if grep '^pot-linguas-1\.0/posub/foo-bar-es\.mo$' filelist >/dev/null; then
- exit 1
- fi
+ 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
# Try modifying a source file.
@@ -224,30 +219,30 @@ END
cp -p $sourcedir/posub/foo-bar-fr.mo $sourcedir/posub/foo-bar-fr.mobak
cp -p $sourcedir/posub/foo-bar-es.po $sourcedir/posub/foo-bar-es.pobak
cp -p $sourcedir/posub/foo-bar-es.mo $sourcedir/posub/foo-bar-es.mobak
- make
+ $MAKE
diff $sourcedir/posub/foo-bar.potbak $sourcedir/posub/foo-bar.pot
- cmp $sourcedir/posub/foo-bar-de.pobak $sourcedir/posub/foo-bar-de.po
>/dev/null
- cmp $sourcedir/posub/foo-bar-de.mobak $sourcedir/posub/foo-bar-de.mo
>/dev/null
- cmp $sourcedir/posub/foo-bar-fr.pobak $sourcedir/posub/foo-bar-fr.po
>/dev/null
- cmp $sourcedir/posub/foo-bar-fr.mobak $sourcedir/posub/foo-bar-fr.mo
>/dev/null
- cmp $sourcedir/posub/foo-bar-es.pobak $sourcedir/posub/foo-bar-es.po
>/dev/null
- cmp $sourcedir/posub/foo-bar-es.mobak $sourcedir/posub/foo-bar-es.mo
>/dev/null
+ cmp $sourcedir/posub/foo-bar-de.pobak $sourcedir/posub/foo-bar-de.po
+ cmp $sourcedir/posub/foo-bar-de.mobak $sourcedir/posub/foo-bar-de.mo
+ cmp $sourcedir/posub/foo-bar-fr.pobak $sourcedir/posub/foo-bar-fr.po
+ cmp $sourcedir/posub/foo-bar-fr.mobak $sourcedir/posub/foo-bar-fr.mo
+ 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 install" updates the POT file, the PO files, and the
# MO files listed in the _LINGUAS variable, regardless whether LINGUAS
# was specified or not.
- make install
- cat $sourcedir/posub/foo-bar.pot | grep great >/dev/null
- cat $sourcedir/posub/foo-bar-de.po | grep great >/dev/null
- if cmp $sourcedir/posub/foo-bar-de.mobak $sourcedir/posub/foo-bar-de.mo
>/dev/null; then
- exit 1
- fi
- cat $sourcedir/posub/foo-bar-fr.po | grep great >/dev/null
- if cmp $sourcedir/posub/foo-bar-fr.mobak $sourcedir/posub/foo-bar-fr.mo
>/dev/null; then
- exit 1
- fi
- cmp $sourcedir/posub/foo-bar-es.pobak $sourcedir/posub/foo-bar-es.po
>/dev/null
- cmp $sourcedir/posub/foo-bar-es.mobak $sourcedir/posub/foo-bar-es.mo
>/dev/null
+ $MAKE install
+ grep great $sourcedir/posub/foo-bar.pot
+ # NOTE: This is *not* a useless use of cat. The *.po files can contain
+ # nonprinting characters, which might cause problems with some `grep'
+ # program. BSD `grep' works from a pipe, but not a seekable file. GNU
+ # or BSD `grep -a' works on files, but is not portable.
+ cat $sourcedir/posub/foo-bar-de.po | grep great
+ cat $sourcedir/posub/foo-bar-fr.po | grep great
+ cmp $sourcedir/posub/foo-bar-de.mobak $sourcedir/posub/foo-bar-de.mo &&
Exit 1
+ cmp $sourcedir/posub/foo-bar-fr.mobak $sourcedir/posub/foo-bar-fr.mo &&
Exit 1
+ 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
# MO files listed in the _LINGUAS variable, regardless whether LINGUAS
@@ -257,30 +252,30 @@ 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
- cat $sourcedir/posub/foo-bar.pot | grep great >/dev/null
- cat $sourcedir/posub/foo-bar-de.po | grep great >/dev/null
- if cmp $sourcedir/posub/foo-bar-de.mobak $sourcedir/posub/foo-bar-de.mo
>/dev/null; then
- exit 1
- fi
- cat $sourcedir/posub/foo-bar-fr.po | grep great >/dev/null
- if cmp $sourcedir/posub/foo-bar-fr.mobak $sourcedir/posub/foo-bar-fr.mo
>/dev/null; then
- exit 1
- fi
- cmp $sourcedir/posub/foo-bar-es.pobak $sourcedir/posub/foo-bar-es.po
>/dev/null
- cmp $sourcedir/posub/foo-bar-es.mobak $sourcedir/posub/foo-bar-es.mo
>/dev/null
+ $MAKE dist
+ 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
+ cat $sourcedir/posub/foo-bar-fr.po | grep great
+ cmp $sourcedir/posub/foo-bar-de.mobak $sourcedir/posub/foo-bar-de.mo &&
Exit 1
+ cmp $sourcedir/posub/foo-bar-fr.mobak $sourcedir/posub/foo-bar-fr.mo &&
Exit 1
+ 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 the updated PO files contain 'previous msgid' fields.
- cat $sourcedir/posub/foo-bar-de.po | grep '^#| msgid "Hello, world\.\\n"$'
>/dev/null
- cat $sourcedir/posub/foo-bar-fr.po | grep '^#| msgid "Hello, world\.\\n"$'
>/dev/null
+ # NOTE: This is *not* a useless use of cat. See comments above.
+ cat $sourcedir/posub/foo-bar-de.po | grep '^#| msgid "Hello, world\.\\n"$'
+ cat $sourcedir/posub/foo-bar-fr.po | grep '^#| msgid "Hello, world\.\\n"$'
# Sanity check.
- make distcheck
+ $MAKE distcheck
# Clean up.
- rm -f $sourcedir/posub/foo-bar.potbak $sourcedir/posub/*.pobak
$sourcedir/posub/*.mobak
- make distclean
+ rm -f $sourcedir/posub/foo-bar.potbak $sourcedir/posub/*.[mp]obak
+ $MAKE distclean
rm -rf "$instdir"
cd $sourcedir
done
done
+
+:
diff --git a/tests/pot-macro-warn.test b/tests/pot-macro-warn.test
index 41fb35f..caecab4 100755
--- a/tests/pot-macro-warn.test
+++ b/tests/pot-macro-warn.test
@@ -50,5 +50,6 @@ END
$ACLOCAL
# Check that there is no warning any more.
+$AUTOMAKE -Werror
-AUTOMAKE_run 0 -Werror
+:
diff --git a/tests/pot-msgidbugs.test b/tests/pot-msgidbugs.test
index 1bf5334..3b3b954 100755
--- a/tests/pot-msgidbugs.test
+++ b/tests/pot-msgidbugs.test
@@ -85,13 +85,13 @@ for builddir in . sub1; do
instdir="`pwd`/instdir"
cd $builddir
$sourcedir/configure --prefix="$instdir"
- make
+ $MAKE
# Check that "make dist" 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 dist
test -f $sourcedir/posub/foo-bar.pot
test $builddir = '.' || test ! -f posub/foo-bar.pot
@@ -100,10 +100,10 @@ for builddir in . sub1; do
rm -f actual
# Sanity check.
- make distcheck
+ $MAKE distcheck
# Clean up.
- make distclean
+ $MAKE distclean
rm -rf "$instdir"
cd $sourcedir
done
@@ -148,25 +148,27 @@ for builddir in . sub2; do
instdir="`pwd`/instdir"
cd $builddir
$sourcedir/configure --prefix="$instdir"
- make
+ $MAKE
# Check that "make dist" 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 dist
test -f $sourcedir/posub/foo-bar.pot
test $builddir = '.' || test ! -f posub/foo-bar.pot
- cat $sourcedir/posub/foo-bar.pot | grep -v 'POT-Creation-Date' | LC_ALL=C tr
-d '\r' > actual
+ grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d
'\r' > actual
diff actual $sourcedir/expected
rm -f actual
# Sanity check.
- make distcheck
+ $MAKE distcheck
# Clean up.
- make distclean
+ $MAKE distclean
rm -rf "$instdir"
cd $sourcedir
done
+
+:
diff --git a/tests/pot-no-linguas.test b/tests/pot-no-linguas.test
index f64588a..86039d8 100755
--- a/tests/pot-no-linguas.test
+++ b/tests/pot-no-linguas.test
@@ -102,7 +102,7 @@ for builddir in . sub; do
instdir="`pwd`/instdir"
cd $builddir
$sourcedir/configure --prefix="$instdir"
- make
+ $MAKE
cat > $sourcedir/src/main.c << 'END'
#include <stdio.h>
@@ -117,11 +117,11 @@ END
# (It is created under $sourcedir, because the .pot file is distributed.
# Cf. the GNU standards, node "Makefile Basics".)
- make dist
+ $MAKE dist
test -f $sourcedir/posub/foo-bar.pot
test $builddir = '.' || test ! -f posub/foo-bar.pot
- cat $sourcedir/posub/foo-bar.pot | grep -v 'POT-Creation-Date' | LC_ALL=C tr
-d '\r' > actual
+ grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d
'\r' > actual
diff actual $sourcedir/expected
rm -f actual
@@ -129,11 +129,11 @@ END
# Check that "make install" creates the expected .pot file.
- make install
+ $MAKE install
test -f $sourcedir/posub/foo-bar.pot
test $builddir = '.' || test ! -f posub/foo-bar.pot
- cat $sourcedir/posub/foo-bar.pot | grep -v 'POT-Creation-Date' | LC_ALL=C tr
-d '\r' > actual
+ grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d
'\r' > actual
diff actual $sourcedir/expected
rm -f actual
@@ -153,24 +153,26 @@ END
# Check that "make" does not rebuild the POT file.
cp -p $sourcedir/posub/foo-bar.pot $sourcedir/posub/foo-bar.potbak
- make
+ $MAKE
diff $sourcedir/posub/foo-bar.potbak $sourcedir/posub/foo-bar.pot
# Check that "make dist" updates the POT file.
- make dist
- cat $sourcedir/posub/foo-bar.pot | grep great >/dev/null
+ $MAKE dist
+ grep great $sourcedir/posub/foo-bar.pot
# Check that "make install" updates the POT file.
cp -p $sourcedir/posub/foo-bar.potbak $sourcedir/posub/foo-bar.pot
- make install
- cat $sourcedir/posub/foo-bar.pot | grep great >/dev/null
+ $MAKE install
+ grep great $sourcedir/posub/foo-bar.pot
# Sanity check.
- make distcheck
+ $MAKE distcheck
# Clean up.
rm -f $sourcedir/posub/foo-bar.potbak
- make distclean
+ $MAKE distclean
rm -rf "$instdir"
cd $sourcedir
done
+
+:
diff --git a/tests/pot-noinst.test b/tests/pot-noinst.test
index 9c1c922..3068cb6 100755
--- a/tests/pot-noinst.test
+++ b/tests/pot-noinst.test
@@ -19,7 +19,6 @@
# configure time has no effect. Otherwise, everything is the same as in the
# pot-linguas test.
-required='gzip'
. ./defs || Exit 1
set -e
@@ -129,7 +128,7 @@ for builddir in . sub; do
instdir="`pwd`/instdir"
cd $builddir
env $config_options $sourcedir/configure --prefix="$instdir"
- make
+ $MAKE
cat > $sourcedir/src/main.c << 'END'
#include <stdio.h>
@@ -143,7 +142,7 @@ END
# Check that "make install" does not create the .pot file and .mo files.
# (They are not needed for installation.)
- make install
+ $MAKE install
test ! -f $sourcedir/posub/foo-bar.pot
test ! -f $sourcedir/posub/foo-bar-de.mo
@@ -159,11 +158,11 @@ END
# (They are created under $sourcedir, because the files are distributed.
# Cf. the GNU standards, node "Makefile Basics".)
- make dist
+ $MAKE dist
test -f $sourcedir/posub/foo-bar.pot
test $builddir = '.' || test ! -f posub/foo-bar.pot
- cat $sourcedir/posub/foo-bar.pot | grep -v 'POT-Creation-Date' | LC_ALL=C
tr -d '\r' > actual
+ grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d
'\r' > actual
diff actual $sourcedir/expected
rm -f actual
@@ -175,16 +174,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-noinst-1.0.tar.gz | tar tf - > filelist
- grep '^pot-noinst-1\.0/posub/foo-bar-de\.po$' filelist >/dev/null
- grep '^pot-noinst-1\.0/posub/foo-bar-de\.mo$' filelist >/dev/null
- grep '^pot-noinst-1\.0/posub/foo-bar-fr\.po$' filelist >/dev/null
- grep '^pot-noinst-1\.0/posub/foo-bar-fr\.mo$' filelist >/dev/null
- if grep '^pot-noinst-1\.0/posub/foo-bar-es\.po$' filelist >/dev/null; then
- exit 1
- fi
- if grep '^pot-noinst-1\.0/posub/foo-bar-es\.mo$' filelist >/dev/null; then
- exit 1
- fi
+ 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
# Try modifying a source file.
@@ -206,53 +201,56 @@ END
cp -p $sourcedir/posub/foo-bar-fr.mo $sourcedir/posub/foo-bar-fr.mobak
cp -p $sourcedir/posub/foo-bar-es.po $sourcedir/posub/foo-bar-es.pobak
cp -p $sourcedir/posub/foo-bar-es.mo $sourcedir/posub/foo-bar-es.mobak
- make
+ $MAKE
diff $sourcedir/posub/foo-bar.potbak $sourcedir/posub/foo-bar.pot
- cmp $sourcedir/posub/foo-bar-de.pobak $sourcedir/posub/foo-bar-de.po
>/dev/null
- cmp $sourcedir/posub/foo-bar-de.mobak $sourcedir/posub/foo-bar-de.mo
>/dev/null
- cmp $sourcedir/posub/foo-bar-fr.pobak $sourcedir/posub/foo-bar-fr.po
>/dev/null
- cmp $sourcedir/posub/foo-bar-fr.mobak $sourcedir/posub/foo-bar-fr.mo
>/dev/null
- cmp $sourcedir/posub/foo-bar-es.pobak $sourcedir/posub/foo-bar-es.po
>/dev/null
- cmp $sourcedir/posub/foo-bar-es.mobak $sourcedir/posub/foo-bar-es.mo
>/dev/null
+ cmp $sourcedir/posub/foo-bar-de.pobak $sourcedir/posub/foo-bar-de.po
+ cmp $sourcedir/posub/foo-bar-de.mobak $sourcedir/posub/foo-bar-de.mo
+ cmp $sourcedir/posub/foo-bar-fr.pobak $sourcedir/posub/foo-bar-fr.po
+ cmp $sourcedir/posub/foo-bar-fr.mobak $sourcedir/posub/foo-bar-fr.mo
+ 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 install" does not update the POT file, the PO files,
# and the MO files.
- make install
+ $MAKE install
diff $sourcedir/posub/foo-bar.potbak $sourcedir/posub/foo-bar.pot
- cmp $sourcedir/posub/foo-bar-de.pobak $sourcedir/posub/foo-bar-de.po
>/dev/null
- cmp $sourcedir/posub/foo-bar-de.mobak $sourcedir/posub/foo-bar-de.mo
>/dev/null
- cmp $sourcedir/posub/foo-bar-fr.pobak $sourcedir/posub/foo-bar-fr.po
>/dev/null
- cmp $sourcedir/posub/foo-bar-fr.mobak $sourcedir/posub/foo-bar-fr.mo
>/dev/null
- cmp $sourcedir/posub/foo-bar-es.pobak $sourcedir/posub/foo-bar-es.po
>/dev/null
- cmp $sourcedir/posub/foo-bar-es.mobak $sourcedir/posub/foo-bar-es.mo
>/dev/null
+ cmp $sourcedir/posub/foo-bar-de.pobak $sourcedir/posub/foo-bar-de.po
+ cmp $sourcedir/posub/foo-bar-de.mobak $sourcedir/posub/foo-bar-de.mo
+ cmp $sourcedir/posub/foo-bar-fr.pobak $sourcedir/posub/foo-bar-fr.po
+ cmp $sourcedir/posub/foo-bar-fr.mobak $sourcedir/posub/foo-bar-fr.mo
+ 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
# MO files listed in the _LINGUAS variable, regardless whether LINGUAS
# was specified or not.
- make dist
- cat $sourcedir/posub/foo-bar.pot | grep great >/dev/null
- cat $sourcedir/posub/foo-bar-de.po | grep great >/dev/null
- if cmp $sourcedir/posub/foo-bar-de.mobak $sourcedir/posub/foo-bar-de.mo
>/dev/null; then
- exit 1
- fi
- cat $sourcedir/posub/foo-bar-fr.po | grep great >/dev/null
- if cmp $sourcedir/posub/foo-bar-fr.mobak $sourcedir/posub/foo-bar-fr.mo
>/dev/null; then
- exit 1
- fi
- cmp $sourcedir/posub/foo-bar-es.pobak $sourcedir/posub/foo-bar-es.po
>/dev/null
- cmp $sourcedir/posub/foo-bar-es.mobak $sourcedir/posub/foo-bar-es.mo
>/dev/null
+ $MAKE dist
+ grep great $sourcedir/posub/foo-bar.pot
+ # NOTE: This is *not* a useless use of cat. The *.po files can contain
+ # nonprinting characters, which might cause problems with some `grep'
+ # program. BSD `grep' works from a pipe, but not a seekable file. GNU
+ # or BSD `grep -a' works on files, but is not portable.
+ cat $sourcedir/posub/foo-bar-de.po | grep great
+ cat $sourcedir/posub/foo-bar-fr.po | grep great
+ cmp $sourcedir/posub/foo-bar-de.mobak $sourcedir/posub/foo-bar-de.mo &&
Exit 1
+ cmp $sourcedir/posub/foo-bar-fr.mobak $sourcedir/posub/foo-bar-fr.mo &&
Exit 1
+ 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 the updated PO files contain 'previous msgid' fields.
- cat $sourcedir/posub/foo-bar-de.po | grep '^#| msgid "Hello, world\.\\n"$'
>/dev/null
- cat $sourcedir/posub/foo-bar-fr.po | grep '^#| msgid "Hello, world\.\\n"$'
>/dev/null
+ # NOTE: This is *not* a useless use of cat. See comments above.
+ cat $sourcedir/posub/foo-bar-de.po | grep '^#| msgid "Hello, world\.\\n"$'
+ cat $sourcedir/posub/foo-bar-fr.po | grep '^#| msgid "Hello, world\.\\n"$'
# Sanity check.
- make distcheck
+ $MAKE distcheck
# Clean up.
- rm -f $sourcedir/posub/foo-bar.potbak $sourcedir/posub/*.pobak
$sourcedir/posub/*.mobak
- make distclean
+ rm -f $sourcedir/posub/foo-bar.potbak $sourcedir/posub/*.[mp]obak
+ $MAKE distclean
rm -rf "$instdir"
cd $sourcedir
done
done
+
+:
diff --git a/tests/pot-override1.test b/tests/pot-override1.test
index 6389f54..bf51b88 100755
--- a/tests/pot-override1.test
+++ b/tests/pot-override1.test
@@ -79,7 +79,7 @@ for builddir in . sub; do
instdir="`pwd`/instdir"
cd $builddir
$sourcedir/configure --prefix="$instdir"
- make
+ $MAKE
cat > $sourcedir/src/main.c << 'END'
#include <stdio.h>
@@ -94,7 +94,7 @@ END
# (It is created under $sourcedir, because the .pot file is distributed.
# Cf. the GNU standards, node "Makefile Basics".)
- make dist
+ $MAKE dist
test -f $sourcedir/posub/foo-bar.pot
test $builddir = '.' || test ! -f posub/foo-bar.pot
@@ -104,7 +104,7 @@ END
# Check that "make install" creates the expected .pot file.
- make install
+ $MAKE install
test -f $sourcedir/posub/foo-bar.pot
test $builddir = '.' || test ! -f posub/foo-bar.pot
@@ -122,24 +122,26 @@ END
# Check that "make" does not rebuild the POT file.
cp -p $sourcedir/posub/foo-bar.pot $sourcedir/posub/foo-bar.potbak
- make
+ $MAKE
diff $sourcedir/posub/foo-bar.potbak $sourcedir/posub/foo-bar.pot
# Check that "make dist" updates the POT file.
- make dist
- cat $sourcedir/posub/foo-bar.pot | grep great >/dev/null
+ $MAKE dist
+ grep great $sourcedir/posub/foo-bar.pot
# Check that "make install" updates the POT file.
cp -p $sourcedir/posub/foo-bar.potbak $sourcedir/posub/foo-bar.pot
- make install
- cat $sourcedir/posub/foo-bar.pot | grep great >/dev/null
+ $MAKE install
+ grep great $sourcedir/posub/foo-bar.pot
# Sanity check.
- make distcheck
+ $MAKE distcheck
# Clean up.
rm -f $sourcedir/posub/foo-bar.potbak
- make distclean
+ $MAKE distclean
rm -rf "$instdir"
cd $sourcedir
done
+
+:
diff --git a/tests/pot-samedir.test b/tests/pot-samedir.test
index 900be4f..6c321a9 100755
--- a/tests/pot-samedir.test
+++ b/tests/pot-samedir.test
@@ -16,7 +16,6 @@
# Check that different .pot files in the same directory don't collide.
-required='gzip'
. ./defs || Exit 1
set -e
@@ -158,23 +157,23 @@ for builddir in . sub; do
instdir="`pwd`/instdir"
cd $builddir
$sourcedir/configure --prefix="$instdir"
- make
+ $MAKE
# Check that "make install" creates the expected .pot files and .mo files.
# (They are created under $sourcedir, because the files are distributed.
# Cf. the GNU standards, node "Makefile Basics".)
- make install
+ $MAKE install
test -f $sourcedir/posub/foo-bar.pot
test $builddir = '.' || test ! -f posub/foo-bar.pot
- cat $sourcedir/posub/foo-bar.pot | grep -v 'POT-Creation-Date' | LC_ALL=C tr
-d '\r' > actual
+ grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d
'\r' > actual
diff actual $sourcedir/expected1
rm -f actual
test -f $sourcedir/posub/foo-baz.pot
test $builddir = '.' || test ! -f posub/foo-baz.pot
- cat $sourcedir/posub/foo-baz.pot | grep -v 'POT-Creation-Date' | LC_ALL=C tr
-d '\r' > actual
+ grep -v 'POT-Creation-Date' $sourcedir/posub/foo-baz.pot | LC_ALL=C tr -d
'\r' > actual
diff actual $sourcedir/expected2
rm -f actual
@@ -192,42 +191,35 @@ for builddir in . sub; do
test -f "$instdir"/share/locale/it/LC_MESSAGES/foo-baz.mo
test ! -f "$instdir"/share/locale/fr/LC_MESSAGES/foo-baz.mo
# Check that the two .mo files for the same language are different.
- if cmp "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.mo
"$instdir"/share/locale/de/LC_MESSAGES/foo-baz.mo >/dev/null; then
- exit 1
- fi
+ cmp "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.mo \
+ "$instdir"/share/locale/de/LC_MESSAGES/foo-baz.mo && Exit 1
- make dist
+ $MAKE dist
# 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 >/dev/null
- grep '^pot-samedir-1\.0/posub/foo-bar-de\.mo$' filelist >/dev/null
- grep '^pot-samedir-1\.0/posub/foo-bar-fr\.po$' filelist >/dev/null
- grep '^pot-samedir-1\.0/posub/foo-bar-fr\.mo$' filelist >/dev/null
- if grep '^pot-samedir-1\.0/posub/foo-bar-it\.po$' filelist >/dev/null; then
- exit 1
- fi
- if grep '^pot-samedir-1\.0/posub/foo-bar-it\.mo$' filelist >/dev/null; then
- exit 1
- fi
- grep '^pot-samedir-1\.0/posub/foo-baz-de\.po$' filelist >/dev/null
- grep '^pot-samedir-1\.0/posub/foo-baz-de\.mo$' filelist >/dev/null
- grep '^pot-samedir-1\.0/posub/foo-baz-it\.po$' filelist >/dev/null
- grep '^pot-samedir-1\.0/posub/foo-baz-it\.mo$' filelist >/dev/null
- if grep '^pot-samedir-1\.0/posub/foo-baz-fr\.po$' filelist >/dev/null; then
- exit 1
- fi
- if grep '^pot-samedir-1\.0/posub/foo-baz-fr\.mo$' filelist >/dev/null; then
- exit 1
- fi
+ 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
# Sanity check.
- make distcheck
+ $MAKE distcheck
# Clean up.
- make distclean
+ $MAKE distclean
rm -rf "$instdir"
cd $sourcedir
done
+
+:
diff --git a/tests/pot-topsrcdir.test b/tests/pot-topsrcdir.test
index 7236eb5..a92b9d9 100755
--- a/tests/pot-topsrcdir.test
+++ b/tests/pot-topsrcdir.test
@@ -20,7 +20,6 @@
# FIXME: Should "make install" really update the PO files and MO files?
# Current po/Makefile.in.in does not do it.
-required='gzip'
. ./defs || Exit 1
set -e
@@ -129,7 +128,7 @@ for builddir in . sub; do
instdir="`pwd`/instdir"
cd $builddir
env $config_options $sourcedir/configure --prefix="$instdir"
- make
+ $MAKE
cat > $sourcedir/src/main.c << 'END'
#include <stdio.h>
@@ -145,11 +144,11 @@ END
# (They are created under $sourcedir, because the files are distributed.
# Cf. the GNU standards, node "Makefile Basics".)
- make install
+ $MAKE install
test -f $sourcedir/foo-bar.pot
test $builddir = '.' || test ! -f foo-bar.pot
- cat $sourcedir/foo-bar.pot | grep -v 'POT-Creation-Date' | LC_ALL=C tr -d
'\r' > actual
+ grep -v 'POT-Creation-Date' $sourcedir/foo-bar.pot | LC_ALL=C tr -d '\r' >
actual
diff actual $sourcedir/expected
rm -f actual
@@ -174,11 +173,11 @@ END
rm -f $sourcedir/foo-bar.pot
- make dist
+ $MAKE dist
test -f $sourcedir/foo-bar.pot
test $builddir = '.' || test ! -f foo-bar.pot
- cat $sourcedir/foo-bar.pot | grep -v 'POT-Creation-Date' | LC_ALL=C tr -d
'\r' > actual
+ grep -v 'POT-Creation-Date' $sourcedir/foo-bar.pot | LC_ALL=C tr -d '\r' >
actual
diff actual $sourcedir/expected
rm -f actual
@@ -190,16 +189,12 @@ 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 >/dev/null
- grep '^foo-bar-de\.mo$' filelist >/dev/null
- grep '^foo-bar-fr\.po$' filelist >/dev/null
- grep '^foo-bar-fr\.mo$' filelist >/dev/null
- if grep '^foo-bar-es\.po$' filelist >/dev/null; then
- exit 1
- fi
- if grep '^foo-bar-es\.mo$' filelist >/dev/null; then
- exit 1
- fi
+ 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
# Try modifying a source file.
@@ -221,30 +216,30 @@ END
cp -p $sourcedir/foo-bar-fr.mo $sourcedir/foo-bar-fr.mobak
cp -p $sourcedir/foo-bar-es.po $sourcedir/foo-bar-es.pobak
cp -p $sourcedir/foo-bar-es.mo $sourcedir/foo-bar-es.mobak
- make
+ $MAKE
diff $sourcedir/foo-bar.potbak $sourcedir/foo-bar.pot
- cmp $sourcedir/foo-bar-de.pobak $sourcedir/foo-bar-de.po >/dev/null
- cmp $sourcedir/foo-bar-de.mobak $sourcedir/foo-bar-de.mo >/dev/null
- cmp $sourcedir/foo-bar-fr.pobak $sourcedir/foo-bar-fr.po >/dev/null
- cmp $sourcedir/foo-bar-fr.mobak $sourcedir/foo-bar-fr.mo >/dev/null
- cmp $sourcedir/foo-bar-es.pobak $sourcedir/foo-bar-es.po >/dev/null
- cmp $sourcedir/foo-bar-es.mobak $sourcedir/foo-bar-es.mo >/dev/null
+ cmp $sourcedir/foo-bar-de.pobak $sourcedir/foo-bar-de.po
+ cmp $sourcedir/foo-bar-de.mobak $sourcedir/foo-bar-de.mo
+ cmp $sourcedir/foo-bar-fr.pobak $sourcedir/foo-bar-fr.po
+ cmp $sourcedir/foo-bar-fr.mobak $sourcedir/foo-bar-fr.mo
+ 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 install" updates the POT file, the PO files, and the
# MO files listed in the _LINGUAS variable, regardless whether LINGUAS
# was specified or not.
- make install
- cat $sourcedir/foo-bar.pot | grep great >/dev/null
- cat $sourcedir/foo-bar-de.po | grep great >/dev/null
- if cmp $sourcedir/foo-bar-de.mobak $sourcedir/foo-bar-de.mo >/dev/null;
then
- exit 1
- fi
- cat $sourcedir/foo-bar-fr.po | grep great >/dev/null
- if cmp $sourcedir/foo-bar-fr.mobak $sourcedir/foo-bar-fr.mo >/dev/null;
then
- exit 1
- fi
- cmp $sourcedir/foo-bar-es.pobak $sourcedir/foo-bar-es.po >/dev/null
- cmp $sourcedir/foo-bar-es.mobak $sourcedir/foo-bar-es.mo >/dev/null
+ $MAKE install
+ grep great $sourcedir/foo-bar.pot
+ # NOTE: This is *not* a useless use of cat. The *.po files can contain
+ # nonprinting characters, which might cause problems with some `grep'
+ # program. BSD `grep' works from a pipe, but not a seekable file. GNU
+ # or BSD `grep -a' works on files, but is not portable.
+ cat $sourcedir/foo-bar-de.po | grep great
+ cat $sourcedir/foo-bar-fr.po | grep great
+ cmp $sourcedir/foo-bar-de.mobak $sourcedir/foo-bar-de.mo && Exit 1
+ cmp $sourcedir/foo-bar-fr.mobak $sourcedir/foo-bar-fr.mo && Exit 1
+ 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
# MO files listed in the _LINGUAS variable, regardless whether LINGUAS
@@ -254,30 +249,30 @@ 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
- cat $sourcedir/foo-bar.pot | grep great >/dev/null
- cat $sourcedir/foo-bar-de.po | grep great >/dev/null
- if cmp $sourcedir/foo-bar-de.mobak $sourcedir/foo-bar-de.mo >/dev/null;
then
- exit 1
- fi
- cat $sourcedir/foo-bar-fr.po | grep great >/dev/null
- if cmp $sourcedir/foo-bar-fr.mobak $sourcedir/foo-bar-fr.mo >/dev/null;
then
- exit 1
- fi
- cmp $sourcedir/foo-bar-es.pobak $sourcedir/foo-bar-es.po >/dev/null
- cmp $sourcedir/foo-bar-es.mobak $sourcedir/foo-bar-es.mo >/dev/null
+ $MAKE dist
+ 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
+ cat $sourcedir/foo-bar-fr.po | grep great
+ cmp $sourcedir/foo-bar-de.mobak $sourcedir/foo-bar-de.mo && Exit 1
+ cmp $sourcedir/foo-bar-fr.mobak $sourcedir/foo-bar-fr.mo && Exit 1
+ cmp $sourcedir/foo-bar-es.pobak $sourcedir/foo-bar-es.po
+ cmp $sourcedir/foo-bar-es.mobak $sourcedir/foo-bar-es.mo
# Check that the updated PO files contain 'previous msgid' fields.
- cat $sourcedir/foo-bar-de.po | grep '^#| msgid "Hello, world\.\\n"$'
>/dev/null
- cat $sourcedir/foo-bar-fr.po | grep '^#| msgid "Hello, world\.\\n"$'
>/dev/null
+ # NOTE: This is *not* a useless use of cat. See comments above.
+ cat $sourcedir/foo-bar-de.po | grep '^#| msgid "Hello, world\.\\n"$'
+ cat $sourcedir/foo-bar-fr.po | grep '^#| msgid "Hello, world\.\\n"$'
# Sanity check.
- make distcheck
+ $MAKE distcheck
# Clean up.
- rm -f $sourcedir/foo-bar.potbak $sourcedir/*.pobak $sourcedir/*.mobak
- make distclean
+ rm -f $sourcedir/foo-bar.potbak $sourcedir/*.[mp]obak
+ $MAKE distclean
rm -rf "$instdir"
cd $sourcedir
done
done
+
+:
diff --git a/tests/pot-warn1.test b/tests/pot-warn1.test
index 2c79fb6..d69f3f3 100755
--- a/tests/pot-warn1.test
+++ b/tests/pot-warn1.test
@@ -47,5 +47,6 @@ posub_foo_bar_pot_SOURCES =
END
# Check that there is no warning any more.
+$AUTOMAKE -Werror
-AUTOMAKE_run 0 -Werror
+:
diff --git a/tests/pot-warn2.test b/tests/pot-warn2.test
index 605655a..724930b 100755
--- a/tests/pot-warn2.test
+++ b/tests/pot-warn2.test
@@ -46,4 +46,6 @@ END
# Check that there is no warning any more.
-AUTOMAKE_run 0 -Werror
+$AUTOMAKE -Werror
+
+:
diff --git a/tests/pot-xgettext1.test b/tests/pot-xgettext1.test
index d6cffcc..7409685 100755
--- a/tests/pot-xgettext1.test
+++ b/tests/pot-xgettext1.test
@@ -82,25 +82,27 @@ for builddir in . sub; do
instdir="`pwd`/instdir"
cd $builddir
$sourcedir/configure --prefix="$instdir"
- make
+ $MAKE
# Check that "make dist" 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 dist
test -f $sourcedir/posub/foo-bar.pot
test $builddir = '.' || test ! -f posub/foo-bar.pot
- cat $sourcedir/posub/foo-bar.pot | grep -v 'POT-Creation-Date' | LC_ALL=C tr
-d '\r' > actual
+ grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d
'\r' > actual
diff actual $sourcedir/expected
rm -f actual
# Sanity check.
- make distcheck
+ $MAKE distcheck
# Clean up.
- make distclean
+ $MAKE distclean
rm -rf "$instdir"
cd $sourcedir
done
+
+:
diff --git a/tests/pot-xgettext2.test b/tests/pot-xgettext2.test
index 0c6e326..d7b81b0 100755
--- a/tests/pot-xgettext2.test
+++ b/tests/pot-xgettext2.test
@@ -82,25 +82,27 @@ for builddir in . sub; do
instdir="`pwd`/instdir"
cd $builddir
$sourcedir/configure --prefix="$instdir"
- make
+ $MAKE
# Check that "make dist" 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 dist
test -f $sourcedir/posub/foo-bar.pot
test $builddir = '.' || test ! -f posub/foo-bar.pot
- cat $sourcedir/posub/foo-bar.pot | grep -v 'POT-Creation-Date' | LC_ALL=C tr
-d '\r' > actual
+ grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d
'\r' > actual
diff actual $sourcedir/expected
rm -f actual
# Sanity check.
- make distcheck
+ $MAKE distcheck
# Clean up.
- make distclean
+ $MAKE distclean
rm -rf "$instdir"
cd $sourcedir
done
+
+:
diff --git a/tests/pot-xgettext3.test b/tests/pot-xgettext3.test
index 285646f..65d2dea 100755
--- a/tests/pot-xgettext3.test
+++ b/tests/pot-xgettext3.test
@@ -97,25 +97,27 @@ for builddir in . sub; do
instdir="`pwd`/instdir"
cd $builddir
$sourcedir/configure --prefix="$instdir"
- make
+ $MAKE
# Check that "make dist" 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 dist
test -f $sourcedir/posub/foo-bar.pot
test $builddir = '.' || test ! -f posub/foo-bar.pot
- cat $sourcedir/posub/foo-bar.pot | grep -v 'POT-Creation-Date' | LC_ALL=C tr
-d '\r' > actual
+ grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d
'\r' > actual
diff actual $sourcedir/expected
rm -f actual
# Sanity check.
- make distcheck
+ $MAKE distcheck
# Clean up.
- make distclean
+ $MAKE distclean
rm -rf "$instdir"
cd $sourcedir
done
+
+:
diff --git a/tests/pot-xgettext4.test b/tests/pot-xgettext4.test
index a170525..6fd1cd4 100755
--- a/tests/pot-xgettext4.test
+++ b/tests/pot-xgettext4.test
@@ -92,25 +92,27 @@ for builddir in . sub; do
instdir="`pwd`/instdir"
cd $builddir
$sourcedir/configure --prefix="$instdir"
- make
+ $MAKE
# Check that "make dist" 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 dist
test -f $sourcedir/maude.pot
test $builddir = '.' || test ! -f maude.pot
- cat $sourcedir/maude.pot | grep -v 'POT-Creation-Date' | LC_ALL=C tr -d '\r'
> actual
+ grep -v 'POT-Creation-Date' $sourcedir/maude.pot | LC_ALL=C tr -d '\r' >
actual
diff actual $sourcedir/expected
rm -f actual
# Sanity check.
- make distcheck
+ $MAKE distcheck
# Clean up.
- make distclean
+ $MAKE distclean
rm -rf "$instdir"
cd $sourcedir
done
+
+:
--
1.7.1
Re: automake po / pot file integration: first tests available, Ralf Wildenhues, 2010/09/06
Re: automake po / pot file integration: first tests available, Bruno Haible, 2010/09/06
- Re: automake po / pot file integration: first tests available, Stefano Lattarini, 2010/09/06
- Re: automake po / pot file integration: first tests available,
Stefano Lattarini <=
- Re: automake po / pot file integration: first tests available, Stefano Lattarini, 2010/09/06
- Re: automake po / pot file integration: first tests available, Bruno Haible, 2010/09/07
- Re: automake po / pot file integration: first tests available, Stefano Lattarini, 2010/09/07
- Re: automake po / pot file integration: first tests available, Bruno Haible, 2010/09/07
- Re: automake po / pot file integration: first tests available, Stefano Lattarini, 2010/09/08