aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/ui/diff_spec.lua28
-rw-r--r--test/functional/ui/highlight_spec.lua6
2 files changed, 31 insertions, 3 deletions
diff --git a/test/functional/ui/diff_spec.lua b/test/functional/ui/diff_spec.lua
index bad35dd2af..8db6f776d1 100644
--- a/test/functional/ui/diff_spec.lua
+++ b/test/functional/ui/diff_spec.lua
@@ -614,6 +614,34 @@ int main(int argc, char **argv)
]])
end)
+ it('Diff empty and non-empty file', function()
+ write_file(fname, '', false)
+ write_file(fname_2, 'foo\nbar\nbaz', false)
+ reread()
+
+ feed(':set diffopt=filler<cr>')
+ screen:expect([[
+ {7: }{23:------------------}│{7: }{22:foo }|
+ {7: }{23:------------------}│{7: }{22:bar }|
+ {7: }{23:------------------}│{7: }{22:baz }|
+ {7: }^ │{1:~ }|
+ {1:~ }│{1:~ }|*10
+ {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }|
+ :set diffopt=filler |
+ ]])
+
+ feed(':set diffopt+=internal<cr>')
+ screen:expect([[
+ {7: }{23:------------------}│{7: }{22:foo }|
+ {7: }{23:------------------}│{7: }{22:bar }|
+ {7: }{23:------------------}│{7: }{22:baz }|
+ {7: }^ │{1:~ }|
+ {1:~ }│{1:~ }|*10
+ {3:<onal-diff-screen-1 }{2:<l-diff-screen-1.2 }|
+ :set diffopt+=internal |
+ ]])
+ end)
+
it('diffopt+=icase', function()
write_file(fname, 'a\nb\ncd\n', false)
write_file(fname_2, 'A\nb\ncDe\n', false)
diff --git a/test/functional/ui/highlight_spec.lua b/test/functional/ui/highlight_spec.lua
index 277bd96bd8..87d66fa604 100644
--- a/test/functional/ui/highlight_spec.lua
+++ b/test/functional/ui/highlight_spec.lua
@@ -596,13 +596,13 @@ describe('highlight', function()
]])
screen:expect(
[[
- {1: }^ |
+ {1: }{5:^ }|
{1: }{2:01}{3:234 67}{2:89}{5: }|
{4:~ }|*2
{7:[No Name] [+] }|
- {1: } |
{1: }{6:-----------------------}|
- {4:~ }|
+ {1: }{6:-----------------------}|
+ {1: } |
{8:[No Name] }|
|
]],