path-utils test: rename mingw_path function to print_path
mingw_path was introduced in abd4284 to output a mangled path as it is passed as an argument to main(). But the name is misleading because mangling does not come from MinGW, but from MSYS [1]. As abd4284 does not introduce any MSYS or MinGW specific code but just prints out argv[2] as it is passed to main(), give the function the more generic and less confusing name "print_path". [1] http://www.mingw.org/wiki/Posix_path_conversion Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Sebastian Schuberth committed
Oct 10, 2013 at 22:49 UTC
7ffd18fce1eef2670661c2e7fd0cb3ef0b8b7fb7
2 files changed
+3
-3
t/t0060-path-utils.sh
+2
-2
@@ -8,13 +8,13 @@ test_description='Test various path utilities'
8
. ./test-lib.sh
9
10
norm_path() {
11
- expected=$(test-path-utils mingw_path "$2")
11
+ expected=$(test-path-utils print_path "$2")
12
test_expect_success $3 "normalize path: $1 => $2" \
13
"test \"\$(test-path-utils normalize_path_copy '$1')\" = '$expected'"
14
}
15
16
relative_path() {
17
- expected=$(test-path-utils mingw_path "$3")
17
+ expected=$(test-path-utils print_path "$3")
18
test_expect_success $4 "relative path: $1 $2 => $3" \
19
"test \"\$(test-path-utils relative_path '$1' '$2')\" = '$expected'"
20
}
test-path-utils.c
+1
-1
@@ -116,7 +116,7 @@ int main(int argc, char **argv)
116
return 0;
117
}
118
119
- if (argc == 3 && !strcmp(argv[1], "mingw_path")) {
119
+ if (argc == 3 && !strcmp(argv[1], "print_path")) {
120
puts(argv[2]);
121
return 0;
122
}