Mercurial > hg-stable
changeset 49598:13c0e3b4fd35 stable
tests: use `test -f` instead of `ls` to see if a file is present (issue6662)
ls's exit code when file doesn't exist is 2 on Linux and 1 on NetBSD, so let's
use something that's supposedly more portable, since we only care whether the
file is there or not.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Mon, 05 Dec 2022 19:37:12 +0400 |
parents | c52435820bbd |
children | 48e38b179106 |
files | tests/test-status-tracked-key.t |
diffstat | 1 files changed, 4 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-status-tracked-key.t Mon Dec 05 17:28:40 2022 +0100 +++ b/tests/test-status-tracked-key.t Mon Dec 05 19:37:12 2022 +0400 @@ -165,8 +165,7 @@ Test upgrade and downgrade ========================== - $ ls .hg/dirstate-tracked-hint - .hg/dirstate-tracked-hint + $ test -f .hg/dirstate-tracked-hint $ hg debugrequires | grep 'tracked' dirstate-tracked-key-v1 @@ -181,9 +180,8 @@ no revlogs to process - $ ls -1 .hg/dirstate-tracked-hint - ls: *.hg/dirstate-tracked-hint*: $ENOENT$ (glob) - [2] + $ test -f .hg/dirstate-tracked-hint + [1] $ hg debugrequires | grep 'tracked' [1] @@ -198,8 +196,7 @@ no revlogs to process - $ ls -1 .hg/dirstate-tracked-hint - .hg/dirstate-tracked-hint + $ test -f .hg/dirstate-tracked-hint $ hg debugrequires | grep 'tracked' dirstate-tracked-key-v1 $ cd ..