From 55c34cbb7c38e93aa413a166148009fc89e8773e Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Wed, 2 Feb 2022 20:46:32 +0100 Subject: [PATCH] Use physical $PWD Yeah, the macOS tests fail because it's started in /private/var... with a $PWD of /var.... So resolve canonicalizes the path, which makes it no longer match $PWD. Simply use pwd -P --- tests/checks/path.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/checks/path.fish b/tests/checks/path.fish index a0f4d894f..b68b9f87e 100644 --- a/tests/checks/path.fish +++ b/tests/checks/path.fish @@ -113,11 +113,11 @@ path resolve bin//sh | string match -r -- 'bin/bash$' # `path resolve` with nonexistent paths set -l path (path resolve foo/bar) -string match -rq "^"(string escape --style=regex -- $PWD)'/' -- $path +string match -rq "^"(pwd -P | string escape --style=regex)'/' -- $path and echo It matches pwd! or echo pwd is \'$PWD\' resolved path is \'$path\' # CHECK: It matches pwd! -string replace -r "^"(string escape --style=regex -- $PWD)'/' "" -- $path +string replace -r "^"(pwd -P | string escape --style=regex)'/' "" -- $path # CHECK: foo/bar path resolve /banana//terracota/terracota/booooo/../pie