Mercurial > vim
comparison src/testdir/screendump.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 | 156a7c5328a7 |
children | 59a1ff689b4d |
comparison
equal
deleted
inserted
replaced
15102:3908388383e4 | 15103:9339601e7a31 |
---|---|
101 let reference = 'dumps/' . a:filename . '.dump' | 101 let reference = 'dumps/' . a:filename . '.dump' |
102 let testfile = a:filename . '.dump.failed' | 102 let testfile = a:filename . '.dump.failed' |
103 | 103 |
104 let i = 0 | 104 let i = 0 |
105 while 1 | 105 while 1 |
106 " leave some time for updating the original window | |
107 sleep 10m | |
106 call delete(testfile) | 108 call delete(testfile) |
107 call term_dumpwrite(a:buf, testfile, a:options) | 109 call term_dumpwrite(a:buf, testfile, a:options) |
108 if readfile(reference) == readfile(testfile) | 110 if readfile(reference) == readfile(testfile) |
109 call delete(testfile) | 111 call delete(testfile) |
110 break | 112 break |
111 endif | 113 endif |
112 if i == 100 | 114 if i == 100 |
113 " Leave the test file around for inspection. | 115 " Leave the test file around for inspection. |
114 let msg = 'See dump file difference: call term_dumpdiff("' . testfile . '", "' . reference . '")' | 116 let msg = 'See dump file difference: call term_dumpdiff("' . testfile . '", "' . reference . '")' |
115 if a:0 == 1 | 117 if a:0 == 1 |
116 let msg = a:1 . ': ' . msg | 118 let msg = a:1 . ': ' . msg |
117 endif | 119 endif |
118 call assert_report(msg) | 120 call assert_report(msg) |
119 return 1 | 121 return 1 |
120 endif | 122 endif |
121 sleep 10m | |
122 let i += 1 | 123 let i += 1 |
123 endwhile | 124 endwhile |
124 return 0 | 125 return 0 |
125 endfunc | 126 endfunc |