tests: check for file existance in a portable way
authorJoerg Sonnenberger <joerg@bec.de>
Thu, 09 Apr 2020 19:51:03 +0200
changeset 5318 a799f5d228f1
parent 5317 baa0b481eec5
child 5319 6a4a65edecdc
tests: check for file existance in a portable way The precise output of ls is highly OS specific, so just use the simpler test command.
tests/test-evolve-interrupted.t
--- a/tests/test-evolve-interrupted.t	Thu Apr 09 19:50:03 2020 +0200
+++ b/tests/test-evolve-interrupted.t	Thu Apr 09 19:51:03 2020 +0200
@@ -89,9 +89,8 @@
   $ hg evolve --abort
   evolve aborted
   working directory is now at e1989e4b1526
-  $ ls .hg/evolvestate
-  ls: cannot access '?.hg/evolvestate'?: No such file or directory (re)
-  [2]
+  $ test -f .hg/evolvestate
+  [1]
   $ cat b
   blueberry
   $ hg l