aboutsummaryrefslogtreecommitdiff
path: root/t/t3404-rebase-interactive.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t3404-rebase-interactive.sh')
-rwxr-xr-xt/t3404-rebase-interactive.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 3de0b1dcf..9067e0206 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -1234,7 +1234,7 @@ test_expect_success 'tabs and spaces are accepted in the todolist' '
# Turn single spaces into space/tab mix
sed "1s/ / /g; 2s/ / /g; 3s/ / /g" "$1"
printf "\n\t# comment\n #more\n\t # comment\n"
- ) >$1.new
+ ) >"$1.new"
mv "$1.new" "$1"
EOF
test_set_editor "$(pwd)/add-indent.sh" &&
@@ -1261,4 +1261,16 @@ test_expect_success 'static check of bad SHA-1' '
test E = $(git cat-file commit HEAD | sed -ne \$p)
'
+test_expect_success 'editor saves as CR/LF' '
+ git checkout -b with-crlf &&
+ write_script add-crs.sh <<-\EOF &&
+ sed -e "s/\$/Q/" <"$1" | tr Q "\\015" >"$1".new &&
+ mv -f "$1".new "$1"
+ EOF
+ (
+ test_set_editor "$(pwd)/add-crs.sh" &&
+ git rebase -i HEAD^
+ )
+'
+
test_done