summaryrefslogtreecommitdiff
path: root/test-path-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'test-path-utils.c')
-rw-r--r--test-path-utils.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test-path-utils.c b/test-path-utils.c
index 5168a8e3df..d261398d6c 100644
--- a/test-path-utils.c
+++ b/test-path-utils.c
@@ -26,6 +26,12 @@ int main(int argc, char **argv)
return 0;
}
+ if (argc == 4 && !strcmp(argv[1], "strip_path_suffix")) {
+ char *prefix = strip_path_suffix(argv[2], argv[3]);
+ printf("%s\n", prefix ? prefix : "(null)");
+ return 0;
+ }
+
fprintf(stderr, "%s: unknown function name: %s\n", argv[0],
argv[1] ? argv[1] : "(there was none)");
return 1;