Mercurial > vim
comparison src/testdir/test_diffmode.vim @ 15103:9339601e7a31 v8.1.0562
patch 8.1.0562: parsing of 'diffopt' is slightly wrong
commit https://github.com/vim/vim/commit/b6fc72851c45a36a370f9516c68508e47b41c4c1
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Dec 4 22:24:16 2018 +0100
patch 8.1.0562: parsing of 'diffopt' is slightly wrong
Problem: Parsing of 'diffopt' is slightly wrong.
Solution: Fix the parsing and add a test. (Jason Franklin, Christian
Brabandt)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 04 Dec 2018 22:30:07 +0100 |
parents | 28fde4aa8534 |
children | 360c93a884d0 |
comparison
equal
deleted
inserted
replaced
15102:3908388383e4 | 15103:9339601e7a31 |
---|---|
811 \ ' values.each do |v|', ' v.finalize', ' end']) | 811 \ ' values.each do |v|', ' v.finalize', ' end']) |
812 call term_sendkeys(buf, ":diffupdate!\<cr>") | 812 call term_sendkeys(buf, ":diffupdate!\<cr>") |
813 call term_sendkeys(buf, ":set diffopt+=internal\<cr>") | 813 call term_sendkeys(buf, ":set diffopt+=internal\<cr>") |
814 call VerifyScreenDump(buf, 'Test_diff_10', {}) | 814 call VerifyScreenDump(buf, 'Test_diff_10', {}) |
815 | 815 |
816 call term_sendkeys(buf, ":set diffopt+=indent-heuristic\<cr>") | 816 " Leave trailing : at commandline! |
817 call VerifyScreenDump(buf, 'Test_diff_11', {}) | 817 call term_sendkeys(buf, ":set diffopt+=indent-heuristic\<cr>:\<cr>") |
818 call VerifyScreenDump(buf, 'Test_diff_11', {}, 'one') | |
819 " shouldn't matter, if indent-algorithm comes before or after the algorithm | |
820 call term_sendkeys(buf, ":set diffopt&\<cr>") | |
821 call term_sendkeys(buf, ":set diffopt+=indent-heuristic,algorithm:patience\<cr>:\<cr>") | |
822 call VerifyScreenDump(buf, 'Test_diff_11', {}, 'two') | |
823 call term_sendkeys(buf, ":set diffopt&\<cr>") | |
824 call term_sendkeys(buf, ":set diffopt+=algorithm:patience,indent-heuristic\<cr>:\<cr>") | |
825 call VerifyScreenDump(buf, 'Test_diff_11', {}, 'three') | |
818 | 826 |
819 " Test 12: diff the same file | 827 " Test 12: diff the same file |
820 call WriteDiffFiles(buf, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) | 828 call WriteDiffFiles(buf, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) |
821 call VerifyBoth(buf, 'Test_diff_12', '') | 829 call VerifyBoth(buf, 'Test_diff_12', '') |
822 | 830 |