diff options
| author | bfredl <bjorn.linse@gmail.com> | 2024-04-08 08:32:45 +0200 |
|---|---|---|
| committer | bfredl <bjorn.linse@gmail.com> | 2024-04-09 09:09:41 +0200 |
| commit | 3d44340cea08b06c27b87496e8149bc8a03766a2 (patch) | |
| tree | 9abf9a57e3d0f3b54905c3b916e05da0e53b78c9 /test/functional/ui/diff_spec.lua | |
| parent | c695caa7eeb16fdf5c5bf0c00644daf085f8a13a (diff) | |
| download | rneovim-3d44340cea08b06c27b87496e8149bc8a03766a2.tar.gz rneovim-3d44340cea08b06c27b87496e8149bc8a03766a2.tar.bz2 rneovim-3d44340cea08b06c27b87496e8149bc8a03766a2.zip | |
fix(tests): use more global highlight definitions
Diffstat (limited to 'test/functional/ui/diff_spec.lua')
| -rw-r--r-- | test/functional/ui/diff_spec.lua | 1230 |
1 files changed, 590 insertions, 640 deletions
diff --git a/test/functional/ui/diff_spec.lua b/test/functional/ui/diff_spec.lua index 7aab061dc3..15b419c691 100644 --- a/test/functional/ui/diff_spec.lua +++ b/test/functional/ui/diff_spec.lua @@ -40,17 +40,6 @@ describe('Diff mode screen', function() screen = Screen.new(40, 16) screen:attach() - screen:set_default_attr_ids({ - [1] = { foreground = Screen.colors.DarkBlue, background = Screen.colors.WebGray }, - [2] = { background = Screen.colors.LightCyan1, bold = true, foreground = Screen.colors.Blue1 }, - [3] = { reverse = true }, - [4] = { background = Screen.colors.LightBlue }, - [5] = { foreground = Screen.colors.DarkBlue, background = Screen.colors.LightGrey }, - [6] = { bold = true, foreground = Screen.colors.Blue1 }, - [7] = { bold = true, reverse = true }, - [8] = { bold = true, background = Screen.colors.Red }, - [9] = { background = Screen.colors.LightMagenta }, - }) end) it('Add a line in beginning of file 2', function() @@ -60,31 +49,31 @@ describe('Diff mode screen', function() feed(':set diffopt=filler<cr>') screen:expect([[ - {1: }{2:------------------}│{1: }{4:0 }| - {1: }^1 │{1: }1 | - {1: }2 │{1: }2 | - {1: }3 │{1: }3 | - {1: }4 │{1: }4 | - {1: }5 │{1: }5 | - {1: }6 │{1: }6 | - {1:+ }{5:+-- 4 lines: 7···}│{1:+ }{5:+-- 4 lines: 7··}| - {6:~ }│{6:~ }|*6 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }{23:------------------}│{7: }{22:0 }| + {7: }^1 │{7: }1 | + {7: }2 │{7: }2 | + {7: }3 │{7: }3 | + {7: }4 │{7: }4 | + {7: }5 │{7: }5 | + {7: }6 │{7: }6 | + {7:+ }{13:+-- 4 lines: 7···}│{7:+ }{13:+-- 4 lines: 7··}| + {1:~ }│{1:~ }|*6 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt=filler | ]]) feed(':set diffopt+=internal<cr>') screen:expect([[ - {1: }{2:------------------}│{1: }{4:0 }| - {1: }^1 │{1: }1 | - {1: }2 │{1: }2 | - {1: }3 │{1: }3 | - {1: }4 │{1: }4 | - {1: }5 │{1: }5 | - {1: }6 │{1: }6 | - {1:+ }{5:+-- 4 lines: 7···}│{1:+ }{5:+-- 4 lines: 7··}| - {6:~ }│{6:~ }|*6 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }{23:------------------}│{7: }{22:0 }| + {7: }^1 │{7: }1 | + {7: }2 │{7: }2 | + {7: }3 │{7: }3 | + {7: }4 │{7: }4 | + {7: }5 │{7: }5 | + {7: }6 │{7: }6 | + {7:+ }{13:+-- 4 lines: 7···}│{7:+ }{13:+-- 4 lines: 7··}| + {1:~ }│{1:~ }|*6 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt+=internal | ]]) end) @@ -96,31 +85,31 @@ describe('Diff mode screen', function() feed(':set diffopt=filler<cr>') screen:expect([[ - {1: }{4:^0 }│{1: }{2:-----------------}| - {1: }1 │{1: }1 | - {1: }2 │{1: }2 | - {1: }3 │{1: }3 | - {1: }4 │{1: }4 | - {1: }5 │{1: }5 | - {1: }6 │{1: }6 | - {1:+ }{5:+-- 4 lines: 7···}│{1:+ }{5:+-- 4 lines: 7··}| - {6:~ }│{6:~ }|*6 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }{22:^0 }│{7: }{23:-----------------}| + {7: }1 │{7: }1 | + {7: }2 │{7: }2 | + {7: }3 │{7: }3 | + {7: }4 │{7: }4 | + {7: }5 │{7: }5 | + {7: }6 │{7: }6 | + {7:+ }{13:+-- 4 lines: 7···}│{7:+ }{13:+-- 4 lines: 7··}| + {1:~ }│{1:~ }|*6 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt=filler | ]]) feed(':set diffopt+=internal<cr>') screen:expect([[ - {1: }{4:^0 }│{1: }{2:-----------------}| - {1: }1 │{1: }1 | - {1: }2 │{1: }2 | - {1: }3 │{1: }3 | - {1: }4 │{1: }4 | - {1: }5 │{1: }5 | - {1: }6 │{1: }6 | - {1:+ }{5:+-- 4 lines: 7···}│{1:+ }{5:+-- 4 lines: 7··}| - {6:~ }│{6:~ }|*6 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }{22:^0 }│{7: }{23:-----------------}| + {7: }1 │{7: }1 | + {7: }2 │{7: }2 | + {7: }3 │{7: }3 | + {7: }4 │{7: }4 | + {7: }5 │{7: }5 | + {7: }6 │{7: }6 | + {7:+ }{13:+-- 4 lines: 7···}│{7:+ }{13:+-- 4 lines: 7··}| + {1:~ }│{1:~ }|*6 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt+=internal | ]]) end) @@ -132,44 +121,44 @@ describe('Diff mode screen', function() feed(':set diffopt=filler<cr>') screen:expect([[ - {1:+ }{5:^+-- 4 lines: 1···}│{1:+ }{5:+-- 4 lines: 1··}| - {1: }5 │{1: }5 | - {1: }6 │{1: }6 | - {1: }7 │{1: }7 | - {1: }8 │{1: }8 | - {1: }9 │{1: }9 | - {1: }10 │{1: }10 | - {1: }{2:------------------}│{1: }{4:11 }| - {6:~ }│{6:~ }|*6 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7:+ }{13:^+-- 4 lines: 1···}│{7:+ }{13:+-- 4 lines: 1··}| + {7: }5 │{7: }5 | + {7: }6 │{7: }6 | + {7: }7 │{7: }7 | + {7: }8 │{7: }8 | + {7: }9 │{7: }9 | + {7: }10 │{7: }10 | + {7: }{23:------------------}│{7: }{22:11 }| + {1:~ }│{1:~ }|*6 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt=filler | ]]) feed(':set diffopt+=internal<cr>') screen:expect([[ - {1:+ }{5:^+-- 4 lines: 1···}│{1:+ }{5:+-- 4 lines: 1··}| - {1: }5 │{1: }5 | - {1: }6 │{1: }6 | - {1: }7 │{1: }7 | - {1: }8 │{1: }8 | - {1: }9 │{1: }9 | - {1: }10 │{1: }10 | - {1: }{2:------------------}│{1: }{4:11 }| - {6:~ }│{6:~ }|*6 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7:+ }{13:^+-- 4 lines: 1···}│{7:+ }{13:+-- 4 lines: 1··}| + {7: }5 │{7: }5 | + {7: }6 │{7: }6 | + {7: }7 │{7: }7 | + {7: }8 │{7: }8 | + {7: }9 │{7: }9 | + {7: }10 │{7: }10 | + {7: }{23:------------------}│{7: }{22:11 }| + {1:~ }│{1:~ }|*6 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt+=internal | ]]) screen:try_resize(40, 9) screen:expect([[ - {1:+ }{5:^+-- 4 lines: 1···}│{1:+ }{5:+-- 4 lines: 1··}| - {1: }5 │{1: }5 | - {1: }6 │{1: }6 | - {1: }7 │{1: }7 | - {1: }8 │{1: }8 | - {1: }9 │{1: }9 | - {1: }10 │{1: }10 | - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7:+ }{13:^+-- 4 lines: 1···}│{7:+ }{13:+-- 4 lines: 1··}| + {7: }5 │{7: }5 | + {7: }6 │{7: }6 | + {7: }7 │{7: }7 | + {7: }8 │{7: }8 | + {7: }9 │{7: }9 | + {7: }10 │{7: }10 | + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| | ]]) end) @@ -181,44 +170,44 @@ describe('Diff mode screen', function() feed(':set diffopt=filler<cr>') screen:expect([[ - {1:+ }{5:^+-- 4 lines: 1···}│{1:+ }{5:+-- 4 lines: 1··}| - {1: }5 │{1: }5 | - {1: }6 │{1: }6 | - {1: }7 │{1: }7 | - {1: }8 │{1: }8 | - {1: }9 │{1: }9 | - {1: }10 │{1: }10 | - {1: }{4:11 }│{1: }{2:-----------------}| - {6:~ }│{6:~ }|*6 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7:+ }{13:^+-- 4 lines: 1···}│{7:+ }{13:+-- 4 lines: 1··}| + {7: }5 │{7: }5 | + {7: }6 │{7: }6 | + {7: }7 │{7: }7 | + {7: }8 │{7: }8 | + {7: }9 │{7: }9 | + {7: }10 │{7: }10 | + {7: }{22:11 }│{7: }{23:-----------------}| + {1:~ }│{1:~ }|*6 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt=filler | ]]) feed(':set diffopt+=internal<cr>') screen:expect([[ - {1:+ }{5:^+-- 4 lines: 1···}│{1:+ }{5:+-- 4 lines: 1··}| - {1: }5 │{1: }5 | - {1: }6 │{1: }6 | - {1: }7 │{1: }7 | - {1: }8 │{1: }8 | - {1: }9 │{1: }9 | - {1: }10 │{1: }10 | - {1: }{4:11 }│{1: }{2:-----------------}| - {6:~ }│{6:~ }|*6 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7:+ }{13:^+-- 4 lines: 1···}│{7:+ }{13:+-- 4 lines: 1··}| + {7: }5 │{7: }5 | + {7: }6 │{7: }6 | + {7: }7 │{7: }7 | + {7: }8 │{7: }8 | + {7: }9 │{7: }9 | + {7: }10 │{7: }10 | + {7: }{22:11 }│{7: }{23:-----------------}| + {1:~ }│{1:~ }|*6 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt+=internal | ]]) screen:try_resize(40, 9) screen:expect([[ - {1:+ }{5:^+-- 4 lines: 1···}│{1:+ }{5:+-- 4 lines: 1··}| - {1: }5 │{1: }5 | - {1: }6 │{1: }6 | - {1: }7 │{1: }7 | - {1: }8 │{1: }8 | - {1: }9 │{1: }9 | - {1: }10 │{1: }10 | - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7:+ }{13:^+-- 4 lines: 1···}│{7:+ }{13:+-- 4 lines: 1··}| + {7: }5 │{7: }5 | + {7: }6 │{7: }6 | + {7: }7 │{7: }7 | + {7: }8 │{7: }8 | + {7: }9 │{7: }9 | + {7: }10 │{7: }10 | + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| | ]]) end) @@ -230,39 +219,39 @@ describe('Diff mode screen', function() feed(':set diffopt=filler<cr>') screen:expect([[ - {1: }^1 │{1: }1 | - {1: }2 │{1: }2 | - {1: }3 │{1: }3 | - {1: }4 │{1: }4 | - {1: }{2:------------------}│{1: }{4:4 }| - {1: }5 │{1: }5 | - {1: }6 │{1: }6 | - {1: }7 │{1: }7 | - {1: }8 │{1: }8 | - {1: }9 │{1: }9 | - {1: }10 │{1: }10 | - {1: }{4:11 }│{1: }{2:-----------------}| - {6:~ }│{6:~ }|*2 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }^1 │{7: }1 | + {7: }2 │{7: }2 | + {7: }3 │{7: }3 | + {7: }4 │{7: }4 | + {7: }{23:------------------}│{7: }{22:4 }| + {7: }5 │{7: }5 | + {7: }6 │{7: }6 | + {7: }7 │{7: }7 | + {7: }8 │{7: }8 | + {7: }9 │{7: }9 | + {7: }10 │{7: }10 | + {7: }{22:11 }│{7: }{23:-----------------}| + {1:~ }│{1:~ }|*2 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt=filler | ]]) feed(':set diffopt+=internal<cr>') screen:expect([[ - {1: }^1 │{1: }1 | - {1: }2 │{1: }2 | - {1: }3 │{1: }3 | - {1: }4 │{1: }4 | - {1: }{2:------------------}│{1: }{4:4 }| - {1: }5 │{1: }5 | - {1: }6 │{1: }6 | - {1: }7 │{1: }7 | - {1: }8 │{1: }8 | - {1: }9 │{1: }9 | - {1: }10 │{1: }10 | - {1: }{4:11 }│{1: }{2:-----------------}| - {6:~ }│{6:~ }|*2 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }^1 │{7: }1 | + {7: }2 │{7: }2 | + {7: }3 │{7: }3 | + {7: }4 │{7: }4 | + {7: }{23:------------------}│{7: }{22:4 }| + {7: }5 │{7: }5 | + {7: }6 │{7: }6 | + {7: }7 │{7: }7 | + {7: }8 │{7: }8 | + {7: }9 │{7: }9 | + {7: }10 │{7: }10 | + {7: }{22:11 }│{7: }{23:-----------------}| + {1:~ }│{1:~ }|*2 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt+=internal | ]]) end) @@ -274,39 +263,39 @@ describe('Diff mode screen', function() feed(':set diffopt=filler<cr>') screen:expect([[ - {1: }^1 │{1: }1 | - {1: }2 │{1: }2 | - {1: }3 │{1: }3 | - {1: }4 │{1: }4 | - {1: }{4:4 }│{1: }{2:-----------------}| - {1: }5 │{1: }5 | - {1: }6 │{1: }6 | - {1: }7 │{1: }7 | - {1: }8 │{1: }8 | - {1: }9 │{1: }9 | - {1: }10 │{1: }10 | - {1: }{2:------------------}│{1: }{4:11 }| - {6:~ }│{6:~ }|*2 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }^1 │{7: }1 | + {7: }2 │{7: }2 | + {7: }3 │{7: }3 | + {7: }4 │{7: }4 | + {7: }{22:4 }│{7: }{23:-----------------}| + {7: }5 │{7: }5 | + {7: }6 │{7: }6 | + {7: }7 │{7: }7 | + {7: }8 │{7: }8 | + {7: }9 │{7: }9 | + {7: }10 │{7: }10 | + {7: }{23:------------------}│{7: }{22:11 }| + {1:~ }│{1:~ }|*2 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt=filler | ]]) feed(':set diffopt+=internal<cr>') screen:expect([[ - {1: }^1 │{1: }1 | - {1: }2 │{1: }2 | - {1: }3 │{1: }3 | - {1: }4 │{1: }4 | - {1: }{4:4 }│{1: }{2:-----------------}| - {1: }5 │{1: }5 | - {1: }6 │{1: }6 | - {1: }7 │{1: }7 | - {1: }8 │{1: }8 | - {1: }9 │{1: }9 | - {1: }10 │{1: }10 | - {1: }{2:------------------}│{1: }{4:11 }| - {6:~ }│{6:~ }|*2 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }^1 │{7: }1 | + {7: }2 │{7: }2 | + {7: }3 │{7: }3 | + {7: }4 │{7: }4 | + {7: }{22:4 }│{7: }{23:-----------------}| + {7: }5 │{7: }5 | + {7: }6 │{7: }6 | + {7: }7 │{7: }7 | + {7: }8 │{7: }8 | + {7: }9 │{7: }9 | + {7: }10 │{7: }10 | + {7: }{23:------------------}│{7: }{22:11 }| + {1:~ }│{1:~ }|*2 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt+=internal | ]]) end) @@ -372,41 +361,41 @@ int main(int argc, char **argv) reread() feed(':set diffopt=internal,filler<cr>') screen:expect([[ - {1: }^#include <stdio.h>│{1: }#include <stdio.h| - {1: } │{1: } | - {1: }{8:// Frobs foo heart}│{1: }{8:int fib(int n)}{9: }| - {1: }{4:int frobnitz(int f}│{1: }{2:-----------------}| - {1: }{ │{1: }{ | - {1: }{9: i}{8:nt i;}{9: }│{1: }{9: i}{8:f(n > 2)}{9: }| - {1: }{4: for(i = 0; i <}│{1: }{2:-----------------}| - {1: } { │{1: } { | - {1: }{9: }{8:printf("Yo}│{1: }{9: }{8:return fi}| - {1: }{4: printf("%d}│{1: }{2:-----------------}| - {1: } } │{1: } } | - {1: }{2:------------------}│{1: }{4: return 1; }| - {1: }} │{1: }} | - {1: } │{1: } | - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }^#include <stdio.h>│{7: }#include <stdio.h| + {7: } │{7: } | + {7: }{27:// Frobs foo heart}│{7: }{27:int fib(int n)}{4: }| + {7: }{22:int frobnitz(int f}│{7: }{23:-----------------}| + {7: }{ │{7: }{ | + {7: }{4: i}{27:nt i;}{4: }│{7: }{4: i}{27:f(n > 2)}{4: }| + {7: }{22: for(i = 0; i <}│{7: }{23:-----------------}| + {7: } { │{7: } { | + {7: }{4: }{27:printf("Yo}│{7: }{4: }{27:return fi}| + {7: }{22: printf("%d}│{7: }{23:-----------------}| + {7: } } │{7: } } | + {7: }{23:------------------}│{7: }{22: return 1; }| + {7: }} │{7: }} | + {7: } │{7: } | + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt=internal,filler | ]]) feed('G') screen:expect([[ - {1: }{2:------------------}│{1: }{4:int frobnitz(int }| - {1: }{ │{1: }{ | - {1: }{9: i}{8:f(n > 1)}{9: }│{1: }{9: i}{8:nt i;}{9: }| - {1: }{2:------------------}│{1: }{4: for(i = 0; i }| - {1: } { │{1: } { | - {1: }{9: }{8:return fac}│{1: }{9: }{8:printf("%}| - {1: } } │{1: } } | - {1: }{4: return 1; }│{1: }{2:-----------------}| - {1: }} │{1: }} | - {1: } │{1: } | - {1: }int main(int argc,│{1: }int main(int argc| - {1: }{ │{1: }{ | - {1: }{9: frobnitz(f}{8:act}{9:(}│{1: }{9: frobnitz(f}{8:ib}{9:(}| - {1: }^} │{1: }} | - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }{23:------------------}│{7: }{22:int frobnitz(int }| + {7: }{ │{7: }{ | + {7: }{4: i}{27:f(n > 1)}{4: }│{7: }{4: i}{27:nt i;}{4: }| + {7: }{23:------------------}│{7: }{22: for(i = 0; i }| + {7: } { │{7: } { | + {7: }{4: }{27:return fac}│{7: }{4: }{27:printf("%}| + {7: } } │{7: } } | + {7: }{22: return 1; }│{7: }{23:-----------------}| + {7: }} │{7: }} | + {7: } │{7: } | + {7: }int main(int argc,│{7: }int main(int argc| + {7: }{ │{7: }{ | + {7: }{4: frobnitz(f}{27:act}{4:(}│{7: }{4: frobnitz(f}{27:ib}{4:(}| + {7: }^} │{7: }} | + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt=internal,filler | ]]) end) @@ -415,41 +404,41 @@ int main(int argc, char **argv) reread() feed(':set diffopt=internal,filler,algorithm:patience<cr>') screen:expect([[ - {1: }^#include <stdio.h>│{1: }#include <stdio.h| - {1: } │{1: } | - {1: }{2:------------------}│{1: }{4:int fib(int n) }| - {1: }{2:------------------}│{1: }{4:{ }| - {1: }{2:------------------}│{1: }{4: if(n > 2) }| - {1: }{2:------------------}│{1: }{4: { }| - {1: }{2:------------------}│{1: }{4: return fi}| - {1: }{2:------------------}│{1: }{4: } }| - {1: }{2:------------------}│{1: }{4: return 1; }| - {1: }{2:------------------}│{1: }{4:} }| - {1: }{2:------------------}│{1: }{4: }| - {1: }// Frobs foo heart│{1: }// Frobs foo hear| - {1: }int frobnitz(int f│{1: }int frobnitz(int | - {1: }{ │{1: }{ | - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }^#include <stdio.h>│{7: }#include <stdio.h| + {7: } │{7: } | + {7: }{23:------------------}│{7: }{22:int fib(int n) }| + {7: }{23:------------------}│{7: }{22:{ }| + {7: }{23:------------------}│{7: }{22: if(n > 2) }| + {7: }{23:------------------}│{7: }{22: { }| + {7: }{23:------------------}│{7: }{22: return fi}| + {7: }{23:------------------}│{7: }{22: } }| + {7: }{23:------------------}│{7: }{22: return 1; }| + {7: }{23:------------------}│{7: }{22:} }| + {7: }{23:------------------}│{7: }{22: }| + {7: }// Frobs foo heart│{7: }// Frobs foo hear| + {7: }int frobnitz(int f│{7: }int frobnitz(int | + {7: }{ │{7: }{ | + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| | ]]) feed('G') screen:expect([[ - {1: } │{1: } | - {1: }{4:int fact(int n) }│{1: }{2:-----------------}| - {1: }{4:{ }│{1: }{2:-----------------}| - {1: }{4: if(n > 1) }│{1: }{2:-----------------}| - {1: }{4: { }│{1: }{2:-----------------}| - {1: }{4: return fac}│{1: }{2:-----------------}| - {1: }{4: } }│{1: }{2:-----------------}| - {1: }{4: return 1; }│{1: }{2:-----------------}| - {1: }{4:} }│{1: }{2:-----------------}| - {1: }{4: }│{1: }{2:-----------------}| - {1: }int main(int argc,│{1: }int main(int argc| - {1: }{ │{1: }{ | - {1: }{9: frobnitz(f}{8:act}{9:(}│{1: }{9: frobnitz(f}{8:ib}{9:(}| - {1: }^} │{1: }} | - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: } │{7: } | + {7: }{22:int fact(int n) }│{7: }{23:-----------------}| + {7: }{22:{ }│{7: }{23:-----------------}| + {7: }{22: if(n > 1) }│{7: }{23:-----------------}| + {7: }{22: { }│{7: }{23:-----------------}| + {7: }{22: return fac}│{7: }{23:-----------------}| + {7: }{22: } }│{7: }{23:-----------------}| + {7: }{22: return 1; }│{7: }{23:-----------------}| + {7: }{22:} }│{7: }{23:-----------------}| + {7: }{22: }│{7: }{23:-----------------}| + {7: }int main(int argc,│{7: }int main(int argc| + {7: }{ │{7: }{ | + {7: }{4: frobnitz(f}{27:act}{4:(}│{7: }{4: frobnitz(f}{27:ib}{4:(}| + {7: }^} │{7: }} | + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| | ]]) end) @@ -458,41 +447,41 @@ int main(int argc, char **argv) reread() feed(':set diffopt=internal,filler,algorithm:histogram<cr>') screen:expect([[ - {1: }^#include <stdio.h>│{1: }#include <stdio.h| - {1: } │{1: } | - {1: }{2:------------------}│{1: }{4:int fib(int n) }| - {1: }{2:------------------}│{1: }{4:{ }| - {1: }{2:------------------}│{1: }{4: if(n > 2) }| - {1: }{2:------------------}│{1: }{4: { }| - {1: }{2:------------------}│{1: }{4: return fi}| - {1: }{2:------------------}│{1: }{4: } }| - {1: }{2:------------------}│{1: }{4: return 1; }| - {1: }{2:------------------}│{1: }{4:} }| - {1: }{2:------------------}│{1: }{4: }| - {1: }// Frobs foo heart│{1: }// Frobs foo hear| - {1: }int frobnitz(int f│{1: }int frobnitz(int | - {1: }{ │{1: }{ | - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }^#include <stdio.h>│{7: }#include <stdio.h| + {7: } │{7: } | + {7: }{23:------------------}│{7: }{22:int fib(int n) }| + {7: }{23:------------------}│{7: }{22:{ }| + {7: }{23:------------------}│{7: }{22: if(n > 2) }| + {7: }{23:------------------}│{7: }{22: { }| + {7: }{23:------------------}│{7: }{22: return fi}| + {7: }{23:------------------}│{7: }{22: } }| + {7: }{23:------------------}│{7: }{22: return 1; }| + {7: }{23:------------------}│{7: }{22:} }| + {7: }{23:------------------}│{7: }{22: }| + {7: }// Frobs foo heart│{7: }// Frobs foo hear| + {7: }int frobnitz(int f│{7: }int frobnitz(int | + {7: }{ │{7: }{ | + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| | ]]) feed('G') screen:expect([[ - {1: } │{1: } | - {1: }{4:int fact(int n) }│{1: }{2:-----------------}| - {1: }{4:{ }│{1: }{2:-----------------}| - {1: }{4: if(n > 1) }│{1: }{2:-----------------}| - {1: }{4: { }│{1: }{2:-----------------}| - {1: }{4: return fac}│{1: }{2:-----------------}| - {1: }{4: } }│{1: }{2:-----------------}| - {1: }{4: return 1; }│{1: }{2:-----------------}| - {1: }{4:} }│{1: }{2:-----------------}| - {1: }{4: }│{1: }{2:-----------------}| - {1: }int main(int argc,│{1: }int main(int argc| - {1: }{ │{1: }{ | - {1: }{9: frobnitz(f}{8:act}{9:(}│{1: }{9: frobnitz(f}{8:ib}{9:(}| - {1: }^} │{1: }} | - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: } │{7: } | + {7: }{22:int fact(int n) }│{7: }{23:-----------------}| + {7: }{22:{ }│{7: }{23:-----------------}| + {7: }{22: if(n > 1) }│{7: }{23:-----------------}| + {7: }{22: { }│{7: }{23:-----------------}| + {7: }{22: return fac}│{7: }{23:-----------------}| + {7: }{22: } }│{7: }{23:-----------------}| + {7: }{22: return 1; }│{7: }{23:-----------------}| + {7: }{22:} }│{7: }{23:-----------------}| + {7: }{22: }│{7: }{23:-----------------}| + {7: }int main(int argc,│{7: }int main(int argc| + {7: }{ │{7: }{ | + {7: }{4: frobnitz(f}{27:act}{4:(}│{7: }{4: frobnitz(f}{27:ib}{4:(}| + {7: }^} │{7: }} | + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| | ]]) end) @@ -525,17 +514,17 @@ int main(int argc, char **argv) reread() feed(':set diffopt=internal,filler<cr>') screen:expect([[ - {1: }^def finalize(value│{1: }def finalize(valu| - {1: } │{1: } | - {1: } values.each do |│{1: } values.each do | - {1: }{2:------------------}│{1: }{4: v.prepare }| - {1: }{2:------------------}│{1: }{4: end }| - {1: }{2:------------------}│{1: }{4: }| - {1: }{2:------------------}│{1: }{4: values.each do }| - {1: } v.finalize │{1: } v.finalize | - {1: } end │{1: } end | - {6:~ }│{6:~ }|*5 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }^def finalize(value│{7: }def finalize(valu| + {7: } │{7: } | + {7: } values.each do |│{7: } values.each do | + {7: }{23:------------------}│{7: }{22: v.prepare }| + {7: }{23:------------------}│{7: }{22: end }| + {7: }{23:------------------}│{7: }{22: }| + {7: }{23:------------------}│{7: }{22: values.each do }| + {7: } v.finalize │{7: } v.finalize | + {7: } end │{7: } end | + {1:~ }│{1:~ }|*5 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt=internal,filler | ]]) end) @@ -544,17 +533,17 @@ int main(int argc, char **argv) reread() feed(':set diffopt=internal,filler,indent-heuristic<cr>') screen:expect([[ - {1: }^def finalize(value│{1: }def finalize(valu| - {1: } │{1: } | - {1: }{2:------------------}│{1: }{4: values.each do }| - {1: }{2:------------------}│{1: }{4: v.prepare }| - {1: }{2:------------------}│{1: }{4: end }| - {1: }{2:------------------}│{1: }{4: }| - {1: } values.each do |│{1: } values.each do | - {1: } v.finalize │{1: } v.finalize | - {1: } end │{1: } end | - {6:~ }│{6:~ }|*5 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }^def finalize(value│{7: }def finalize(valu| + {7: } │{7: } | + {7: }{23:------------------}│{7: }{22: values.each do }| + {7: }{23:------------------}│{7: }{22: v.prepare }| + {7: }{23:------------------}│{7: }{22: end }| + {7: }{23:------------------}│{7: }{22: }| + {7: } values.each do |│{7: } values.each do | + {7: } v.finalize │{7: } v.finalize | + {7: } end │{7: } end | + {1:~ }│{1:~ }|*5 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| | ]]) end) @@ -564,17 +553,17 @@ int main(int argc, char **argv) feed(':set diffopt=internal,filler,indent-heuristic,algorithm:patience<cr>') feed(':<cr>') screen:expect([[ - {1: }^def finalize(value│{1: }def finalize(valu| - {1: } │{1: } | - {1: }{2:------------------}│{1: }{4: values.each do }| - {1: }{2:------------------}│{1: }{4: v.prepare }| - {1: }{2:------------------}│{1: }{4: end }| - {1: }{2:------------------}│{1: }{4: }| - {1: } values.each do |│{1: } values.each do | - {1: } v.finalize │{1: } v.finalize | - {1: } end │{1: } end | - {6:~ }│{6:~ }|*5 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7: }^def finalize(value│{7: }def finalize(valu| + {7: } │{7: } | + {7: }{23:------------------}│{7: }{22: values.each do }| + {7: }{23:------------------}│{7: }{22: v.prepare }| + {7: }{23:------------------}│{7: }{22: end }| + {7: }{23:------------------}│{7: }{22: }| + {7: } values.each do |│{7: } values.each do | + {7: } v.finalize │{7: } v.finalize | + {7: } end │{7: } end | + {1:~ }│{1:~ }|*5 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| : | ]]) end) @@ -587,17 +576,17 @@ int main(int argc, char **argv) feed(':set diffopt=filler<cr>') screen:expect([[ - {1:+ }{5:^+-- 10 lines: 1···}│{1:+ }{5:+-- 10 lines: 1··}| - {6:~ }│{6:~ }|*13 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7:+ }{13:^+-- 10 lines: 1···}│{7:+ }{13:+-- 10 lines: 1··}| + {1:~ }│{1:~ }|*13 + {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }| :set diffopt=filler | ]]) feed(':set diffopt+=internal<cr>') screen:expect([[ - {1:+ }{5:^+-- 10 lines: 1···}│{1:+ }{5:+-- 10 lines: 1··}| - {6:~ }│{6:~ }|*13 - {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| + {7:+ }{13:^+-- 10 lines: 1···}│{7:+ }{13:+-- 10 lines: 1··}| |