Open Aster89 opened 2 years ago
Such a code passes (and it expectedly fails if I change the second argument to AssertEqual), suggesting that Vader is indeed executing Vim9 script code:
AssertEqual
Execute (vim9 var): vim9cmd var path = '/some/path/to/file.txt' AssertEqual path, '/some/path/to/file.txt'
But if I write this
Execute (vim9 lambda): vim9cmd var Identity = (x) => x AssertEqual Identity(3), 3
it fails like this
Starting Vader: 1 suite(s), 1 case(s) Starting Vader: /home/enrico/.vim/plugged/WinZoZ/test/winzoz.vader (1/1) [EXECUTE] vim9 lambda (1/1) [EXECUTE] (X) Vim(call):E117: Unknown function: Identity > command line..function <SNR>24_vader[5]..vader#run[63]..<SNR>96_run[42]..<SNR>96_execute[2]..vader#window#execute[11]..script /tmp/vvIdE4r/3, line 2 Success/Total: 0/1 Success/Total: 0/1 (assertions: 0/0) Elapsed time: 0.01 sec. Failure
suggesting that something is not quite right...
Anybody knows?
You'd need to modify your test in a few ways.
tl;dr
Execute (vim9 lambda): vim9cmd g:Identity = (x) => x AssertEqual Identity(3), 3
Modifications…
Identity
Assert...
var
Such a code passes (and it expectedly fails if I change the second argument to
AssertEqual
), suggesting that Vader is indeed executing Vim9 script code:But if I write this
it fails like this
suggesting that something is not quite right...
Anybody knows?