comparison src/testdir/test_textprop.vim @ 30811:c02b74b87608 v9.0.0740

patch 9.0.0740: prop_add_list() gives multiple errors for invalid argument Commit: https://github.com/vim/vim/commit/4997f2a605e15261c4f825494324371f271ef6a8 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Oct 13 14:00:45 2022 +0100 patch 9.0.0740: prop_add_list() gives multiple errors for invalid argument Problem: prop_add_list() gives multiple errors for invalid argument. Solution: Only give one error message.
author Bram Moolenaar <Bram@vim.org>
date Thu, 13 Oct 2022 15:15:07 +0200
parents 82fd47d71971
children f4956427ee9e
comparison
equal deleted inserted replaced
30810:d44a91de374e 30811:c02b74b87608
381 call assert_fails('call prop_add_list(#{type: "one"}, [[2, 2, 2, 2], [3, 20, 3, 22]])', 'E964:') 381 call assert_fails('call prop_add_list(#{type: "one"}, [[2, 2, 2, 2], [3, 20, 3, 22]])', 'E964:')
382 call assert_fails('eval #{type: "one"}->prop_add_list([[2, 2, 2, 2], [3, 20, 3, 22]])', 'E964:') 382 call assert_fails('eval #{type: "one"}->prop_add_list([[2, 2, 2, 2], [3, 20, 3, 22]])', 'E964:')
383 call assert_fails('call prop_add_list(test_null_dict(), [[2, 2, 2]])', 'E965:') 383 call assert_fails('call prop_add_list(test_null_dict(), [[2, 2, 2]])', 'E965:')
384 call assert_fails('call prop_add_list(#{type: "one"}, test_null_list())', 'E1298:') 384 call assert_fails('call prop_add_list(#{type: "one"}, test_null_list())', 'E1298:')
385 call assert_fails('call prop_add_list(#{type: "one"}, [test_null_list()])', 'E714:') 385 call assert_fails('call prop_add_list(#{type: "one"}, [test_null_list()])', 'E714:')
386
387 " only one error for multiple wrong values
388 call assert_fails('call prop_add_list(#{type: "one"}, [[{}, [], 0z00, 0.3]])', ['E728:', 'E728:'])
386 call DeletePropTypes() 389 call DeletePropTypes()
387 bw! 390 bw!
388 endfunc 391 endfunc
389 392
390 func Test_prop_remove() 393 func Test_prop_remove()