From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,RDNS_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 Received: (qmail 6461 invoked from network); 27 Mar 2020 23:12:16 -0000 Received-SPF: pass (primenet.com.au: domain of zsh.org designates 203.24.36.2 as permitted sender) receiver=inbox.vuxu.org; client-ip=203.24.36.2 envelope-from= Received: from unknown (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTP; 27 Mar 2020 23:12:16 -0000 Received: (qmail 4015 invoked by alias); 27 Mar 2020 23:12:03 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45640 Received: (qmail 18131 invoked by uid 1010); 27 Mar 2020 23:12:03 -0000 X-Qmail-Scanner-Diagnostics: from wout4-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.2/25758. spamassassin: 3.4.2. Clear:RC:0(64.147.123.20):SA:0(-2.6/5.0):. Processed in 4.911796 secs); 27 Mar 2020 23:12:03 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudeitddgtdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkjghfofggtgfgsehtqh dttdertddvnecuhfhrohhmpeffrghnihgvlhcuufhhrghhrghfuceougdrshesuggrnhhi vghlrdhshhgrhhgrfhdrnhgrmhgvqeenucfkphepjeelrddujeeirdduvdehrddvfedvne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepugdrshes uggrnhhivghlrdhshhgrhhgrfhdrnhgrmhgv X-ME-Proxy: Date: Fri, 27 Mar 2020 23:11:18 +0000 From: Daniel Shahaf To: Vin Shelton Cc: "Zsh Hackers' List" Subject: Re: pwd -r vs. pwd test failure Message-ID: <20200327231118.5fe53e85@tarpaulin.shahaf.local2> In-Reply-To: References: <20200326220250.11861abd@tarpaulin.shahaf.local2> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Vin Shelton wrote on Fri, 27 Mar 2020 07:56 -0400: > Almost, but not quite: Does this work better? I added another :P. This catches the case that the source directory isn't a realpath. (The case that the _build_ directory isn't a realpath worked since day one.) 8<--8<-- =46rom 57818d5fde2334965dce508e239af754f1fa565f Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Thu, 26 Mar 2020 21:41:49 +0000 Subject: [PATCH] Fix new test when ${PWD}'s value contains symlinks. --- Test/B13whence.ztst | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Test/B13whence.ztst b/Test/B13whence.ztst index ea0a4dae5..3b35835fe 100644 --- a/Test/B13whence.ztst +++ b/Test/B13whence.ztst @@ -1,7 +1,10 @@ %prep =20 mkdir whence.tmp - pushd whence.tmp + ln -s . whence.tmp/cwd + # cd through the symlink in order to test the case that ${prefix} and + # ${prefix:P} are different + pushd whence.tmp/cwd ln -s real step3 ln -s step3 step2 ln -s step2 step1 @@ -16,13 +19,13 @@ %test =20 ( - path=3D( $PWD/whence.tmp $path ) + path=3D( ${PWD:P}/whence.tmp $path ) whence -S step1 whence -s step1 ) 0q:whence symlink resolution ->$prefix/step1 -> $prefix/step2 -> $prefix/step3 -> $prefix/real ->$prefix/step1 -> $prefix/real +>${prefix:P}/step1 -> ${prefix:P}/step2 -> ${prefix:P}/step3 -> ${prefix:P= }/real +>${prefix:P}/step1 -> ${prefix:P}/real =20 ( path=3D( $PWD/whence.tmp $path ) Cheers, Daniel