Mercurial > vim
comparison src/testdir/test_vim9_script.vim @ 24295:7f634eae21fe v8.2.2688
patch 8.2.2688: Vim9: crash when using s: for script variable
Commit: https://github.com/vim/vim/commit/ca51cc0a335d0c449784440501c7d46ee8f84ce4
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Apr 1 21:38:53 2021 +0200
patch 8.2.2688: Vim9: crash when using s: for script variable
Problem: Vim9: crash when using s: for script variable.
Solution: Pass the end pointer. (closes https://github.com/vim/vim/issues/8045)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 01 Apr 2021 21:45:02 +0200 |
parents | bcfff560e089 |
children | bed5ec739304 |
comparison
equal
deleted
inserted
replaced
24294:e4dddd2b4a50 | 24295:7f634eae21fe |
---|---|
1642 import * as anAlias from './Xsort.vim' | 1642 import * as anAlias from './Xsort.vim' |
1643 assert_equal('yes', anAlias.GetString('yes')) | 1643 assert_equal('yes', anAlias.GetString('yes')) |
1644 | 1644 |
1645 # using the function from a compiled function | 1645 # using the function from a compiled function |
1646 def TestMore(): string | 1646 def TestMore(): string |
1647 return anAlias.GetString('text') | 1647 var s = s:anAlias.GetString('foo') |
1648 enddef | 1648 return s .. anAlias.GetString('bar') |
1649 assert_equal('text', TestMore()) | 1649 enddef |
1650 assert_equal('foobar', TestMore()) | |
1650 | 1651 |
1651 # error when using a function that isn't exported | 1652 # error when using a function that isn't exported |
1652 assert_fails('anAlias.Compare(1, 2)', 'E1049:') | 1653 assert_fails('anAlias.Compare(1, 2)', 'E1049:') |
1653 END | 1654 END |
1654 writefile(lines, 'Xscript.vim') | 1655 writefile(lines, 'Xscript.vim') |