summaryrefslogtreecommitdiff
path: root/src/testdir/test_vim9_script.vim
Commit message (Collapse)AuthorAgeFilesLines
...
* patch 8.2.3021: spaces allowed between option name and "!", "?", etc.v8.2.3021Bram Moolenaar2021-06-201-0/+20
| | | | | | Problem: Spaces allowed between option name and "!", "?", etc. Solution: Disallow spaces in Vim9 script, it was not documented. (closes #8408)
* patch 8.2.3016: confusing error when expression is followed by commav8.2.3016Bram Moolenaar2021-06-171-3/+3
| | | | | Problem: Confusing error when expression is followed by comma. Solution: Give a different error for trailing text. (closes #8395)
* patch 8.2.3004: Vim9: error for missing colon given while skippingv8.2.3004Bram Moolenaar2021-06-151-0/+13
| | | | | Problem: Vim9: error for missing colon given while skipping. Solution: Do not give the error when skipping. (closes #8385)
* patch 8.2.2931: Vim9: line continuation comment uses legacy syntaxv8.2.2931Bram Moolenaar2021-06-031-0/+3
| | | | | | Problem: Vim9: line continuation comment still uses legacy syntax in one place. Solution: Check for #\ instead of "\ earlier. (closes #8316)
* patch 8.2.2925: Vim9: line continuation comment uses legacy syntaxv8.2.2925Bram Moolenaar2021-06-021-0/+18
| | | | | Problem: Vim9: line continuation comment uses legacy syntax. Solution: Check for #\ instead of "\. (closes #8295)
* patch 8.2.2888: Vim9: "k" command recognized in Vim9 scriptv8.2.2888Bram Moolenaar2021-05-261-2/+4
| | | | | Problem: Vim9: "k" command recognized in Vim9 script. Solution: Do not recognize "k" or "s" and "d" with flags.
* patch 8.2.2878: Vim9: for loop list unpack only allows for one "_"v8.2.2878Bram Moolenaar2021-05-221-0/+6
| | | | | Problem: Vim9: for loop list unpack only allows for one "_". Solution: Drop the value when the variable is "_". (closes #8232)
* patch 8.2.2817: Vim9: script sourcing continues after an errorv8.2.2817Bram Moolenaar2021-04-281-0/+16
| | | | | Problem: Vim9: script sourcing continues after an error. Solution: Make an error in any command in "vim9script" abort sourcing.
* patch 8.2.2775: Vim9: wrong line number used for some commandsv8.2.2775Bram Moolenaar2021-04-171-0/+31
| | | | | | | Problem: Vim9: wrong line number used for some commands. Solution: For :exe, :echo and the like use the line number of the start of the command. When calling a function set the line number in the script context.
* patch 8.2.2774: Vim9: cannot import an existing name even when using "as"v8.2.2774Bram Moolenaar2021-04-171-0/+2
| | | | | Problem: Vim9: cannot import an existing name even when using "as". Solution: Do not check for an existing name when using "as". (closes #8113)
* patch 8.2.2770: Vim9: type of loop variable is not usedv8.2.2770Bram Moolenaar2021-04-151-0/+12
| | | | | Problem: Vim9: type of loop variable is not used. Solution: Parse and check the variable type. (closes #8107)
* patch 8.2.2763: Vim9: cannot use type in for loop unpack at script levelv8.2.2763Bram Moolenaar2021-04-141-8/+15
| | | | | Problem: Vim9: cannot use type in for loop unpack at script level. Solution: Advance over the type name.
* patch 8.2.2760: Vim9: no error for changing a for loop variablev8.2.2760Bram Moolenaar2021-04-131-0/+8
| | | | | Problem: Vim9: no error for changing a for loop variable. Solution: Make the loop variable read-only. (issue #8102)
* patch 8.2.2759: Vim9: for loop infers type of loop variablev8.2.2759Bram Moolenaar2021-04-131-68/+83
| | | | | Problem: Vim9: for loop infers type of loop variable. Solution: Do not get the member type. (closes #8102)
* patch 8.2.2749: Vim9: test for error can be a bit flakyv8.2.2749Bram Moolenaar2021-04-101-1/+1
| | | | | Problem: Vim9: test for error can be a bit flaky. Solution: Increase the wait time a bit.
* patch 8.2.2740: Vim9: lambda with varargs doesn't workv8.2.2740Bram Moolenaar2021-04-091-3/+3
| | | | | Problem: Vim9: lambda with varargs doesn't work. Solution: Make "...name" work. Require type to be a list.
* patch 8.2.2739: Vim9: a lambda accepts too many arguments at the script levelv8.2.2739Bram Moolenaar2021-04-091-1/+1
| | | | | Problem: Vim9: a lambda accepts too many arguments at the script level. Solution: Do not set uf_varargs in Vim9 script.
* patch 8.2.2688: Vim9: crash when using s: for script variablev8.2.2688Bram Moolenaar2021-04-011-2/+3
| | | | | Problem: Vim9: crash when using s: for script variable. Solution: Pass the end pointer. (closes #8045)
* patch 8.2.2682: Vim9: cannot find Name.Func from "import * as Name"v8.2.2682Bram Moolenaar2021-04-011-0/+17
| | | | | | | Problem: Vim9: cannot find Name.Func from "import * as Name". (Alexander Goussas) Solution: When no variable found try finding a function. (closes #8045) Check that the function was exported.
* patch 8.2.2680: Vim9: problem defining a script variable from legacy functionv8.2.2680Bram Moolenaar2021-03-311-0/+29
| | | | | | Problem: Vim9: problem defining a script variable from legacy function. Solution: Check if the script is Vim9, not the current syntax. (closes #8032)
* patch 8.2.2658: :for cannot loop over a stringv8.2.2658Bram Moolenaar2021-03-261-1/+27
| | | | | Problem: :for cannot loop over a string. Solution: Accept a string argument and iterate over its characters.
* patch 8.2.2657: Vim9: error message for declaring variable in for loopv8.2.2657Bram Moolenaar2021-03-261-0/+7
| | | | | Problem: Vim9: error message for declaring variable in for loop. Solution: Clear variables when entering block again. (closes #8012)
* patch 8.2.2620: Vim9: Using #{ for a dictionary gives strange errorsv8.2.2620Bram Moolenaar2021-03-181-1/+1
| | | | | Problem: Vim9: Using #{ for a dictionary gives strange errors. Solution: Give an error when using #{ for a comment after a command.
* patch 8.2.2616: Vim9: if 'cpo' is change in Vim9 script it may be restoredv8.2.2616Bram Moolenaar2021-03-171-3/+9
| | | | | Problem: Vim9: if 'cpo' is change in Vim9 script it may be restored. Solution: Apply the changes to 'cpo' to the restored value.
* patch 8.2.2615: test is sourcing the wrong filev8.2.2615Bram Moolenaar2021-03-171-1/+1
| | | | | Problem: Test is sourcing the wrong file. Solution: Correct the file name.
* patch 8.2.2614: Vim9: function is deleted while executingv8.2.2614Bram Moolenaar2021-03-171-0/+29
| | | | | | Problem: Vim9: function is deleted while executing. Solution: increment the call count, when more than zero do not delete the function but mark it as dead. (closes #7977)
* patch 8.2.2602: Vim9: continue doesn't work if :while is very first commandv8.2.2602Bram Moolenaar2021-03-141-0/+25
| | | | | | Problem: Vim9: continue doesn't work if :while is very first command. (Yegappan Lakshmanan) Solution: Add one to the continue instruction index.
* patch 8.2.2598: Vim9: :open does not need to be supportedv8.2.2598Bram Moolenaar2021-03-131-0/+2
| | | | | Problem: Vim9: :open does not need to be supported. Solution: Do not support :open in Vim9 script.
* patch 8.2.2597: Vim9: "import * as" does not work at script levelv8.2.2597Bram Moolenaar2021-03-131-2/+22
| | | | | Problem: Vim9: "import * as" does not work at script level. Solution: Implement using an imported namespace.
* patch 8.2.2582: Vim9: screendump test fails on MS-Windowsv8.2.2582Bram Moolenaar2021-03-101-15/+17
| | | | | Problem: Vim9: screendump test fails on MS-Windows. Solution: Use :function instead of :def.
* patch 8.2.2581: Vim9: sourcing Vim9 script triggers a redrawv8.2.2581Bram Moolenaar2021-03-101-0/+31
| | | | | | Problem: Vim9: sourcing Vim9 script triggers a redraw. Solution: Do not let setting/restoring 'cpoptions' cause a redraw. (closes #7920)
* patch 8.2.2580: Vim9: checking vararg type may be wrongv8.2.2580Bram Moolenaar2021-03-081-0/+6
| | | | | Problem: Vim9: checking vararg type is wrong when function is auto-loaded. Solution: Use the member type. (closes #7933)
* patch 8.2.2567: Vim9: no error if variable is defined for existing functionv8.2.2567Bram Moolenaar2021-03-041-0/+11
| | | | | Problem: Vim9: no error if variable is defined for existing function. Solution: Check if name isn't already in use. (closes #7897)
* patch 8.2.2558: no error if a lambda argument shadows a variablev8.2.2558Bram Moolenaar2021-02-281-3/+3
| | | | | | Problem: No error if a lambda argument shadows a variable. Solution: Check that the argument name shadows a local, argument or script variable. (closes #7898)
* patch 8.2.2556: Vim9: :import with "as" not fully supportedv8.2.2556Bram Moolenaar2021-02-271-0/+30
| | | | | Problem: Vim9: :import with "as" not fully supported. Solution: Implement "as" for more cases.
* patch 8.2.2555: Vim9: missing test for 8.2.2553v8.2.2555Bram Moolenaar2021-02-271-0/+2
| | | | | Problem: Vim9: missing test for 8.2.2553. Solution: Add a simple test.
* patch 8.2.2554: Vim9: exporting a final is not testedv8.2.2554Bram Moolenaar2021-02-271-0/+17
| | | | | Problem: Vim9: exporting a final is not tested. Solution: Add a test.
* patch 8.2.2543: Vim9: a return inside try/catch does not restore properlyv8.2.2543Bram Moolenaar2021-02-221-0/+12
| | | | | | Problem: Vim9: a return inside try/catch does not restore exception state properly. Solution: When there is no ":finally" jump to ":endtry". (closes #7882)
* patch 8.2.2539: Vim9: return from finally block causes a hangv8.2.2539Bram Moolenaar2021-02-211-0/+10
| | | | | Problem: Vim9: return from finally block causes a hang. Solution: Store both the finally and endtry indexes. (closes #7885)
* patch 8.2.2532: Vim9: confusing error if :k is used with a rangev8.2.2532Bram Moolenaar2021-02-201-0/+5
| | | | | Problem: Vim9: confusing error if :k is used with a range. Solution: Give an error about the range. (issue #7874)
* patch 8.2.2531: Vim9: the :k command is obscurev8.2.2531Bram Moolenaar2021-02-191-0/+25
| | | | | Problem: Vim9: the :k command is obscure. Solution: Disallow using :k, can use :mark instead. (closes #7874)
* patch 8.2.2529: Vim9: Not possible to use legacy and Vim9 script in one filev8.2.2529Bram Moolenaar2021-02-171-0/+21
| | | | | Problem: Vim9: Not possible to use legacy and Vim9 script in one file. Solution: Vim9: allow for "if false" before :vim9script. (closes #7851)
* patch 8.2.2519: Vim9: no reason to keep strange Vi behaviorv8.2.2519Bram Moolenaar2021-02-151-0/+11
| | | | | | Problem: Vim9: no reason to keep strange Vi behavior. Solution: ":3" and ":3|" both go to line 3. ":|" does not print the line. (closes #7840)
* patch 8.2.2517: Vim9: fix for s390 not tested on other systemsv8.2.2517Bram Moolenaar2021-02-141-0/+21
| | | | | Problem: Vim9: fix for s390 not tested on other systems. Solution: Add a test.
* patch 8.2.2512: Vim9: compiling error test sometimes failsv8.2.2512Bram Moolenaar2021-02-141-1/+1
| | | | | | Problem: Vim9: compiling error test sometimes fails. Solution: use WaitForAssert() instead of sleeping for a bit. (Dominique Pellé, closes #7837)
* patch 8.2.2506: Vim9: :continue does not work correctly in a :try blockv8.2.2506Bram Moolenaar2021-02-131-0/+17
| | | | | Problem: Vim9: :continue does not work correctly in a :try block Solution: Add the TRYCLEANUP instruction. (closes #7827)
* patch 8.2.2503: Vim9: a caught error may leave something on the stackv8.2.2503Bram Moolenaar2021-02-121-0/+10
| | | | | Problem: Vim9: a caught error may leave something on the stack. Solution: Drop items from the stack if needed. (closes #7826)
* patch 8.2.2485: when sourcing a script again the script version isn't resetv8.2.2485Bram Moolenaar2021-02-071-1/+14
| | | | | | Problem: When sourcing a script again the script version isn't reset. Solution: Set sn_version to one when sourcing a script again. Clear sn_save_cpo properly. (closes #7608)
* patch 8.2.2484: Vim9: Cannot use a comment starting with #{v8.2.2484Bram Moolenaar2021-02-071-0/+4
| | | | | Problem: Vim9: Cannot use a comment starting with #{ after an expression. Solution: Remove the check for "{" since #{ dictionaries are not supported.
* patch 8.2.2483: Vim9: type error for misformed expressionv8.2.2483Bram Moolenaar2021-02-071-0/+22
| | | | | Problem: Vim9: type error for misformed expression. Solution: Check for end of command before checking type. (closes #7795)