changeset 21930:a5168eb9b2bc stable

tests: cat error messages are different on Solaris
author Danek Duvall <danek.duvall@oracle.com>
date Mon, 21 Jul 2014 11:27:24 -0700
parents 5bd11162c0a4
children 89b809fa6cef
files contrib/check-code.py tests/test-histedit-edit.t tests/test-issue3084.t tests/test-mq-qfold.t tests/test-mq-qnew.t tests/test-mq-qrefresh-replace-log-message.t tests/test-subrepo-svn.t tests/test-tag.t
diffstat 8 files changed, 10 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/check-code.py	Sun Jul 20 15:06:12 2014 -0300
+++ b/contrib/check-code.py	Mon Jul 21 11:27:24 2014 -0700
@@ -168,6 +168,8 @@
     (r'^  .*: largefile \S+ not available from file:.*/.*[^)]$', winglobmsg),
     (r'^  .*file://\$TESTTMP',
      'write "file:/*/$TESTTMP" + (glob) to match on windows too'),
+    (r'^  (cat|find): .*: No such file or directory',
+     'use test -f to test for file existence'),
   ],
   # warnings
   [
--- a/tests/test-histedit-edit.t	Sun Jul 20 15:06:12 2014 -0300
+++ b/tests/test-histedit-edit.t	Mon Jul 21 11:27:24 2014 -0700
@@ -233,8 +233,7 @@
   > EOF
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   abort: emulating unexpected abort
-  $ cat .hg/last-message.txt
-  cat: .hg/last-message.txt: No such file or directory
+  $ test -f .hg/last-message.txt
   [1]
 
   $ cat >> .hg/hgrc <<EOF
--- a/tests/test-issue3084.t	Sun Jul 20 15:06:12 2014 -0300
+++ b/tests/test-issue3084.t	Mon Jul 21 11:27:24 2014 -0700
@@ -165,8 +165,7 @@
   $ chmod 755 .hg
 #endif
 
-  $ find .hg/largefiles
-  find: `.hg/largefiles': No such file or directory
+  $ test -f .hg/largefiles
   [1]
 
 ancestor is "normal":
--- a/tests/test-mq-qfold.t	Sun Jul 20 15:06:12 2014 -0300
+++ b/tests/test-mq-qfold.t	Mon Jul 21 11:27:24 2014 -0700
@@ -182,8 +182,7 @@
   refresh interrupted while patch was popped! (revert --all, qpush to recover)
   abort: emulating unexpected abort
   [255]
-  $ cat .hg/last-message.txt
-  cat: .hg/last-message.txt: No such file or directory
+  $ test -f .hg/last-message.txt
   [1]
 
 (reset applied patches and directory status)
--- a/tests/test-mq-qnew.t	Sun Jul 20 15:06:12 2014 -0300
+++ b/tests/test-mq-qnew.t	Mon Jul 21 11:27:24 2014 -0700
@@ -268,8 +268,7 @@
   $ HGEDITOR="sh $TESTTMP/editor.sh" hg qnew -e patch
   abort: emulating unexpected abort
   [255]
-  $ cat .hg/last-message.txt
-  cat: .hg/last-message.txt: No such file or directory
+  $ test -f .hg/last-message.txt
   [1]
 
 (test that editor is invoked and commit message is saved into
--- a/tests/test-mq-qrefresh-replace-log-message.t	Sun Jul 20 15:06:12 2014 -0300
+++ b/tests/test-mq-qrefresh-replace-log-message.t	Mon Jul 21 11:27:24 2014 -0700
@@ -133,8 +133,7 @@
   refresh interrupted while patch was popped! (revert --all, qpush to recover)
   abort: emulating unexpected abort
   [255]
-  $ cat .hg/last-message.txt
-  cat: .hg/last-message.txt: No such file or directory
+  $ test -f .hg/last-message.txt
   [1]
 
 (reset applied patches and directory status)
--- a/tests/test-subrepo-svn.t	Sun Jul 20 15:06:12 2014 -0300
+++ b/tests/test-subrepo-svn.t	Mon Jul 21 11:27:24 2014 -0700
@@ -672,11 +672,9 @@
   $ cd tc
   $ grep ' s$' .hgsubstate
   16 s
-  $ cat s/.hg/hgrc
-  cat: s/.hg/hgrc: No such file or directory
+  $ test -f s/.hg/hgrc
   [1]
-  $ cat s/sub/.hg/hgrc
-  cat: s/sub/.hg/hgrc: No such file or directory
+  $ test -f s/sub/.hg/hgrc
   [1]
 
 Test that sanitizing is omitted in meta data area:
--- a/tests/test-tag.t	Sun Jul 20 15:06:12 2014 -0300
+++ b/tests/test-tag.t	Mon Jul 21 11:27:24 2014 -0700
@@ -242,8 +242,7 @@
   $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg tag custom-tag -e
   abort: pretag.test-saving-lastmessage hook exited with status 1
   [255]
-  $ cat .hg/last-message.txt
-  cat: .hg/last-message.txt: No such file or directory
+  $ test -f .hg/last-message.txt
   [1]
 
 (test that editor is invoked and commit message is saved into