aboutsummaryrefslogtreecommitdiffstats
path: root/t/t1300-config.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t1300-config.sh')
-rwxr-xr-xt/t1300-config.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t1300-config.sh b/t/t1300-config.sh
index 51a85e83c2..f856821839 100755
--- a/t/t1300-config.sh
+++ b/t/t1300-config.sh
@@ -2851,4 +2851,15 @@ test_expect_success 'writing to stdin is rejected' '
done
+test_expect_success 'writing value with trailing CR not stripped on read' '
+ test_when_finished "rm -rf cr-test" &&
+
+ printf "bar\r\n" >expect &&
+ git init cr-test &&
+ git -C cr-test config set core.foo $(printf "bar\r") &&
+ git -C cr-test config get core.foo >actual &&
+
+ test_cmp expect actual
+'
+
test_done