git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/2] t/README: hint about using $(pwd) rather than $PWD in tests

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Jan 11, 2011, 07:44 UTC
Message-ID
<4D2C0A5E.7090708@viscovery.net>
In-Reply-To
<4D2C09D7.3070700@viscovery.net>
From: Johannes Sixt <j6t@kdbg.org>

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>
---
 t/README |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/t/README b/t/README
index 90718b4..f98ebb3 100644
--- a/t/README
+++ b/t/README
@@ -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.
-- 
1.7.4.rc1.1258.g84aa
Previous: Nguyen Thai Ngoc DuyNext: Jonathan Nieder
Message 7 of 12 in “Re: [PATCH] Fix expected values of setup tests on Windows”
  1. Nguyen Thai Ngoc DuyDec 31, 2010
  2. Johannes SixtDec 31, 2010
  3. Jonathan NiederDec 31, 2010
  4. Johannes SixtDec 31, 2010
  5. Junio C HamanoJan 2, 2011
  6. Nguyen Thai Ngoc DuyJan 1, 2011
  7. 2/2 t/README: hint about using $(pwd) rather than $PWD in testsJohannes Sixt, Jan 11, 2011
  8. Jonathan NiederJan 11, 2011
  9. Johannes SixtJan 11, 2011
  10. Jonathan NiederJan 11, 2011
  11. Johannes SixtJan 11, 2011
  12. Junio C HamanoJan 11, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.