Bram Moolenaar
090728ad4d
patch 8.2.2169: Vim9: test leaves file behind
...
Problem: Vim9: test leaves file behind.
Solution: Rename script files. (Dominique Pellé, closes #7511 )
Use try/finally.
2020-12-20 15:43:31 +01:00
Bram Moolenaar
17f700ac8b
patch 8.2.2164: Vim9: autoload function doesn't work in uppercased script
...
Problem: Vim9: autoload function doesn't work in script that starts with
an upper case letter.
Solution: Check for the autoload character. (closes #7502 )
2020-12-19 21:23:42 +01:00
Bram Moolenaar
03290b8444
patch 8.2.2162: Vim9: Cannot load or store autoload variables
...
Problem: Vim9: Cannot load or store autoload variables.
Solution: Add ISN_LOADAUTO and ISN_STOREAUTO. (closes #7485 )
2020-12-19 16:30:44 +01:00
Bram Moolenaar
025cb1ca86
patch 8.2.2144: Vim9: some corner cases not tested
...
Problem: Vim9: some corner cases not tested.
Solution: Add a few tests.
2020-12-14 18:31:27 +01:00
Bram Moolenaar
b5b9480ee9
patch 8.2.2138: Vim9: "exit_cb" causes Vim to exit
...
Problem: Vim9: "exit_cb" causes Vim to exit.
Solution: Require white space after a command in Vim9 script. (closes #7467 )
Also fix that Vim9 style heredoc was not always recognized.
2020-12-13 17:50:20 +01:00
Bram Moolenaar
e498429087
patch 8.2.2137: Vim9: :echo and :execute give error for empty argument
...
Problem: Vim9: :echo and :execute give error for empty argument.
Solution: Ignore an empty argument. (closes #7468 )
2020-12-13 14:19:25 +01:00
Bram Moolenaar
93f82cbee5
patch 8.2.2135: Vim9: #{ still seen as start of dict in some places
...
Problem: Vim9: #{ still seen as start of dict in some places.
Solution: Remove check for { after #. (closes #7456 )
2020-12-12 21:25:56 +01:00
Bram Moolenaar
70249ee831
patch 8.2.2127: Vim9: executing user command from Vim9 script not tested
...
Problem: Vim9: executing user command defined in Vim9 script not tested.
Solution: Add a test.
2020-12-10 21:01:30 +01:00
Bram Moolenaar
9ec7026f24
patch 8.2.2122: Vim9: crash when sourcing vim9script early
...
Problem: Vim9: crash when sourcing vim9script early.
Solution: Use set_option_value() instead of setting p_cpo directly.
(closes #7441 )
2020-12-09 17:16:59 +01:00
Bram Moolenaar
918a424917
patch 8.2.2099: Vim9: some checks are not tested
...
Problem: Vim9: some checks are not tested.
Solution: Add a few more tests. Give better error messages.
2020-12-06 14:37:08 +01:00
Bram Moolenaar
2d870f8d9e
patch 8.2.2092: Vim9: unpredictable errors for script tests
...
Problem: Vim9: unpredictable errors for script tests.
Solution: Use a different script file name for each run.
2020-12-05 13:41:01 +01:00
Bram Moolenaar
f6c177ab3a
patch 8.2.2088: Vim9: script test sometimes fails
...
Problem: Vim9: script test sometimes fails.
Solution: Unlet variables.
2020-12-04 17:38:00 +01:00
Bram Moolenaar
e0de171ecd
patch 8.2.2082: Vim9: can still use the depricated #{} dict syntax
...
Problem: Vim9: can still use the depricated #{} dict syntax.
Solution: Remove support for #{} in Vim9 script. (closes #7406 , closes #7405 )
2020-12-02 17:36:54 +01:00
Bram Moolenaar
ea87069d78
patch 8.2.2080: Vim9: no proper error message for using s:var in for loop
...
Problem: Vim9: no proper error message for using s:var in for loop.
Solution: Give a specific error.
2020-12-02 14:24:30 +01:00
Bram Moolenaar
38bd8de551
patch 8.2.2079: Vim9: cannot put a linebreak before or after "in" of ":for"
...
Problem: Vim9: cannot put a linebreak before or after "in" of ":for".
Solution: Skip over linebreak.
2020-12-02 13:23:36 +01:00
Bram Moolenaar
4324d87a44
patch 8.2.2074: Vim9: using :normal from Vim9 script can't handle range
...
Problem: Vim9: using :normal from Vim9 script can't handle range.
Solution: Execute a :normal command in legacy script context. (closes #7401 )
2020-12-01 20:12:24 +01:00
Bram Moolenaar
4b8a065145
patch 8.2.2073: Vim9: for with unpack only works for local variables
...
Problem: Vim9: for with unpack only works for local variables.
Solution: Recognize different destinations.
2020-12-01 16:30:44 +01:00
Bram Moolenaar
792f786aad
patch 8.2.2034: Vim9: list unpack in for statement not compiled yet
...
Problem: Vim9: list unpack in for statement not compiled yet.
Solution: Compile list unpack. (closes #7345 )
2020-11-23 08:31:18 +01:00
Bram Moolenaar
2bede173a1
patch 8.2.2015: Vim9: literal dict #{} is not like any other language
...
Problem: Vim9: literal dict #{} is not like any other language.
Solution: Support the JavaScript syntax.
2020-11-19 18:53:18 +01:00
Bram Moolenaar
631e8f9345
patch 8.2.1953: Vim9: extra "unknown" error after other error
...
Problem: Vim9: extra "unknown" error after other error.
Solution: Restore did_emsg count after EXEC instruction. (closes #7254 )
Improve error message from assert_fails()
2020-11-04 15:07:16 +01:00
Bram Moolenaar
b4bcea474d
patch 8.2.1914: Vim9: cannot put line break in expression for '=' register
...
Problem: Vim9: cannot put line break in expression for '=' register.
Solution: Pass fgetline to set_expr_line(). (closes #7209 )
2020-10-28 13:53:50 +01:00
Bram Moolenaar
39ca4127a0
patch 8.2.1870: Vim9: no need to keep all script variables
...
Problem: Vim9: no need to keep all script variables.
Solution: Only keep script variables when a function was defined that could
use them. Fix freeing static string on exit.
2020-10-20 14:25:07 +02:00
Bram Moolenaar
352134bbfb
patch 8.2.1859: Vim9: crash in unpack assignment
...
Problem: Vim9: crash in unpack assignment.
Solution: Make sure an error message is turned into an exception.
(closes #7159 )
2020-10-17 22:04:08 +02:00
Bram Moolenaar
1e021e63c5
patch 8.2.1854: Vim9: crash when throwing exception for NULL string
...
Problem: Vim9: crash when throwing exception for NULL string. (Dhiraj
Mishra)
Solution: Handle NULL string like empty string. (closes #7139 )
2020-10-16 20:25:23 +02:00
Bram Moolenaar
ed234f24f3
patch 8.2.1849: Vim9: garbage collection frees block-local variables
...
Problem: Vim9: garbage collection frees block-local variables.
Solution: Mark all script variables as used.
2020-10-15 20:42:20 +02:00
Bram Moolenaar
fbbcd00367
patch 8.2.1846: Vim9: block variables are not found in compiled function
...
Problem: Vim9: variables declared in a local block are not found in
when a function is compiled.
Solution: Look for script variables in sn_all_vars.
2020-10-15 12:46:44 +02:00
Bram Moolenaar
9becdf2b98
patch 8.2.1826: Vim9: cannot use a {} block at script level
...
Problem: Vim9: cannot use a {} block at script level.
Solution: Recognize a {} block.
2020-10-10 21:33:48 +02:00
Bram Moolenaar
fcdc5d83fb
patch 8.2.1824: Vim9: variables at the script level escape their scope
...
Problem: Vim9: variables at the script level escape their scope.
Solution: When leaving a scope remove variables declared in it.
2020-10-10 19:07:09 +02:00
Bram Moolenaar
10c65860f8
patch 8.2.1813: Vim9: can assign wrong type to script dict
...
Problem: Vim9: can assign wrong type to script dict. (Christian J. Robinson)
Solution: Check the type if known.
2020-10-08 21:16:42 +02:00
Bram Moolenaar
1310660557
patch 8.2.1798: Vim9: trinary operator condition is too permissive
...
Problem: Vim9: trinary operator condition is too permissive.
Solution: Use tv_get_bool_chk().
2020-10-04 16:06:05 +02:00
Bram Moolenaar
55759b5228
patch 8.2.1777: Vim9: some assignment tests in the wrong file
...
Problem: Vim9: some assignment tests in the wrong file.
Solution: Move assignment tests to test_vim9_assign.
2020-09-30 22:59:42 +02:00
Bram Moolenaar
7a9cbca00a
patch 8.2.1766: Vim9: Some tests are still using :let
...
Problem: Vim9: Some tests are still using :let.
Solution: Change the last few declarations to use :var.
2020-09-27 22:47:05 +02:00
Bram Moolenaar
cfcd011fcd
patch 8.2.1756: Vim9: :let will soon be disallowed
...
Problem: Vim9: :let will soon be disallowed.
Solution: Add v:disallow_let temporarily. Fix tests.
2020-09-27 15:19:27 +02:00
Bram Moolenaar
373863ed48
patch 8.2.1746: Vim9: cannot use "fina" for "finally"
...
Problem: Vim9: Cannot use "fina" for "finally". (Naruhiko Nishino)
Solution: Specifically check for "fina". (closes #7020 )
2020-09-26 17:20:53 +02:00
Bram Moolenaar
30fd8204ce
patch 8.2.1744: Vim9: using ":const!" is weird
...
Problem: Vim9: using ":const!" is weird.
Solution: Use "var" - "final" - "const" like Dart. "let" still works for
now.
2020-09-26 15:09:30 +02:00
Bram Moolenaar
7e9210ea53
patch 8.2.1742: test still fails without the terminal feature
...
Problem: Test still fails without the terminal feature.
Solution: Put check for terminal feature in separate function.
2020-09-25 23:12:51 +02:00
Bram Moolenaar
58dbef330c
patch 8.2.1740: test fails without the terminal feature
...
Problem: Test fails without the terminal feature.
Solution: Skip test if the terminal feature is not available.
2020-09-25 22:13:05 +02:00
Bram Moolenaar
9c4f55204f
patch 8.2.1739: Vim9: crash when compiling a manually defined function
...
Problem: Vim9: crash when compiling a manually defined function. (Antony
Scriven)
Solution: Check that the script ID is positive. (closes #7012 )
2020-09-25 21:47:28 +02:00
Bram Moolenaar
971caf53b8
patch 8.2.1724: Vim9: assignment tests spread out
...
Problem: Vim9: assignment tests spread out.
Solution: Create new test file for assignment tests.
2020-09-21 22:21:42 +02:00
Bram Moolenaar
078269bdce
patch 8.2.1720: Vim9: memory leak with heredoc that isn't executed
...
Problem: Vim9: memory leak with heredoc that isn't executed. (Dominique
Pellé)
Solution: Don't clear the list items. (closes #6991 )
2020-09-21 20:35:55 +02:00
Bram Moolenaar
77e5dcc36a
patch 8.2.1704: Vim9: crash in for loop when autoload script has an error
...
Problem: Vim9: crash in for loop when autoload script has an error.
Solution: Reset suppress_errthrow. Check for NULL list. (closes #6967 )
2020-09-17 21:29:03 +02:00
Bram Moolenaar
9939f57b7f
patch 8.2.1700: Vim9: try/catch causes wrong value to be returned
...
Problem: Vim9: try/catch causes wrong value to be returned.
Solution: Reset tcd_return. (closes #6964 )
2020-09-16 22:29:52 +02:00
Bram Moolenaar
7707228aac
patch 8.2.1697: inconsistent capitalization of error messages
...
Problem: Inconsistent capitalization of error messages.
Solution: Always start with a capital.
2020-09-16 17:55:40 +02:00
Bram Moolenaar
5e65423077
patch 8.2.1691: Vim9: list<any> is not accepted where list<number> is expected
...
Problem: Vim9: list<any> is not accepted where list<number> is expected.
Solution: Add functions to allocate and free a type_T, use it in
ISN_CHECKTYPE. (closes #6959 )
2020-09-16 15:22:00 +02:00
Bram Moolenaar
71abe48289
patch 8.2.1686: Vim9: "const!" not sufficiently tested
...
Problem: Vim9: "const!" not sufficiently tested.
Solution: Add a few more test cases. Fix type checking.
2020-09-14 22:28:30 +02:00
Bram Moolenaar
0b4c66c67a
patch 8.2.1685: Vim9: cannot declare a constant value
...
Problem: Vim9: cannot declare a constant value.
Solution: Introduce ":const!".
2020-09-14 21:39:44 +02:00
Bram Moolenaar
dbeecb2b6b
patch 8.2.1682: Vim9: const works in an unexpected way
...
Problem: Vim9: const works in an unexpected way.
Solution: ":const" only disallows changing the variable, not the value.
Make "list[0] = 9" work at the script level.
2020-09-14 18:15:09 +02:00
Bram Moolenaar
08052228a7
patch 8.2.1681: Vim9: unnessary :call commands in tests
...
Problem: Vim9: unnessary :call commands in tests.
Solution: Remove the commands. (issue #6936 )
2020-09-14 17:04:31 +02:00
Bram Moolenaar
f0afd9e182
patch 8.2.1674: Vim9: internal error when using variable that was not set
...
Problem: Vim9: internal error when using variable that was not set.
Solution: Give a meaningful error. (closes #6937 )
2020-09-13 18:57:47 +02:00
Bram Moolenaar
c1ec0422e4
patch 8.2.1650: Vim9: result of && and || expression is not bool in script
...
Problem: Vim9: result of && and || expression cannot be assigned to a bool
at the script level.
Solution: Add the VAR_BOOL_OK flag. Convert to bool when needed.
2020-09-09 22:27:58 +02:00