Skip to content

Commit 95b104c

Browse files
j6tgitster
authored andcommitted
t/README: hint about using $(pwd) rather than $PWD in tests
This adds just a "do it this way" instruction without a lot of explanation, because the details are too complex to be explained at this point. Signed-off-by: Johannes Sixt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e6ec2b6 commit 95b104c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

t/README

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,12 @@ Do:
283283
Tests that are likely to smoke out future regressions are better
284284
than tests that just inflate the coverage metrics.
285285

286+
- When a test checks for an absolute path that a git command generated,
287+
construct the expected value using $(pwd) rather than $PWD,
288+
$TEST_DIRECTORY, or $TRASH_DIRECTORY. It makes a difference on
289+
Windows, where the shell (MSYS bash) mangles absolute path names.
290+
For details, see the commit message of 4114156ae9.
291+
286292
Don't:
287293

288294
- exit() within a <script> part.

0 commit comments

Comments
 (0)