Mercurial > hg
changeset 49594:88a8de821b5e stable
tests: make running ls in a no longer existing directory more portable
On Linux, ls -A simply returns nothing and the exit code is 0.
On NetBSD, ls -A complains that . doesn't exist and the exit code is 1.
Sadly, it's not possible to do something like "[1] (?)", so " || true" is the
best I could come up with.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Mon, 14 Nov 2022 19:58:44 +0400 |
parents | e11760daee12 |
children | b78ae134ac92 |
files | tests/test-removeemptydirs.t |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-removeemptydirs.t Mon Nov 14 19:38:57 2022 +0400 +++ b/tests/test-removeemptydirs.t Mon Nov 14 19:58:44 2022 +0400 @@ -155,7 +155,8 @@ <directory is no longer accessible> $ ls -A $TESTTMP/hghistedit/somedir foo - $ ls -A + $ ls -A || true + ls: .: $ENOENT$ (?) #endif Get out of the doomed directory