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.
diff --git a/ChangeLog b/ChangeLog
index fbead47..3872db4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,28 @@
 2010-09-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
+	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: prefer `make distdir' over `make dist'.
 	Instead of running `make dist', then uncompressing the created
 	tarball, and then grepping the uncompressed tar archive, we can
diff --git a/tests/pot-copyright.test b/tests/pot-copyright.test
index fb11367..68c6b33 100755
--- a/tests/pot-copyright.test
+++ b/tests/pot-copyright.test
@@ -91,7 +91,7 @@
   $MAKE dist
 
   test -f $sourcedir/posub/foo-bar.pot
-  test $builddir = '.' || test ! -f posub/foo-bar.pot
+  test $builddir = '.' || test ! -r posub/foo-bar.pot
   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 @@
   $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 7e85c4d..342a2e5 100755
--- a/tests/pot-format-csharp1.test
+++ b/tests/pot-format-csharp1.test
@@ -136,37 +136,37 @@
     $MAKE install
 
     test -f $sourcedir/posub/foo-bar.pot
-    test $builddir = '.' || test ! -f posub/foo-bar.pot
+    test $builddir = '.' || test ! -r posub/foo-bar.pot
     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/foo-bar-fr_CA@latin.po
-    test ! -f $sourcedir/posub/foo-bar-fr_CA@latin.resources.dll
+    test ! -r $sourcedir/posub/foo-bar-fr_CA@latin.resources.dll
     test -f $sourcedir/posub/fr-CA-Latn/foo-bar.resources.dll
-    test ! -f $sourcedir/posub/foo-bar-de.mo
-    test ! -f $sourcedir/posub/foo-bar-fr_CA@latin.mo
+    test ! -r $sourcedir/posub/foo-bar-de.mo
+    test ! -r $sourcedir/posub/foo-bar-fr_CA@latin.mo
 
     if test -z "$config_options"; then
       # Check that "make install" installed de,po and fr_CA@latin.po 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 fr_CA@latin.po 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/fr_CA@latin/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/fr_CA@latin/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/fr_CA@latin/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/fr_CA@latin/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 @@
     $MAKE distdir
 
     test -f $sourcedir/posub/foo-bar.pot
-    test $builddir = '.' || test ! -f posub/foo-bar.pot
+    test $builddir = '.' || test ! -r posub/foo-bar.pot
     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/foo-bar-fr_CA@latin.po
-    test ! -f $sourcedir/posub/foo-bar-fr_CA@latin.resources.dll
+    test ! -r $sourcedir/posub/foo-bar-fr_CA@latin.resources.dll
     test -f $sourcedir/posub/fr-CA-Latn/foo-bar.resources.dll
-    test ! -f $sourcedir/posub/foo-bar-de.mo
-    test ! -f $sourcedir/posub/foo-bar-fr_CA@latin.mo
+    test ! -r $sourcedir/posub/foo-bar-de.mo
+    test ! -r $sourcedir/posub/foo-bar-fr_CA@latin.mo
 
     # 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 c5fdfd4..5316893 100755
--- a/tests/pot-format-java1.test
+++ b/tests/pot-format-java1.test
@@ -137,37 +137,37 @@
     $MAKE install
 
     test -f $sourcedir/posub/foo-bar.pot
-    test $builddir = '.' || test ! -f posub/foo-bar.pot
+    test $builddir = '.' || test ! -r posub/foo-bar.pot
     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 @@
     $MAKE distdir
 
     test -f $sourcedir/posub/foo-bar.pot
-    test $builddir = '.' || test ! -f posub/foo-bar.pot
+    test $builddir = '.' || test ! -r posub/foo-bar.pot
     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 644bc47..5952532 100755
--- a/tests/pot-format-java2.test
+++ b/tests/pot-format-java2.test
@@ -137,37 +137,37 @@
     $MAKE install
 
     test -f $sourcedir/posub/foo-bar.pot
-    test $builddir = '.' || test ! -f posub/foo-bar.pot
+    test $builddir = '.' || test ! -r posub/foo-bar.pot
     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 @@
     $MAKE distdir
 
     test -f $sourcedir/posub/foo-bar.pot
-    test $builddir = '.' || test ! -f posub/foo-bar.pot
+    test $builddir = '.' || test ! -r posub/foo-bar.pot
     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 c88f6cd..6df1af2 100755
--- a/tests/pot-format-qt1.test
+++ b/tests/pot-format-qt1.test
@@ -162,7 +162,7 @@
     $MAKE install
 
     test -f $sourcedir/posub/foo-bar.pot
-    test $builddir = '.' || test ! -f posub/foo-bar.pot
+    test $builddir = '.' || test ! -r posub/foo-bar.pot
     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 @@
     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 @@
     $MAKE distdir
 
     test -f $sourcedir/posub/foo-bar.pot
-    test $builddir = '.' || test ! -f posub/foo-bar.pot
+    test $builddir = '.' || test ! -r posub/foo-bar.pot
     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 @@
     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 ab3d5ae..6f9f4d3 100755
--- a/tests/pot-format-tcl1.test
+++ b/tests/pot-format-tcl1.test
@@ -132,37 +132,37 @@
     $MAKE install
 
     test -f $sourcedir/posub/foo-bar.pot
-    test $builddir = '.' || test ! -f posub/foo-bar.pot
+    test $builddir = '.' || test ! -r posub/foo-bar.pot
     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 @@
     $MAKE distdir
 
     test -f $sourcedir/posub/foo-bar.pot
-    test $builddir = '.' || test ! -f posub/foo-bar.pot
+    test $builddir = '.' || test ! -r posub/foo-bar.pot
     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 7557b87..1df57fb 100755
--- a/tests/pot-linguas.test
+++ b/tests/pot-linguas.test
@@ -152,7 +152,7 @@
     $MAKE install
 
     test -f $sourcedir/posub/foo-bar.pot
-    test $builddir = '.' || test ! -f posub/foo-bar.pot
+    test $builddir = '.' || test ! -r posub/foo-bar.pot
     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 @@
       # 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 @@
     $MAKE distdir
 
     test -f $sourcedir/posub/foo-bar.pot
-    test $builddir = '.' || test ! -f posub/foo-bar.pot
+    test $builddir = '.' || test ! -r posub/foo-bar.pot
     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 aba3df2..36811e9 100755
--- a/tests/pot-msgidbugs.test
+++ b/tests/pot-msgidbugs.test
@@ -94,7 +94,7 @@
   $MAKE distdir
 
   test -f $sourcedir/posub/foo-bar.pot
-  test $builddir = '.' || test ! -f posub/foo-bar.pot
+  test $builddir = '.' || test ! -r posub/foo-bar.pot
   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 @@
   $MAKE distdir
 
   test -f $sourcedir/posub/foo-bar.pot
-  test $builddir = '.' || test ! -f posub/foo-bar.pot
+  test $builddir = '.' || test ! -r posub/foo-bar.pot
   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 4f34264..d604c9e 100755
--- a/tests/pot-no-linguas.test
+++ b/tests/pot-no-linguas.test
@@ -120,7 +120,7 @@
   $MAKE distdir
 
   test -f $sourcedir/posub/foo-bar.pot
-  test $builddir = '.' || test ! -f posub/foo-bar.pot
+  test $builddir = '.' || test ! -r posub/foo-bar.pot
   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 @@
   $MAKE install
 
   test -f $sourcedir/posub/foo-bar.pot
-  test $builddir = '.' || test ! -f posub/foo-bar.pot
+  test $builddir = '.' || test ! -r posub/foo-bar.pot
   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 3773583..6688c6c 100755
--- a/tests/pot-noinst.test
+++ b/tests/pot-noinst.test
@@ -146,14 +146,14 @@
 
     $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 @@
     $MAKE distdir
 
     test -f $sourcedir/posub/foo-bar.pot
-    test $builddir = '.' || test ! -f posub/foo-bar.pot
+    test $builddir = '.' || test ! -r posub/foo-bar.pot
     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 e2e4a77..80dde7f 100755
--- a/tests/pot-override1.test
+++ b/tests/pot-override1.test
@@ -97,7 +97,7 @@
   $MAKE distdir
 
   test -f $sourcedir/posub/foo-bar.pot
-  test $builddir = '.' || test ! -f posub/foo-bar.pot
+  test $builddir = '.' || test ! -r posub/foo-bar.pot
   diff $sourcedir/posub/foo-bar.pot $sourcedir/expected
 
   rm -f $sourcedir/posub/foo-bar.pot
@@ -107,7 +107,7 @@
   $MAKE install
 
   test -f $sourcedir/posub/foo-bar.pot
-  test $builddir = '.' || test ! -f posub/foo-bar.pot
+  test $builddir = '.' || test ! -r posub/foo-bar.pot
   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 ccdd41d..424e582 100755
--- a/tests/pot-samedir.test
+++ b/tests/pot-samedir.test
@@ -168,13 +168,13 @@
   $MAKE install
 
   test -f $sourcedir/posub/foo-bar.pot
-  test $builddir = '.' || test ! -f posub/foo-bar.pot
+  test $builddir = '.' || test ! -r posub/foo-bar.pot
   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
+  test $builddir = '.' || test ! -r posub/foo-baz.pot
   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 @@
   # 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 23ebe67..4e55c6b 100755
--- a/tests/pot-topsrcdir.test
+++ b/tests/pot-topsrcdir.test
@@ -149,7 +149,7 @@
     $MAKE install
 
     test -f $sourcedir/foo-bar.pot
-    test $builddir = '.' || test ! -f foo-bar.pot
+    test $builddir = '.' || test ! -r foo-bar.pot
     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 @@
       # 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 @@
     $MAKE distdir
 
     test -f $sourcedir/foo-bar.pot
-    test $builddir = '.' || test ! -f foo-bar.pot
+    test $builddir = '.' || test ! -r foo-bar.pot
     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 d018fa7..c906fb9 100755
--- a/tests/pot-xgettext1.test
+++ b/tests/pot-xgettext1.test
@@ -91,7 +91,7 @@
   $MAKE distdir
 
   test -f $sourcedir/posub/foo-bar.pot
-  test $builddir = '.' || test ! -f posub/foo-bar.pot
+  test $builddir = '.' || test ! -r posub/foo-bar.pot
   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 0bd2407..4bc2488 100755
--- a/tests/pot-xgettext2.test
+++ b/tests/pot-xgettext2.test
@@ -91,7 +91,7 @@
   $MAKE distdir
 
   test -f $sourcedir/posub/foo-bar.pot
-  test $builddir = '.' || test ! -f posub/foo-bar.pot
+  test $builddir = '.' || test ! -r posub/foo-bar.pot
   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 ef5ad8b..22213b7 100755
--- a/tests/pot-xgettext3.test
+++ b/tests/pot-xgettext3.test
@@ -106,7 +106,7 @@
   $MAKE distdir
 
   test -f $sourcedir/posub/foo-bar.pot
-  test $builddir = '.' || test ! -f posub/foo-bar.pot
+  test $builddir = '.' || test ! -r posub/foo-bar.pot
   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 61b59de..539e143 100755
--- a/tests/pot-xgettext4.test
+++ b/tests/pot-xgettext4.test
@@ -101,7 +101,7 @@
   $MAKE distdir
 
   test -f $sourcedir/maude.pot
-  test $builddir = '.' || test ! -f maude.pot
+  test $builddir = '.' || test ! -r maude.pot
   grep -v 'POT-Creation-Date' $sourcedir/maude.pot | LC_ALL=C tr -d '\r' > actual
   diff actual $sourcedir/expected
   rm -f actual