{
// When skipping we ignore most errors, but a missing expression is
// wrong, perhaps it should have been "else".
- if (skip && ends_excmd(*eap->arg))
+ // A double quote here is the start of a string, not a comment.
+ if (skip && *eap->arg != '"' && ends_excmd(*eap->arg))
semsg(_(e_invalid_expression_str), eap->arg);
else
result = eval_to_bool(eap->arg, &error, eap, skip, FALSE);
call assert_equal('ab3j3b2c2b1f1h1km', g:Xpath)
endfunc
+" Check double quote after skipped "elseif" does not give error E15
+func Test_skipped_elseif()
+ if "foo" ==? "foo"
+ let result = "first"
+ elseif "foo" ==? "foo"
+ let result = "second"
+ endif
+ call assert_equal('first', result)
+endfunc
+
"-------------------------------------------------------------------------------
" Test 4: :return {{{1
"-------------------------------------------------------------------------------