automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Internationalization tests: prefer `test ! -r' over `test ! -f'


From: Stefano Lattarini
Subject: [PATCH] Internationalization tests: prefer `test ! -r' over `test ! -f'
Date: Mon, 6 Sep 2010 17:18:33 +0200
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

This is mostly a cosmetic/consistency patch.  I hope you'll find it 
worth applying nonetheless.

Regards,
  Stefano

-*-*-

Internationalization tests: prefer `test ! -r' over `test ! -f'

We now use `test ! -r' rather than `test ! -f' to check that
a file does not exists (`test ! -e' would be even better, but
unfortunately it is unportable to e.g. Solaris /bin/sh).

The tests have been edited with the following sed command:
 $ sed -i 's/\(^\| \)test ! -f /\1test ! -r /' tests/pot-*.test 

* tests/pot-copyright.test: Prefer `test ! -r' over `test ! -f'.
* tests/pot-empty.test: Likewise.
* 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-msgidbugs.test: Likewise.
* tests/pot-no-linguas.test: Likewise.
* tests/pot-noinst.test: Likewise.
* tests/pot-override1.test: Likewise.
* tests/pot-samedir.test: Likewise.
* tests/pot-topsrcdir.test: Likewise.
* tests/pot-xgettext1.test: Likewise.
* tests/pot-xgettext2.test: Likewise.
* tests/pot-xgettext3.test: Likewise.
* tests/pot-xgettext4.test: Likewise.
From a8d057c5b1a783b5ecef839bf97a97daf355ec94 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Mon, 6 Sep 2010 17:14:02 +0200
Subject: [PATCH] Internationalization tests: prefer `test ! -r' over `test ! -f'

We now use `test ! -r' rather than `test ! -f' to check that
a file does not exists (`test ! -e' would be even better, but
unfortunately it is unportable to e.g. Solaris /bin/sh).

* tests/pot-copyright.test: Prefer `test ! -r' over `test ! -f'.
* tests/pot-empty.test: Likewise.
* 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-msgidbugs.test: Likewise.
* tests/pot-no-linguas.test: Likewise.
* tests/pot-noinst.test: Likewise.
* tests/pot-override1.test: Likewise.
* tests/pot-samedir.test: Likewise.
* tests/pot-topsrcdir.test: Likewise.
* tests/pot-xgettext1.test: Likewise.
* tests/pot-xgettext2.test: Likewise.
* tests/pot-xgettext3.test: Likewise.
* tests/pot-xgettext4.test: Likewise.
---
 ChangeLog                     |   23 +++++++++++++++++++++++
 tests/pot-copyright.test      |    2 +-
 tests/pot-empty.test          |    4 ++--
 tests/pot-format-csharp1.test |   38 +++++++++++++++++++-------------------
 tests/pot-format-java1.test   |   38 +++++++++++++++++++-------------------
 tests/pot-format-java2.test   |   38 +++++++++++++++++++-------------------
 tests/pot-format-qt1.test     |   30 +++++++++++++++---------------
 tests/pot-format-tcl1.test    |   38 +++++++++++++++++++-------------------
 tests/pot-linguas.test        |   10 +++++-----
 tests/pot-msgidbugs.test      |    4 ++--
 tests/pot-no-linguas.test     |    6 +++---
 tests/pot-noinst.test         |   14 +++++++-------
 tests/pot-override1.test      |    4 ++--
 tests/pot-samedir.test        |    8 ++++----
 tests/pot-topsrcdir.test      |   10 +++++-----
 tests/pot-xgettext1.test      |    2 +-
 tests/pot-xgettext2.test      |    2 +-
 tests/pot-xgettext3.test      |    2 +-
 tests/pot-xgettext4.test      |    2 +-
 19 files changed, 149 insertions(+), 126 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b6bf770..71ae070 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,28 @@
 2010-09-06  Stefano Lattarini  <address@hidden>
 
+       Internationalization tests: prefer `test ! -r' over `test ! -f'
+       We now use `test ! -r' rather than `test ! -f' to check that
+       a file does not exists (`test ! -e' would be even better, but
+       unfortunately it is unportable to e.g. Solaris /bin/sh).
+       * tests/pot-copyright.test: Prefer `test ! -r' over `test ! -f'.
+       * tests/pot-empty.test: Likewise.
+       * 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-msgidbugs.test: Likewise.
+       * tests/pot-no-linguas.test: Likewise.
+       * tests/pot-noinst.test: Likewise.
+       * tests/pot-override1.test: Likewise.
+       * tests/pot-samedir.test: Likewise.
+       * tests/pot-topsrcdir.test: Likewise.
+       * tests/pot-xgettext1.test: Likewise.
+       * tests/pot-xgettext2.test: Likewise.
+       * tests/pot-xgettext3.test: Likewise.
+       * tests/pot-xgettext4.test: Likewise.
+
        Internationalization tests: do not ignore failures.
        Some tests used the idiom:
          test $builddir = '.' || test ! -f posub/foo-bar.pot
diff --git a/tests/pot-copyright.test b/tests/pot-copyright.test
index 437026e..3e4ca1c 100755
--- a/tests/pot-copyright.test
+++ b/tests/pot-copyright.test
@@ -91,7 +91,7 @@ for builddir in . sub; do
   $MAKE dist
 
   test -f $sourcedir/posub/foo-bar.pot
-  test $builddir = '.' || test ! -f posub/foo-bar.pot || Exit 1
+  test $builddir = '.' || test ! -r posub/foo-bar.pot || Exit 1
   cat $sourcedir/posub/foo-bar.pot | grep -v 'POT-Creation-Date' | LC_ALL=C tr 
-d '\r' > actual
   diff actual $sourcedir/expected
   rm -f actual
diff --git a/tests/pot-empty.test b/tests/pot-empty.test
index 46611aa..657753e 100755
--- a/tests/pot-empty.test
+++ b/tests/pot-empty.test
@@ -61,12 +61,12 @@ for builddir in . sub; do
   $MAKE dist
 
   # Check that no .pot file was created.
-  test ! -f posub/foo-bar.pot
+  test ! -r posub/foo-bar.pot
 
   $MAKE install
 
   # Check that still, no .pot file was created.
-  test ! -f posub/foo-bar.pot
+  test ! -r posub/foo-bar.pot
 
   # Check that no .mo file was installed, not even its directory was created.
   test ! -d "$instdir"/share/locale/de/LC_MESSAGES
diff --git a/tests/pot-format-csharp1.test b/tests/pot-format-csharp1.test
index 6db7577..aea68b9 100755
--- a/tests/pot-format-csharp1.test
+++ b/tests/pot-format-csharp1.test
@@ -136,37 +136,37 @@ for builddir in . sub; do
     $MAKE install
 
     test -f $sourcedir/posub/foo-bar.pot
-    test $builddir = '.' || test ! -f posub/foo-bar.pot || Exit 1
+    test $builddir = '.' || test ! -r posub/foo-bar.pot || Exit 1
     grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d 
'\r' > actual
     diff actual $sourcedir/expected
     rm -f actual
 
     test -f $sourcedir/posub/foo-bar-de.po
-    test ! -f $sourcedir/posub/foo-bar-de.resources.dll
+    test ! -r $sourcedir/posub/foo-bar-de.resources.dll
     test -f $sourcedir/posub/de/foo-bar.resources.dll
     test -f $sourcedir/posub/address@hidden
-    test ! -f $sourcedir/posub/address@hidden
+    test ! -r $sourcedir/posub/address@hidden
     test -f $sourcedir/posub/fr-CA-Latn/foo-bar.resources.dll
-    test ! -f $sourcedir/posub/foo-bar-de.mo
-    test ! -f $sourcedir/posub/address@hidden
+    test ! -r $sourcedir/posub/foo-bar-de.mo
+    test ! -r $sourcedir/posub/address@hidden
 
     if test -z "$config_options"; then
       # Check that "make install" installed de,po and address@hidden but not 
es.po.
       test -f "$instdir"/lib/pot-format-csharp1/de/foo-bar.resources.dll
       test -f 
"$instdir"/lib/pot-format-csharp1/fr-CA-Latn/foo-bar.resources.dll
-      test ! -f "$instdir"/lib/pot-format-csharp1/es/foo-bar.resources.dll
+      test ! -r "$instdir"/lib/pot-format-csharp1/es/foo-bar.resources.dll
     else
       # Check that "make install" installed de.po but not address@hidden nor 
es.po.
       test -f "$instdir"/lib/pot-format-csharp1/de/foo-bar.resources.dll
-      test ! -f 
"$instdir"/lib/pot-format-csharp1/fr-CA-Latn/foo-bar.resources.dll
-      test ! -f "$instdir"/lib/pot-format-csharp1/es/foo-bar.resources.dll
+      test ! -r 
"$instdir"/lib/pot-format-csharp1/fr-CA-Latn/foo-bar.resources.dll
+      test ! -r "$instdir"/lib/pot-format-csharp1/es/foo-bar.resources.dll
     fi
-    test ! -f "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.resources.dll
-    test ! -f 
"$instdir"/share/locale/address@hidden/LC_MESSAGES/foo-bar.resources.dll
-    test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.resources.dll
-    test ! -f "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.mo
-    test ! -f "$instdir"/share/locale/address@hidden/LC_MESSAGES/foo-bar.mo
-    test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo
+    test ! -r "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.resources.dll
+    test ! -r 
"$instdir"/share/locale/address@hidden/LC_MESSAGES/foo-bar.resources.dll
+    test ! -r "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.resources.dll
+    test ! -r "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.mo
+    test ! -r "$instdir"/share/locale/address@hidden/LC_MESSAGES/foo-bar.mo
+    test ! -r "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo
 
     # Check that "make distdir" creates the expected .pot file.
 
@@ -175,19 +175,19 @@ for builddir in . sub; do
     $MAKE distdir
 
     test -f $sourcedir/posub/foo-bar.pot
-    test $builddir = '.' || test ! -f posub/foo-bar.pot || Exit 1
+    test $builddir = '.' || test ! -r posub/foo-bar.pot || Exit 1
     grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d 
'\r' > actual
     diff actual $sourcedir/expected
     rm -f actual
 
     test -f $sourcedir/posub/foo-bar-de.po
-    test ! -f $sourcedir/posub/foo-bar-de.resources.dll
+    test ! -r $sourcedir/posub/foo-bar-de.resources.dll
     test -f $sourcedir/posub/de/foo-bar.resources.dll
     test -f $sourcedir/posub/address@hidden
-    test ! -f $sourcedir/posub/address@hidden
+    test ! -r $sourcedir/posub/address@hidden
     test -f $sourcedir/posub/fr-CA-Latn/foo-bar.resources.dll
-    test ! -f $sourcedir/posub/foo-bar-de.mo
-    test ! -f $sourcedir/posub/address@hidden
+    test ! -r $sourcedir/posub/foo-bar-de.mo
+    test ! -r $sourcedir/posub/address@hidden
 
     # Check that the tarball contains posub/foo-bar-{de,fr}.{po,resources.dll}
     # but not the others, regardless whether LINGUAS was specified or not.
diff --git a/tests/pot-format-java1.test b/tests/pot-format-java1.test
index 6e6a438..bd2da07 100755
--- a/tests/pot-format-java1.test
+++ b/tests/pot-format-java1.test
@@ -137,37 +137,37 @@ for builddir in . sub; do
     $MAKE install
 
     test -f $sourcedir/posub/foo-bar.pot
-    test $builddir = '.' || test ! -f posub/foo-bar.pot || Exit 1
+    test $builddir = '.' || test ! -r posub/foo-bar.pot || Exit 1
     grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d 
'\r' > actual
     diff actual $sourcedir/expected
     rm -f actual
 
     test -f $sourcedir/posub/foo-bar-de.po
-    test ! -f $sourcedir/posub/foo-bar-de.properties
+    test ! -r $sourcedir/posub/foo-bar-de.properties
     test -f $sourcedir/posub/foo-bar_de.properties
     test -f $sourcedir/posub/foo-bar-fr.po
-    test ! -f $sourcedir/posub/foo-bar-fr.properties
+    test ! -r $sourcedir/posub/foo-bar-fr.properties
     test -f $sourcedir/posub/foo-bar_fr.properties
-    test ! -f $sourcedir/posub/foo-bar-de.mo
-    test ! -f $sourcedir/posub/foo-bar-fr.mo
+    test ! -r $sourcedir/posub/foo-bar-de.mo
+    test ! -r $sourcedir/posub/foo-bar-fr.mo
 
     if test -z "$config_options"; then
       # Check that "make install" installed de,po and fr.po but not es.po.
       test -f "$instdir"/share/pot-format-java1/resources/foo-bar_de.properties
       test -f "$instdir"/share/pot-format-java1/resources/foo-bar_fr.properties
-      test ! -f 
"$instdir"/share/pot-format-java1/resources/foo-bar_es.properties
+      test ! -r 
"$instdir"/share/pot-format-java1/resources/foo-bar_es.properties
     else
       # Check that "make install" installed de.po but not fr.po nor es.po.
       test -f "$instdir"/share/pot-format-java1/resources/foo-bar_de.properties
-      test ! -f 
"$instdir"/share/pot-format-java1/resources/foo-bar_fr.properties
-      test ! -f 
"$instdir"/share/pot-format-java1/resources/foo-bar_es.properties
+      test ! -r 
"$instdir"/share/pot-format-java1/resources/foo-bar_fr.properties
+      test ! -r 
"$instdir"/share/pot-format-java1/resources/foo-bar_es.properties
     fi
-    test ! -f "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.properties
-    test ! -f "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.properties
-    test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.properties
-    test ! -f "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.mo
-    test ! -f "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.mo
-    test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo
+    test ! -r "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.properties
+    test ! -r "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.properties
+    test ! -r "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.properties
+    test ! -r "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.mo
+    test ! -r "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.mo
+    test ! -r "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo
 
     # Check that "make distdir" creates the expected .pot file.
 
@@ -176,19 +176,19 @@ for builddir in . sub; do
     $MAKE distdir
 
     test -f $sourcedir/posub/foo-bar.pot
-    test $builddir = '.' || test ! -f posub/foo-bar.pot || Exit 1
+    test $builddir = '.' || test ! -r posub/foo-bar.pot || Exit 1
     grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d 
'\r' > actual
     diff actual $sourcedir/expected
     rm -f actual
 
     test -f $sourcedir/posub/foo-bar-de.po
-    test ! -f $sourcedir/posub/foo-bar-de.properties
+    test ! -r $sourcedir/posub/foo-bar-de.properties
     test -f $sourcedir/posub/foo-bar_de.properties
     test -f $sourcedir/posub/foo-bar-fr.po
-    test ! -f $sourcedir/posub/foo-bar-fr.properties
+    test ! -r $sourcedir/posub/foo-bar-fr.properties
     test -f $sourcedir/posub/foo-bar_fr.properties
-    test ! -f $sourcedir/posub/foo-bar-de.mo
-    test ! -f $sourcedir/posub/foo-bar-fr.mo
+    test ! -r $sourcedir/posub/foo-bar-de.mo
+    test ! -r $sourcedir/posub/foo-bar-fr.mo
 
     # Check that the tarball contains posub/foo-bar-{de,fr}.{po,properties}
     # but not the others, regardless whether LINGUAS was specified or not.
diff --git a/tests/pot-format-java2.test b/tests/pot-format-java2.test
index d604eb3..ee29571 100755
--- a/tests/pot-format-java2.test
+++ b/tests/pot-format-java2.test
@@ -137,37 +137,37 @@ for builddir in . sub; do
     $MAKE install
 
     test -f $sourcedir/posub/foo-bar.pot
-    test $builddir = '.' || test ! -f posub/foo-bar.pot || Exit 1
+    test $builddir = '.' || test ! -r posub/foo-bar.pot || Exit 1
     grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d 
'\r' > actual
     diff actual $sourcedir/expected
     rm -f actual
 
     test -f $sourcedir/posub/foo-bar-de.po
-    test ! -f $sourcedir/posub/foo-bar-de.class
+    test ! -r $sourcedir/posub/foo-bar-de.class
     test -f $sourcedir/posub/foo-bar_de.class
     test -f $sourcedir/posub/foo-bar-fr.po
-    test ! -f $sourcedir/posub/foo-bar-fr.class
+    test ! -r $sourcedir/posub/foo-bar-fr.class
     test -f $sourcedir/posub/foo-bar_fr.class
-    test ! -f $sourcedir/posub/foo-bar-de.mo
-    test ! -f $sourcedir/posub/foo-bar-fr.mo
+    test ! -r $sourcedir/posub/foo-bar-de.mo
+    test ! -r $sourcedir/posub/foo-bar-fr.mo
 
     if test -z "$config_options"; then
       # Check that "make install" installed de,po and fr.po but not es.po.
       test -f "$instdir"/share/pot-format-java2/resources/foo-bar_de.class
       test -f "$instdir"/share/pot-format-java2/resources/foo-bar_fr.class
-      test ! -f "$instdir"/share/pot-format-java2/resources/foo-bar_es.class
+      test ! -r "$instdir"/share/pot-format-java2/resources/foo-bar_es.class
     else
       # Check that "make install" installed de.po but not fr.po nor es.po.
       test -f "$instdir"/share/pot-format-java2/resources/foo-bar_de.class
-      test ! -f "$instdir"/share/pot-format-java2/resources/foo-bar_fr.class
-      test ! -f "$instdir"/share/pot-format-java2/resources/foo-bar_es.class
+      test ! -r "$instdir"/share/pot-format-java2/resources/foo-bar_fr.class
+      test ! -r "$instdir"/share/pot-format-java2/resources/foo-bar_es.class
     fi
-    test ! -f "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.class
-    test ! -f "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.class
-    test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.class
-    test ! -f "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.mo
-    test ! -f "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.mo
-    test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo
+    test ! -r "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.class
+    test ! -r "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.class
+    test ! -r "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.class
+    test ! -r "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.mo
+    test ! -r "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.mo
+    test ! -r "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo
 
     # Check that "make distdir" creates the expected .pot file.
 
@@ -176,19 +176,19 @@ for builddir in . sub; do
     $MAKE distdir
 
     test -f $sourcedir/posub/foo-bar.pot
-    test $builddir = '.' || test ! -f posub/foo-bar.pot || Exit 1
+    test $builddir = '.' || test ! -r posub/foo-bar.pot || Exit 1
     grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d 
'\r' > actual
     diff actual $sourcedir/expected
     rm -f actual
 
     test -f $sourcedir/posub/foo-bar-de.po
-    test ! -f $sourcedir/posub/foo-bar-de.class
+    test ! -r $sourcedir/posub/foo-bar-de.class
     test -f $sourcedir/posub/foo-bar_de.class
     test -f $sourcedir/posub/foo-bar-fr.po
-    test ! -f $sourcedir/posub/foo-bar-fr.class
+    test ! -r $sourcedir/posub/foo-bar-fr.class
     test -f $sourcedir/posub/foo-bar_fr.class
-    test ! -f $sourcedir/posub/foo-bar-de.mo
-    test ! -f $sourcedir/posub/foo-bar-fr.mo
+    test ! -r $sourcedir/posub/foo-bar-de.mo
+    test ! -r $sourcedir/posub/foo-bar-fr.mo
 
     # Check that the tarball contains posub/foo-bar-{de,fr}.{po,class} but not
     # the others, regardless whether LINGUAS was specified or not.
diff --git a/tests/pot-format-qt1.test b/tests/pot-format-qt1.test
index fcd76d0..33b4f8c 100755
--- a/tests/pot-format-qt1.test
+++ b/tests/pot-format-qt1.test
@@ -162,7 +162,7 @@ for builddir in . sub; do
     $MAKE install
 
     test -f $sourcedir/posub/foo-bar.pot
-    test $builddir = '.' || test ! -f posub/foo-bar.pot || Exit 1
+    test $builddir = '.' || test ! -r posub/foo-bar.pot || Exit 1
     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,26 +171,26 @@ for builddir in . sub; do
     test -f $sourcedir/posub/foo-bar-de.qm
     test -f $sourcedir/posub/foo-bar-fr.po
     test -f $sourcedir/posub/foo-bar-fr.qm
-    test ! -f $sourcedir/posub/foo-bar-de.mo
-    test ! -f $sourcedir/posub/foo-bar-fr.mo
+    test ! -r $sourcedir/posub/foo-bar-de.mo
+    test ! -r $sourcedir/posub/foo-bar-fr.mo
 
     if test -z "$config_options"; then
       # Check that "make install" installed de,po and fr.po but not es.po.
       test -f "$instdir"/share/pot-format-qt1/locale/foo-bar_de.qm
       test -f "$instdir"/share/pot-format-qt1/locale/foo-bar_fr.qm
-      test ! -f "$instdir"/share/pot-format-qt1/locale/foo-bar_es.qm
+      test ! -r "$instdir"/share/pot-format-qt1/locale/foo-bar_es.qm
     else
       # Check that "make install" installed de.po but not fr.po nor es.po.
       test -f "$instdir"/share/pot-format-qt1/locale/foo-bar_de.qm
-      test ! -f "$instdir"/share/pot-format-qt1/locale/foo-bar_fr.qm
-      test ! -f "$instdir"/share/pot-format-qt1/locale/foo-bar_es.qm
+      test ! -r "$instdir"/share/pot-format-qt1/locale/foo-bar_fr.qm
+      test ! -r "$instdir"/share/pot-format-qt1/locale/foo-bar_es.qm
     fi
-    test ! -f "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.qm
-    test ! -f "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.qm
-    test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.qm
-    test ! -f "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.mo
-    test ! -f "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.mo
-    test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo
+    test ! -r "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.qm
+    test ! -r "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.qm
+    test ! -r "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.qm
+    test ! -r "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.mo
+    test ! -r "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.mo
+    test ! -r "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo
 
     # Check that "make distdir" creates the expected .pot file.
 
@@ -199,7 +199,7 @@ for builddir in . sub; do
     $MAKE distdir
 
     test -f $sourcedir/posub/foo-bar.pot
-    test $builddir = '.' || test ! -f posub/foo-bar.pot || Exit 1
+    test $builddir = '.' || test ! -r posub/foo-bar.pot || Exit 1
     grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d 
'\r' > actual
     diff actual $sourcedir/expected
     rm -f actual
@@ -208,8 +208,8 @@ for builddir in . sub; do
     test -f $sourcedir/posub/foo-bar-de.qm
     test -f $sourcedir/posub/foo-bar-fr.po
     test -f $sourcedir/posub/foo-bar-fr.qm
-    test ! -f $sourcedir/posub/foo-bar-de.mo
-    test ! -f $sourcedir/posub/foo-bar-fr.mo
+    test ! -r $sourcedir/posub/foo-bar-de.mo
+    test ! -r $sourcedir/posub/foo-bar-fr.mo
 
     # Check that the tarball contains posub/foo-bar-{de,fr}.{po,qm} but not
     # the others, regardless whether LINGUAS was specified or not.
diff --git a/tests/pot-format-tcl1.test b/tests/pot-format-tcl1.test
index 048560a..9fd02c2 100755
--- a/tests/pot-format-tcl1.test
+++ b/tests/pot-format-tcl1.test
@@ -132,37 +132,37 @@ for builddir in . sub; do
     $MAKE install
 
     test -f $sourcedir/posub/foo-bar.pot
-    test $builddir = '.' || test ! -f posub/foo-bar.pot || Exit 1
+    test $builddir = '.' || test ! -r posub/foo-bar.pot || Exit 1
     grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d 
'\r' > actual
     diff actual $sourcedir/expected
     rm -f actual
 
     test -f $sourcedir/posub/foo-bar-de.po
-    test ! -f $sourcedir/posub/foo-bar-de.msg
+    test ! -r $sourcedir/posub/foo-bar-de.msg
     test -f $sourcedir/posub/foo-bar/de.msg
     test -f $sourcedir/posub/foo-bar-fr_CA.po
-    test ! -f $sourcedir/posub/foo-bar-fr_CA.msg
+    test ! -r $sourcedir/posub/foo-bar-fr_CA.msg
     test -f $sourcedir/posub/foo-bar/fr_ca.msg
-    test ! -f $sourcedir/posub/foo-bar-de.mo
-    test ! -f $sourcedir/posub/foo-bar-fr_CA.mo
+    test ! -r $sourcedir/posub/foo-bar-de.mo
+    test ! -r $sourcedir/posub/foo-bar-fr_CA.mo
 
     if test -z "$config_options"; then
       # Check that "make install" installed de,po and fr_CA.po but not es.po.
       test -f "$instdir"/share/pot-format-tcl1/msgs/foo-bar/de.msg
       test -f "$instdir"/share/pot-format-tcl1/msgs/foo-bar/fr_ca.msg
-      test ! -f "$instdir"/share/pot-format-tcl1/msgs/foo-bar/es.msg
+      test ! -r "$instdir"/share/pot-format-tcl1/msgs/foo-bar/es.msg
     else
       # Check that "make install" installed de.po but not fr_CA.po nor es.po.
       test -f "$instdir"/share/pot-format-tcl1/msgs/foo-bar/de.msg
-      test ! -f "$instdir"/share/pot-format-tcl1/msgs/foo-bar/fr_ca.msg
-      test ! -f "$instdir"/share/pot-format-tcl1/msgs/foo-bar/es.msg
+      test ! -r "$instdir"/share/pot-format-tcl1/msgs/foo-bar/fr_ca.msg
+      test ! -r "$instdir"/share/pot-format-tcl1/msgs/foo-bar/es.msg
     fi
-    test ! -f "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.msg
-    test ! -f "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.msg
-    test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.msg
-    test ! -f "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.mo
-    test ! -f "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.mo
-    test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo
+    test ! -r "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.msg
+    test ! -r "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.msg
+    test ! -r "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.msg
+    test ! -r "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.mo
+    test ! -r "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.mo
+    test ! -r "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo
 
     # Check that "make distdir" creates the expected .pot file.
 
@@ -171,19 +171,19 @@ for builddir in . sub; do
     $MAKE distdir
 
     test -f $sourcedir/posub/foo-bar.pot
-    test $builddir = '.' || test ! -f posub/foo-bar.pot || Exit 1
+    test $builddir = '.' || test ! -r posub/foo-bar.pot || Exit 1
     grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d 
'\r' > actual
     diff actual $sourcedir/expected
     rm -f actual
 
     test -f $sourcedir/posub/foo-bar-de.po
-    test ! -f $sourcedir/posub/foo-bar-de.msg
+    test ! -r $sourcedir/posub/foo-bar-de.msg
     test -f $sourcedir/posub/foo-bar/de.msg
     test -f $sourcedir/posub/foo-bar-fr_CA.po
-    test ! -f $sourcedir/posub/foo-bar-fr_CA.msg
+    test ! -r $sourcedir/posub/foo-bar-fr_CA.msg
     test -f $sourcedir/posub/foo-bar/fr_ca.msg
-    test ! -f $sourcedir/posub/foo-bar-de.mo
-    test ! -f $sourcedir/posub/foo-bar-fr_CA.mo
+    test ! -r $sourcedir/posub/foo-bar-de.mo
+    test ! -r $sourcedir/posub/foo-bar-fr_CA.mo
 
     # Check that the tarball contains posub/foo-bar-{de,fr}.{po,msg} but not
     # the others, regardless whether LINGUAS was specified or not.
diff --git a/tests/pot-linguas.test b/tests/pot-linguas.test
index aaefb66..3a7fe19 100755
--- a/tests/pot-linguas.test
+++ b/tests/pot-linguas.test
@@ -152,7 +152,7 @@ END
     $MAKE install
 
     test -f $sourcedir/posub/foo-bar.pot
-    test $builddir = '.' || test ! -f posub/foo-bar.pot || Exit 1
+    test $builddir = '.' || test ! -r posub/foo-bar.pot || Exit 1
     grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d 
'\r' > actual
     diff actual $sourcedir/expected
     rm -f actual
@@ -166,12 +166,12 @@ END
       # Check that "make install" installed de,po and fr.po but not es.po.
       test -f "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.mo
       test -f "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.mo
-      test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo
+      test ! -r "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo
     else
       # Check that "make install" installed de.po but not fr.po nor es.po.
       test -f "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.mo
-      test ! -f "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.mo
-      test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo
+      test ! -r "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.mo
+      test ! -r "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo
     fi
 
     # Check that "make distdir" creates the expected .pot file.
@@ -181,7 +181,7 @@ END
     $MAKE distdir
 
     test -f $sourcedir/posub/foo-bar.pot
-    test $builddir = '.' || test ! -f posub/foo-bar.pot || Exit 1
+    test $builddir = '.' || test ! -r posub/foo-bar.pot || Exit 1
     grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d 
'\r' > actual
     diff actual $sourcedir/expected
     rm -f actual
diff --git a/tests/pot-msgidbugs.test b/tests/pot-msgidbugs.test
index d636ef0..b1854d8 100755
--- a/tests/pot-msgidbugs.test
+++ b/tests/pot-msgidbugs.test
@@ -94,7 +94,7 @@ for builddir in . sub1; do
   $MAKE distdir
 
   test -f $sourcedir/posub/foo-bar.pot
-  test $builddir = '.' || test ! -f posub/foo-bar.pot || Exit 1
+  test $builddir = '.' || test ! -r posub/foo-bar.pot || Exit 1
   cat $sourcedir/posub/foo-bar.pot | grep -v 'POT-Creation-Date' | LC_ALL=C tr 
-d '\r' > actual
   diff actual $sourcedir/expected
   rm -f actual
@@ -157,7 +157,7 @@ for builddir in . sub2; do
   $MAKE distdir
 
   test -f $sourcedir/posub/foo-bar.pot
-  test $builddir = '.' || test ! -f posub/foo-bar.pot || Exit 1
+  test $builddir = '.' || test ! -r posub/foo-bar.pot || Exit 1
   grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d 
'\r' > actual
   diff actual $sourcedir/expected
   rm -f actual
diff --git a/tests/pot-no-linguas.test b/tests/pot-no-linguas.test
index c2b4cfd..d331741 100755
--- a/tests/pot-no-linguas.test
+++ b/tests/pot-no-linguas.test
@@ -120,7 +120,7 @@ END
   $MAKE distdir
 
   test -f $sourcedir/posub/foo-bar.pot
-  test $builddir = '.' || test ! -f posub/foo-bar.pot || Exit 1
+  test $builddir = '.' || test ! -r posub/foo-bar.pot || Exit 1
   grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d 
'\r' > actual
   diff actual $sourcedir/expected
   rm -f actual
@@ -132,14 +132,14 @@ END
   $MAKE install
 
   test -f $sourcedir/posub/foo-bar.pot
-  test $builddir = '.' || test ! -f posub/foo-bar.pot || Exit 1
+  test $builddir = '.' || test ! -r posub/foo-bar.pot || Exit 1
   grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d 
'\r' > actual
   diff actual $sourcedir/expected
   rm -f actual
 
   # Check that no .mo file was installed, although posub/foo-bar-de.po and
   # posub/foo-bar-de.mo exist.
-  test ! -f "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.mo
+  test ! -r "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.mo
 
   # Try modifying a source file.
   cat > $sourcedir/src/main.c << 'END'
diff --git a/tests/pot-noinst.test b/tests/pot-noinst.test
index e05c9d5..c0b8d7e 100755
--- a/tests/pot-noinst.test
+++ b/tests/pot-noinst.test
@@ -146,14 +146,14 @@ END
 
     $MAKE install
 
-    test ! -f $sourcedir/posub/foo-bar.pot
-    test ! -f $sourcedir/posub/foo-bar-de.mo
-    test ! -f $sourcedir/posub/foo-bar-fr.mo
+    test ! -r $sourcedir/posub/foo-bar.pot
+    test ! -r $sourcedir/posub/foo-bar-de.mo
+    test ! -r $sourcedir/posub/foo-bar-fr.mo
 
     # Check that "make install" installed none of de.po, fr.po, es.po.
-    test ! -f "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.mo
-    test ! -f "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.mo
-    test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo
+    test ! -r "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.mo
+    test ! -r "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.mo
+    test ! -r "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo
 
     # Check that "make distdir" creates the expected .pot file, .po files
     # and .mo files.
@@ -163,7 +163,7 @@ END
     $MAKE distdir
 
     test -f $sourcedir/posub/foo-bar.pot
-    test $builddir = '.' || test ! -f posub/foo-bar.pot || Exit 1
+    test $builddir = '.' || test ! -r posub/foo-bar.pot || Exit 1
     grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d 
'\r' > actual
     diff actual $sourcedir/expected
     rm -f actual
diff --git a/tests/pot-override1.test b/tests/pot-override1.test
index 0d74962..1799bf1 100755
--- a/tests/pot-override1.test
+++ b/tests/pot-override1.test
@@ -97,7 +97,7 @@ END
   $MAKE distdir
 
   test -f $sourcedir/posub/foo-bar.pot
-  test $builddir = '.' || test ! -f posub/foo-bar.pot || Exit 1
+  test $builddir = '.' || test ! -r posub/foo-bar.pot || Exit 1
   diff $sourcedir/posub/foo-bar.pot $sourcedir/expected
 
   rm -f $sourcedir/posub/foo-bar.pot
@@ -107,7 +107,7 @@ END
   $MAKE install
 
   test -f $sourcedir/posub/foo-bar.pot
-  test $builddir = '.' || test ! -f posub/foo-bar.pot || Exit 1
+  test $builddir = '.' || test ! -r posub/foo-bar.pot || Exit 1
   diff $sourcedir/posub/foo-bar.pot $sourcedir/expected
 
   # Try modifying a source file.
diff --git a/tests/pot-samedir.test b/tests/pot-samedir.test
index f070c28..8c2df23 100755
--- a/tests/pot-samedir.test
+++ b/tests/pot-samedir.test
@@ -168,13 +168,13 @@ for builddir in . sub; do
   $MAKE install
 
   test -f $sourcedir/posub/foo-bar.pot
-  test $builddir = '.' || test ! -f posub/foo-bar.pot || Exit 1
+  test $builddir = '.' || test ! -r posub/foo-bar.pot || Exit 1
   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 || Exit 1
+  test $builddir = '.' || test ! -r posub/foo-baz.pot || Exit 1
   grep -v 'POT-Creation-Date' $sourcedir/posub/foo-baz.pot | LC_ALL=C tr -d 
'\r' > actual
   diff actual $sourcedir/expected2
   rm -f actual
@@ -188,10 +188,10 @@ for builddir in . sub; do
   # languages.
   test -f "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.mo
   test -f "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.mo
-  test ! -f "$instdir"/share/locale/it/LC_MESSAGES/foo-bar.mo
+  test ! -r "$instdir"/share/locale/it/LC_MESSAGES/foo-bar.mo
   test -f "$instdir"/share/locale/de/LC_MESSAGES/foo-baz.mo
   test -f "$instdir"/share/locale/it/LC_MESSAGES/foo-baz.mo
-  test ! -f "$instdir"/share/locale/fr/LC_MESSAGES/foo-baz.mo
+  test ! -r "$instdir"/share/locale/fr/LC_MESSAGES/foo-baz.mo
   # Check that the two .mo files for the same language are different.
   cmp "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.mo \
       "$instdir"/share/locale/de/LC_MESSAGES/foo-baz.mo && Exit 1
diff --git a/tests/pot-topsrcdir.test b/tests/pot-topsrcdir.test
index 24837dc..502c669 100755
--- a/tests/pot-topsrcdir.test
+++ b/tests/pot-topsrcdir.test
@@ -149,7 +149,7 @@ END
     $MAKE install
 
     test -f $sourcedir/foo-bar.pot
-    test $builddir = '.' || test ! -f foo-bar.pot || Exit 1
+    test $builddir = '.' || test ! -r foo-bar.pot || Exit 1
     grep -v 'POT-Creation-Date' $sourcedir/foo-bar.pot | LC_ALL=C tr -d '\r' > 
actual
     diff actual $sourcedir/expected
     rm -f actual
@@ -163,12 +163,12 @@ END
       # Check that "make install" installed de,po and fr.po but not es.po.
       test -f "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.mo
       test -f "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.mo
-      test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo
+      test ! -r "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo
     else
       # Check that "make install" installed de.po but not fr.po nor es.po.
       test -f "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.mo
-      test ! -f "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.mo
-      test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo
+      test ! -r "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.mo
+      test ! -r "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo
     fi
 
     # Check that "make distdir" creates the expected .pot file.
@@ -178,7 +178,7 @@ END
     $MAKE distdir
 
     test -f $sourcedir/foo-bar.pot
-    test $builddir = '.' || test ! -f foo-bar.pot || Exit 1
+    test $builddir = '.' || test ! -r foo-bar.pot || Exit 1
     grep -v 'POT-Creation-Date' $sourcedir/foo-bar.pot | LC_ALL=C tr -d '\r' > 
actual
     diff actual $sourcedir/expected
     rm -f actual
diff --git a/tests/pot-xgettext1.test b/tests/pot-xgettext1.test
index 704657a..13dadf4 100755
--- a/tests/pot-xgettext1.test
+++ b/tests/pot-xgettext1.test
@@ -91,7 +91,7 @@ for builddir in . sub; do
   $MAKE distdir
 
   test -f $sourcedir/posub/foo-bar.pot
-  test $builddir = '.' || test ! -f posub/foo-bar.pot || Exit 1
+  test $builddir = '.' || test ! -r posub/foo-bar.pot || Exit 1
   grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d 
'\r' > actual
   diff actual $sourcedir/expected
   rm -f actual
diff --git a/tests/pot-xgettext2.test b/tests/pot-xgettext2.test
index c4006e4..f19bf1c 100755
--- a/tests/pot-xgettext2.test
+++ b/tests/pot-xgettext2.test
@@ -91,7 +91,7 @@ for builddir in . sub; do
   $MAKE distdir
 
   test -f $sourcedir/posub/foo-bar.pot
-  test $builddir = '.' || test ! -f posub/foo-bar.pot || Exit 1
+  test $builddir = '.' || test ! -r posub/foo-bar.pot || Exit 1
   grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d 
'\r' > actual
   diff actual $sourcedir/expected
   rm -f actual
diff --git a/tests/pot-xgettext3.test b/tests/pot-xgettext3.test
index 9be72ef..9e1b84f 100755
--- a/tests/pot-xgettext3.test
+++ b/tests/pot-xgettext3.test
@@ -106,7 +106,7 @@ for builddir in . sub; do
   $MAKE distdir
 
   test -f $sourcedir/posub/foo-bar.pot
-  test $builddir = '.' || test ! -f posub/foo-bar.pot || Exit 1
+  test $builddir = '.' || test ! -r posub/foo-bar.pot || Exit 1
   grep -v 'POT-Creation-Date' $sourcedir/posub/foo-bar.pot | LC_ALL=C tr -d 
'\r' > actual
   diff actual $sourcedir/expected
   rm -f actual
diff --git a/tests/pot-xgettext4.test b/tests/pot-xgettext4.test
index 545c53d..a7b7d96 100755
--- a/tests/pot-xgettext4.test
+++ b/tests/pot-xgettext4.test
@@ -101,7 +101,7 @@ for builddir in . sub; do
   $MAKE distdir
 
   test -f $sourcedir/maude.pot
-  test $builddir = '.' || test ! -f maude.pot || Exit 1
+  test $builddir = '.' || test ! -r maude.pot || Exit 1
   grep -v 'POT-Creation-Date' $sourcedir/maude.pot | LC_ALL=C tr -d '\r' > 
actual
   diff actual $sourcedir/expected
   rm -f actual
-- 
1.7.1


reply via email to

[Prev in Thread] Current Thread [Next in Thread]