All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Jiang Xin <worldhello.net@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: [PATCH jx/clean-interactive] t0060: skip a few relative_path tests on Windows
Date: Thu, 13 Jun 2013 10:23:34 +0200	[thread overview]
Message-ID: <51B98186.2020100@viscovery.net> (raw)

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

             reply	other threads:[~2013-06-13  8:23 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-13  8:23 Johannes Sixt [this message]
2013-06-13  9:40 ` [PATCH jx/clean-interactive] t0060: skip a few relative_path tests on Windows 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51B98186.2020100@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=git@vger.kernel.org \
    --cc=worldhello.net@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.