You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CheckDefAndScriptFailure2(['exists(10)'], 'E1013: Argument 1: type mismatch, expected string but got number', 'E1174: String required for argument 1')
792
794
callassert_equal(1, exists('&tabstop'))
@@ -809,6 +811,26 @@ def Test_exists()
809
811
else
810
812
assert_report('tabstop option not existing?')
811
813
endif
814
+
815
+
ifexists(':DoSomeCommand') >=2
816
+
DoSomeCommand
817
+
endif
818
+
assert_equal(4, g:didSomeCommand)
819
+
ifexists(':NoSuchCommand') >=2
820
+
NoSuchCommand
821
+
endif
822
+
823
+
var found = false
824
+
ifexists('*CheckScriptSuccess')
825
+
found = true
826
+
endif
827
+
assert_true(found)
828
+
ifexists('*NoSuchFunction')
829
+
NoSuchFunction()
830
+
endif
831
+
ifexists('*no_such_function')
832
+
no_such_function()
833
+
endif
812
834
enddef
813
835
814
836
defTest_expand()
@@ -2948,7 +2970,7 @@ def Test_setreg()
2948
2970
assert_fails('setreg("ab", 0)', 'E1162:')
2949
2971
CheckDefAndScriptFailure2(['setreg(1, "b")'], 'E1013: Argument 1: type mismatch, expected string but got number', 'E1174: String required for argument 1')
2950
2972
CheckDefAndScriptFailure2(['setreg("a", "b", 3)'], 'E1013: Argument 3: type mismatch, expected string but got number', 'E1174: String required for argument 3')
2951
-
enddef
2973
+
enddef
2952
2974
2953
2975
defTest_settabvar()
2954
2976
CheckDefAndScriptFailure2(['settabvar("a", "b", 1)'], 'E1013: Argument 1: type mismatch, expected number but got string', 'E1210: Number required for argument 1')
0 commit comments