summaryrefslogtreecommitdiff
path: root/tests-clar/config/stress.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests-clar/config/stress.c')
-rw-r--r--tests-clar/config/stress.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests-clar/config/stress.c b/tests-clar/config/stress.c
index 317e877f7..db354376a 100644
--- a/tests-clar/config/stress.c
+++ b/tests-clar/config/stress.c
@@ -73,3 +73,20 @@ void test_config_stress__escape_subsection_names(void)
cl_assert(!strcmp("foo", str));
git_config_free(config);
}
+
+void test_config_stress__trailing_backslash(void)
+{
+ git_config *config;
+ const char *str;
+ const char *path = "C:\\iam\\some\\windows\\path\\";
+
+ cl_assert(git_path_exists("git-test-config"));
+ cl_git_pass(git_config_open_ondisk(&config, TEST_CONFIG));
+ cl_git_pass(git_config_set_string(config, "windows.path", path));
+ git_config_free(config);
+
+ cl_git_pass(git_config_open_ondisk(&config, TEST_CONFIG));
+ cl_git_pass(git_config_get_string(&str, config, "windows.path"));
+ cl_assert_equal_s(path, str);
+ git_config_free(config);
+}