]> git.ipfire.org Git - thirdparty/git.git/commit - t/t0060-path-utils.sh
test: run testcases with POSIX absolute paths on Windows
authorJiang Xin <worldhello.net@gmail.com>
Tue, 25 Jun 2013 15:53:57 +0000 (23:53 +0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 26 Jun 2013 18:25:12 +0000 (11:25 -0700)
commitabd4284bc62127a2db69c8c81501a56bb29284c8
tree1c21a7699b9267454c944f1c6fedca0c25d4a0d8
parentdb627fd568410499c47d764937c3d7a10bbadffa
test: run testcases with POSIX absolute paths on Windows

Some test cases are skipped on Windows by marking with POSIX prereq.
This is because arguments look like absolute paths (such as /a/b)
for regular Windows programs (*.exe executables, no bash scripts)
are changed to Windows paths (like C:/msysgit/a/b).

There is no cygpath nor equivalent on msysGit, but it is easy to
write one. New subcommand "mingw_path" is added in test-path-utils,
so that we can get the expected absolute paths on Windows. E.g.

    COMMAND LINE                        Linux output  Windows output
    ==================================  ============  ===============
    test-path-utils mingw_path /        /             C:/msysgit
    test-path-utils mingw_path /a/b/    /a/b/         C:/msysgit/a/b/

With this utility, most skipped test cases in t0060 can be turned on
to be tested correctly on Windows.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t0060-path-utils.sh
test-path-utils.c