• Jiang Xin's avatar
    test: run testcases with POSIX absolute paths on Windows · abd4284b
    Jiang Xin authored
    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's avatarJiang Xin <[email protected]>
    Signed-off-by: default avatarJunio C Hamano <[email protected]>
    abd4284b
test-path-utils.c 3.54 KB