patch 8.1.0923: terminal dump diff swap does not update file names
Problem: Terminal dump diff swap does not update file names.
Solution: Also swap the file name. Add a test.
diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim
index 9529b76..4bac4f9 100644
--- a/src/testdir/test_terminal.vim
+++ b/src/testdir/test_terminal.vim
@@ -1124,6 +1124,24 @@
quit
endfunc
+func Test_terminal_dumpdiff_swap()
+ call assert_equal(1, winnr('$'))
+ call term_dumpdiff('dumps/Test_popup_command_01.dump', 'dumps/Test_popup_command_03.dump')
+ call assert_equal(2, winnr('$'))
+ call assert_equal(62, line('$'))
+ call assert_match('Test_popup_command_01.dump', getline(21))
+ call assert_match('Test_popup_command_03.dump', getline(42))
+ call assert_match('Undo', getline(3))
+ call assert_match('three four five', getline(45))
+
+ normal s
+ call assert_match('Test_popup_command_03.dump', getline(21))
+ call assert_match('Test_popup_command_01.dump', getline(42))
+ call assert_match('three four five', getline(3))
+ call assert_match('Undo', getline(45))
+ quit
+endfunc
+
func Test_terminal_dumpdiff_options()
set laststatus=0
call assert_equal(1, winnr('$'))