/*
* Check for an Ex command with optional tail.
* If there is a match advance "pp" to the argument and return TRUE.
- * If "noparen" is TRUE do not recognize the command followed by "(".
+ * If "noparen" is TRUE do not recognize the command followed by "(" or ".".
*/
static int
checkforcmd_opt(
for (i = 0; cmd[i] != NUL; ++i)
if (((char_u *)cmd)[i] != (*pp)[i])
break;
- if (i >= len && !isalpha((*pp)[i])
- && (*pp)[i] != '_' && (!noparen || (*pp)[i] != '('))
+ if (i >= len && !isalpha((*pp)[i]) && (*pp)[i] != '_'
+ && (!noparen || ((*pp)[i] != '(' && (*pp)[i] != '.')))
{
*pp = skipwhite(*pp + i);
return TRUE;
}
/*
- * Check for an Ex command with optional tail, not followed by "(".
+ * Check for an Ex command with optional tail, not followed by "(" or ".".
* If there is a match advance "pp" to the argument and return TRUE.
*/
int
unlet g:imported_func
delete('Ximport_lbr.vim')
+ var import_shadows_cmdmod_lines =<< trim END
+ vim9script
+ import './Xexport.vim' as vim9
+ vim9.exp_name = 'Shadow'
+ assert_equal('Shadow', vim9.exp_name)
+ END
+ v9.CheckScriptSuccess(import_shadows_cmdmod_lines)
+
var line_break_before_dot =<< trim END
vim9script
import './Xexport.vim' as expo
assert_fails('source Ximport.vim', 'E46: Cannot change read-only variable "CONST"', '', 3)
delete('Ximport.vim')
- delete('Ximport3.vim')
delete('Xexport.vim')
# Check that in a Vim9 script 'cpo' is set to the Vim default.