Skip to content

Commit

Permalink
t/README: hint about using $(pwd) rather than $PWD in tests
Browse files Browse the repository at this point in the history
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 <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Johannes Sixt authored and Junio C Hamano committed Jan 11, 2011
1 parent e6ec2b6 commit 95b104c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions t/README
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,12 @@ Do:
Tests that are likely to smoke out future regressions are better
than tests that just inflate the coverage metrics.

- When a test checks for an absolute path that a git command generated,
construct the expected value using $(pwd) rather than $PWD,
$TEST_DIRECTORY, or $TRASH_DIRECTORY. It makes a difference on
Windows, where the shell (MSYS bash) mangles absolute path names.
For details, see the commit message of 4114156ae9.

Don't:

- exit() within a <script> part.
Expand Down

0 comments on commit 95b104c

Please sign in to comment.