patch 8.2.1183: assert_fails() checks the last error message
Problem: assert_fails() checks the last error message.
Solution: Check the first error, it is more relevant. Fix all the tests
that rely on the old behavior.
diff --git a/src/testdir/test_spell.vim b/src/testdir/test_spell.vim
index fbd5c1a..c2de5ed 100644
--- a/src/testdir/test_spell.vim
+++ b/src/testdir/test_spell.vim
@@ -334,7 +334,7 @@
return [[{}, {}]]
endfunc
set spellsuggest=expr:MySuggest3()
- call assert_fails("call spellsuggest('baord')", 'E728:')
+ call assert_fails("call spellsuggest('baord')", 'E731:')
set nospell spellsuggest&
delfunc MySuggest