git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH jx/clean-interactive] t0060: skip a few relative_path tests on Windows
@ 2013-06-13  8:23 Johannes Sixt
  2013-06-13  9:40 ` Jiang Xin
  0 siblings, 1 reply; 33+ messages in thread
From: Johannes Sixt @ 2013-06-13  8:23 UTC (permalink / raw)
  To: Jiang Xin; +Cc: Git Mailing List

From: Johannes Sixt <j6t@kdbg.org>

The bash on Windows rewrites paths that look like absolute POSIX paths
when they are a command-line argument of a regular Windows program, such
as git and the test helpers. As a consequence, the actual tests performed
are not what the tests scripts expect.

The tests that need *not* be skipped are those where the two paths passed
to 'test-path-utils relative_path' have the same prefix and the result is
expected to be a relative path. This is because the rewriting changes
"/a/b" to "D:/Src/MSysGit/a/b", and when both inputs are extended the same
way, this just cancels out in the relative path computation.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
 t/t0060-path-utils.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/t/t0060-path-utils.sh b/t/t0060-path-utils.sh
index dfe4747..4deec52 100755
--- a/t/t0060-path-utils.sh
+++ b/t/t0060-path-utils.sh
@@ -190,15 +190,15 @@ test_expect_success SYMLINKS 'real path works on
symlinks' '

 relative_path /a/b/c/	/a/b/		c/
 relative_path /a/b/c/	/a/b		c/
-relative_path /a//b//c/	//a/b//		c/
+relative_path /a//b//c/	//a/b//		c/	POSIX
 relative_path /a/b	/a/b		./
 relative_path /a/b/	/a/b		./
 relative_path /a	/a/b		../
 relative_path /		/a/b/		../../
 relative_path /a/c	/a/b/		../c
 relative_path /a/c	/a/b		../c
-relative_path /a/b	"<empty>"	/a/b
-relative_path /a/b 	"<null>"	/a/b
+relative_path /a/b	"<empty>"	/a/b	POSIX
+relative_path /a/b 	"<null>"	/a/b	POSIX
 relative_path "<empty>"	/a/b		./
 relative_path "<empty>"	"<empty>"	./
 relative_path "<empty>"	"<null>"	./
-- 
1.8.3.1.1670.g1dbc49e

^ permalink raw reply related	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2013-06-25 19:23 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-13  8:23 [PATCH jx/clean-interactive] t0060: skip a few relative_path tests on Windows Johannes Sixt
2013-06-13  9:40 ` Jiang Xin
2013-06-24 15:21   ` [PATCH v14 00/16] Interactive git-clean Jiang Xin
2013-06-24 15:21   ` [PATCH v14 01/16] test: add test cases for relative_path Jiang Xin
2013-06-24 19:01     ` Junio C Hamano
2013-06-25  1:06       ` Jiang Xin
2013-06-25  4:57         ` Junio C Hamano
2013-06-25  7:02           ` Jiang Xin
2013-06-24 15:21   ` [PATCH v14 02/16] path.c: refactor relative_path(), not only strip prefix Jiang Xin
2013-06-24 15:21   ` [PATCH v14 03/16] quote.c: remove path_relative, use relative_path instead Jiang Xin
2013-06-24 19:11     ` Junio C Hamano
2013-06-25 11:09       ` Jiang Xin
2013-06-25 19:23         ` Junio C Hamano
2013-06-24 15:21   ` [PATCH v14 04/16] Refactor quote_path_relative, remove unused params Jiang Xin
2013-06-24 19:15     ` Junio C Hamano
2013-06-25 11:39       ` Jiang Xin
2013-06-24 15:21   ` [PATCH v14 05/16] Refactor write_name_quoted_relative, " Jiang Xin
2013-06-24 19:19     ` Junio C Hamano
2013-06-25 11:51       ` Jiang Xin
2013-06-24 15:21   ` [PATCH v14 06/16] git-clean: refactor git-clean into two phases Jiang Xin
2013-06-24 19:22     ` Junio C Hamano
2013-06-24 15:21   ` [PATCH v14 07/16] git-clean: add support for -i/--interactive Jiang Xin
2013-06-24 15:21   ` [PATCH v14 08/16] git-clean: show items of del_list in columns Jiang Xin
2013-06-24 15:21   ` [PATCH v14 09/16] git-clean: add colors to interactive git-clean Jiang Xin
2013-06-24 15:21   ` [PATCH v14 10/16] git-clean: use a git-add-interactive compatible UI Jiang Xin
2013-06-24 15:21   ` [PATCH v14 11/16] git-clean: add filter by pattern interactive action Jiang Xin
2013-06-24 15:21   ` [PATCH v14 12/16] git-clean: add select by numbers " Jiang Xin
2013-06-24 15:21   ` [PATCH v14 13/16] git-clean: add ask each " Jiang Xin
2013-06-24 15:21   ` [PATCH v14 14/16] git-clean: add documentation for interactive git-clean Jiang Xin
2013-06-24 15:21   ` [PATCH v14 15/16] test: add t7301 for git-clean--interactive Jiang Xin
2013-06-24 15:21   ` [PATCH v14 16/16] test: run testcases with POSIX absolute paths on Windows Jiang Xin
2013-06-24 18:56     ` Johannes Sixt
2013-06-25  0:40       ` Jiang Xin

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).