test-dispatch: Make test of removed working directory work on AIX (issue2315) stable
authorMads Kiilerich <mads@kiilerich.com>
Mon, 09 Aug 2010 21:43:39 +0200
branchstable
changeset 11772 423ece53380e
parent 11769 ca6cebd8734e
child 11773 6a5e159eb93e
child 11776 13921a1af02b
child 11825 3742046d3729
test-dispatch: Make test of removed working directory work on AIX (issue2315) AIX sh won't delete its own working directory. Removing it from another process works. Also hide the actual OS error message - operating systems returns different errors when getcwd fails.
tests/test-dispatch
tests/test-dispatch.out
--- a/tests/test-dispatch	Mon Aug 09 15:31:56 2010 +0200
+++ b/tests/test-dispatch	Mon Aug 09 21:43:39 2010 +0200
@@ -22,8 +22,8 @@
 hg cat a
 
 echo '% working directory removed'
-rm -rf $dir/a
-hg --version
+sh -c "cd $dir && rm -rf a"
+hg --version 2>&1 | sed -e 's,\(abort:.*:\).*$,\1 ...,g'
 
 echo '% no repo'
 cd $dir
--- a/tests/test-dispatch.out	Mon Aug 09 15:31:56 2010 +0200
+++ b/tests/test-dispatch.out	Mon Aug 09 21:43:39 2010 +0200
@@ -34,6 +34,6 @@
 a
 a: No such file in rev 000000000000
 % working directory removed
-abort: error getting current working directory: No such file or directory
+abort: error getting current working directory: ...
 % no repo
 abort: There is no Mercurial repository here (.hg not found)!