diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-12-04 22:24:16 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-12-04 22:24:16 +0100 |
commit | b6fc72851c45a36a370f9516c68508e47b41c4c1 (patch) | |
tree | 7da05b1356fc904ee84d4a41f894d84b9fa1689e /src/testdir/test_diffmode.vim | |
parent | 97195685334c800c5ad1328d957d1bf21f5fa1fa (diff) |
patch 8.1.0562: parsing of 'diffopt' is slightly wrongv8.1.0562
Problem: Parsing of 'diffopt' is slightly wrong.
Solution: Fix the parsing and add a test. (Jason Franklin, Christian
Brabandt)
Diffstat (limited to 'src/testdir/test_diffmode.vim')
-rw-r--r-- | src/testdir/test_diffmode.vim | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/testdir/test_diffmode.vim b/src/testdir/test_diffmode.vim index 4f20395ab1..84fb4519c3 100644 --- a/src/testdir/test_diffmode.vim +++ b/src/testdir/test_diffmode.vim @@ -813,8 +813,16 @@ func Test_diff_screen() call term_sendkeys(buf, ":set diffopt+=internal\<cr>") call VerifyScreenDump(buf, 'Test_diff_10', {}) - call term_sendkeys(buf, ":set diffopt+=indent-heuristic\<cr>") - call VerifyScreenDump(buf, 'Test_diff_11', {}) + " Leave trailing : at commandline! + call term_sendkeys(buf, ":set diffopt+=indent-heuristic\<cr>:\<cr>") + call VerifyScreenDump(buf, 'Test_diff_11', {}, 'one') + " shouldn't matter, if indent-algorithm comes before or after the algorithm + call term_sendkeys(buf, ":set diffopt&\<cr>") + call term_sendkeys(buf, ":set diffopt+=indent-heuristic,algorithm:patience\<cr>:\<cr>") + call VerifyScreenDump(buf, 'Test_diff_11', {}, 'two') + call term_sendkeys(buf, ":set diffopt&\<cr>") + call term_sendkeys(buf, ":set diffopt+=algorithm:patience,indent-heuristic\<cr>:\<cr>") + call VerifyScreenDump(buf, 'Test_diff_11', {}, 'three') " Test 12: diff the same file call WriteDiffFiles(buf, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) |