forked from aniani/vim
patch 9.1.1223: wrong translation used for encoding failures
Problem: wrong translation for encoding failures because of using
literal "from" and "to" in the resulting error message
(RestorerZ)
Solution: use separate error messages for errors "from" and "to"
encoding errors.
fixes: #16898
closes: #16918
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@@ -4422,10 +4422,10 @@ func Test_str2blob()
|
||||
|
||||
call assert_fails("call str2blob(['abc'], [])", 'E1206: Dictionary required for argument 2')
|
||||
call assert_fails("call str2blob(['abc'], {'encoding': []})", 'E730: Using a List as a String')
|
||||
call assert_fails("call str2blob(['abc'], {'encoding': 'ab12xy'})", 'E1515: Unable to convert to ''ab12xy'' encoding')
|
||||
call assert_fails("call str2blob(['ŝş'], {'encoding': 'latin1'})", 'E1515: Unable to convert to ''latin1'' encoding')
|
||||
call assert_fails("call str2blob(['அஇ'], {'encoding': 'latin1'})", 'E1515: Unable to convert to ''latin1'' encoding')
|
||||
call assert_fails("call str2blob(['🁰🁳'], {'encoding': 'latin1'})", 'E1515: Unable to convert to ''latin1'' encoding')
|
||||
call assert_fails("call str2blob(['abc'], {'encoding': 'ab12xy'})", 'E1516: Unable to convert to ''ab12xy'' encoding')
|
||||
call assert_fails("call str2blob(['ŝş'], {'encoding': 'latin1'})", 'E1516: Unable to convert to ''latin1'' encoding')
|
||||
call assert_fails("call str2blob(['அஇ'], {'encoding': 'latin1'})", 'E1516: Unable to convert to ''latin1'' encoding')
|
||||
call assert_fails("call str2blob(['🁰🁳'], {'encoding': 'latin1'})", 'E1516: Unable to convert to ''latin1'' encoding')
|
||||
END
|
||||
call v9.CheckLegacyAndVim9Success(lines)
|
||||
endfunc
|
||||
|
||||
Reference in New Issue
Block a user