Doing something like this can be tedious for larger multi-line strings:
if l:got isnot# l:want
call Errorf('want: %s\ngot: %s\n', l:want, l:got)
endif
When a test fails, it's hard to see what exactly failed. Getting a diff makes this a lot easier:
let l:diff = Diff(l:got, l:want)
if l:diff isnot# ''
call Errorf('%s', l:diff)
endif
Doing something like this can be tedious for larger multi-line strings:
When a test fails, it's hard to see what exactly failed. Getting a diff makes this a lot easier: