summaryrefslogtreecommitdiff
path: root/src/testdir/test_vim9_script.vim
Commit message (Collapse)AuthorAgeFilesLines
* patch 8.2.1777: Vim9: some assignment tests in the wrong filev8.2.1777Bram Moolenaar2020-09-301-194/+0
| | | | | Problem: Vim9: some assignment tests in the wrong file. Solution: Move assignment tests to test_vim9_assign.
* patch 8.2.1766: Vim9: Some tests are still using :letv8.2.1766Bram Moolenaar2020-09-271-3/+0
| | | | | Problem: Vim9: Some tests are still using :let. Solution: Change the last few declarations to use :var.
* patch 8.2.1756: Vim9: :let will soon be disallowedv8.2.1756Bram Moolenaar2020-09-271-205/+213
| | | | | Problem: Vim9: :let will soon be disallowed. Solution: Add v:disallow_let temporarily. Fix tests.
* patch 8.2.1746: Vim9: cannot use "fina" for "finally"v8.2.1746Bram Moolenaar2020-09-261-2/+2
| | | | | Problem: Vim9: Cannot use "fina" for "finally". (Naruhiko Nishino) Solution: Specifically check for "fina". (closes #7020)
* patch 8.2.1744: Vim9: using ":const!" is weirdv8.2.1744Bram Moolenaar2020-09-261-14/+20
| | | | | | Problem: Vim9: using ":const!" is weird. Solution: Use "var" - "final" - "const" like Dart. "let" still works for now.
* patch 8.2.1742: test still fails without the terminal featurev8.2.1742Bram Moolenaar2020-09-251-1/+6
| | | | | Problem: Test still fails without the terminal feature. Solution: Put check for terminal feature in separate function.
* patch 8.2.1740: test fails without the terminal featurev8.2.1740Bram Moolenaar2020-09-251-0/+2
| | | | | Problem: Test fails without the terminal feature. Solution: Skip test if the terminal feature is not available.
* patch 8.2.1739: Vim9: crash when compiling a manually defined functionv8.2.1739Bram Moolenaar2020-09-251-2/+23
| | | | | | Problem: Vim9: crash when compiling a manually defined function. (Antony Scriven) Solution: Check that the script ID is positive. (closes #7012)
* patch 8.2.1724: Vim9: assignment tests spread outv8.2.1724Bram Moolenaar2020-09-211-634/+0
| | | | | Problem: Vim9: assignment tests spread out. Solution: Create new test file for assignment tests.
* patch 8.2.1720: Vim9: memory leak with heredoc that isn't executedv8.2.1720Bram Moolenaar2020-09-211-0/+8
| | | | | | Problem: Vim9: memory leak with heredoc that isn't executed. (Dominique Pellé) Solution: Don't clear the list items. (closes #6991)
* patch 8.2.1704: Vim9: crash in for loop when autoload script has an errorv8.2.1704Bram Moolenaar2020-09-171-0/+39
| | | | | Problem: Vim9: crash in for loop when autoload script has an error. Solution: Reset suppress_errthrow. Check for NULL list. (closes #6967)
* patch 8.2.1700: Vim9: try/catch causes wrong value to be returnedv8.2.1700Bram Moolenaar2020-09-161-0/+20
| | | | | Problem: Vim9: try/catch causes wrong value to be returned. Solution: Reset tcd_return. (closes #6964)
* patch 8.2.1697: inconsistent capitalization of error messagesv8.2.1697Bram Moolenaar2020-09-161-1/+1
| | | | | Problem: Inconsistent capitalization of error messages. Solution: Always start with a capital.
* patch 8.2.1691: Vim9: list<any> is not accepted where list<number> is expectedv8.2.1691Bram Moolenaar2020-09-161-6/+24
| | | | | | 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)
* patch 8.2.1686: Vim9: "const!" not sufficiently testedv8.2.1686Bram Moolenaar2020-09-141-0/+18
| | | | | Problem: Vim9: "const!" not sufficiently tested. Solution: Add a few more test cases. Fix type checking.
* patch 8.2.1685: Vim9: cannot declare a constant valuev8.2.1685Bram Moolenaar2020-09-141-0/+40
| | | | | Problem: Vim9: cannot declare a constant value. Solution: Introduce ":const!".
* patch 8.2.1682: Vim9: const works in an unexpected wayv8.2.1682Bram Moolenaar2020-09-141-0/+7
| | | | | | 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.
* patch 8.2.1681: Vim9: unnessary :call commands in testsv8.2.1681Bram Moolenaar2020-09-141-41/+40
| | | | | Problem: Vim9: unnessary :call commands in tests. Solution: Remove the commands. (issue #6936)
* patch 8.2.1674: Vim9: internal error when using variable that was not setv8.2.1674Bram Moolenaar2020-09-131-0/+8
| | | | | Problem: Vim9: internal error when using variable that was not set. Solution: Give a meaningful error. (closes #6937)
* patch 8.2.1650: Vim9: result of && and || expression is not bool in scriptv8.2.1650Bram Moolenaar2020-09-091-6/+6
| | | | | | 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.
* patch 8.2.1647: Vim9: result of expression with && and || is not a boolv8.2.1647Bram Moolenaar2020-09-091-2/+16
| | | | | | Problem: Vim9: result of expression with && and || cannot be assigned to a bool variable. Solution: Add the TTFLAG_BOOL_OK flag and convert the value if needed.
* patch 8.2.1644: Vim9: cannot assign 1 and 0 to bool at script levelv8.2.1644Bram Moolenaar2020-09-091-3/+21
| | | | | | Problem: Vim9: cannot assign 1 and 0 to bool at script level. Solution: Add the TTFLAG_BOOL_OK flag to the type. Fix name of test function.
* patch 8.2.1641: Vim9: cannot use 0 or 1 where a bool is expectedv8.2.1641Bram Moolenaar2020-09-091-0/+5
| | | | | Problem: Vim9: cannot use 0 or 1 where a bool is expected. Solution: Allow using 0 and 1 for a bool type. (closes #6903)
* patch 8.2.1632: not checking the context of test_fails()v8.2.1632Bram Moolenaar2020-09-061-15/+15
| | | | | | Problem: Not checking the context of test_fails(). Solution: Add the line number and context arguments. Give error if assert_fails() argument types are wrong.
* patch 8.2.1623: Vim9: using :call where it is not neededv8.2.1623Bram Moolenaar2020-09-061-155/+155
| | | | | Problem: Vim9: using :call where it is not needed. Solution: Remove :call. (closes #6892)
* patch 8.2.1593: tests do not check the error number properlyv8.2.1593Bram Moolenaar2020-09-041-2/+2
| | | | | Problem: Tests do not check the error number properly.0 Solution: Add a colon after the error number. (closes #6869)
* patch 8.2.1543: Vim9: test with invalid SID is skipped in the GUIv8.2.1543Bram Moolenaar2020-08-301-4/+4
| | | | | Problem: Vim9: test with invalid SID is skipped in the GUI. Solution: Read the CTRL-C that feedkeys() put in typeahead.
* patch 8.2.1542: Vim9: test with invalid SID does not work in the GUIv8.2.1542Bram Moolenaar2020-08-291-0/+3
| | | | | Problem: Vim9: test with invalid SID does not work in the GUI. Solution: Skip the test in the GUI.
* patch 8.2.1541: Vim9: cannot find function reference for s:Funcv8.2.1541Bram Moolenaar2020-08-291-0/+7
| | | | | Problem: Vim9: cannot find function reference for s:Func. Solution: Recognize <SNR> prefix. (closes #6805)
* patch 8.2.1539: using invalid script ID causes a crashv8.2.1539Bram Moolenaar2020-08-291-0/+9
| | | | | Problem: Using invalid script ID causes a crash. Solution: Check the script ID to be valid. (closes #6804)
* patch 8.2.1528: Vim9: :endif not found after "if false"v8.2.1528Bram Moolenaar2020-08-271-0/+8
| | | | | Problem: Vim9: :endif not found after "if false". Solution: When skipping still check for a following command. (closes #6797)
* patch 8.2.1527: Vim9: cannot use a function name at script levelv8.2.1527Bram Moolenaar2020-08-271-7/+12
| | | | | | Problem: Vim9: cannot use a function name as a function reference at script level. Solution: Check if a name is a function name. (closes #6789)
* patch 8.2.1519: Vim9: Ex command default range is not setv8.2.1519Bram Moolenaar2020-08-231-0/+12
| | | | | Problem: Vim9: Ex command default range is not set. Solution: When range is not given use default. (closes #6779)
* patch 8.2.1518: Vim9: cannot assign to local optionv8.2.1518Bram Moolenaar2020-08-231-10/+15
| | | | | Problem: Vim9: cannot assign to local option. Solution: Skip over "&l:" and "&g:". (closes #6749)
* patch 8.2.1516: Vim9: error for :exe has wrong line numberv8.2.1516Bram Moolenaar2020-08-231-2/+3
| | | | | Problem: Vim9: error for :exe has wrong line number. Solution: Set line number before calling do_cmdline_cmd(). (closes #6774)
* patch 8.2.1515: Vim9: can create s:var in legacy script but cannot unletv8.2.1515Bram Moolenaar2020-08-231-0/+7
| | | | | Problem: Vim9: can create s:var in legacy script but cannot unlet. Solution: Allow :unlet for legacy script var.
* patch 8.2.1503: Vim9: error for autocmd defined in :def in legacy scriptv8.2.1503Bram Moolenaar2020-08-211-0/+17
| | | | | | Problem: Vim9: error for an autocmd defined in a :def function in legacy Vim script. Solution: Don't check the variable type. (closes #6758)
* patch 8.2.1502: Vim9: can use += with a :let command at script levelv8.2.1502Bram Moolenaar2020-08-211-1/+4
| | | | | Problem: Vim9: can use += with a :let command at script level. Solution: Give an error.
* patch 8.2.1500: Vim9: error when using address without a commandv8.2.1500Bram Moolenaar2020-08-201-0/+7
| | | | | Problem: Vim9: error when using address without a command. Solution: Execute the range itself. (closes #6747)
* patch 8.2.1491: Vim9: crash when compiling heredoc lines start with commentv8.2.1491Bram Moolenaar2020-08-201-0/+11
| | | | | | Problem: Vim9: crash when compiling heredoc lines start with comment. Solution: Skip over NULL pointers. Do not remove comment and empty lines when fetching function lines. (closes #6743)
* patch 8.2.1490: Vim9: using /= with float and number doesn't workv8.2.1490Bram Moolenaar2020-08-191-0/+12
| | | | | Problem: Vim9: using /= with float and number doesn't work. Solution: Better support assignment with operator. (closes #6742)
* patch 8.2.1469: Vim9: cannot assign string to string optionv8.2.1469Bram Moolenaar2020-08-161-12/+26
| | | | | Problem: Vim9: cannot assign string to string option. Solution: Change checks for option value. (closes #6720)
* patch 8.2.1467: Vim9: :echomsg doesn't like a dict argumentv8.2.1467Bram Moolenaar2020-08-161-0/+3
| | | | | Problem: Vim9: :echomsg doesn't like a dict argument. Solution: Convert arguments like in legacy script. (closes #6717)
* patch 8.2.1466: Vim9: cannot index or slice a variable with type "any"v8.2.1466Bram Moolenaar2020-08-161-1/+1
| | | | | Problem: Vim9: cannot index or slice a variable with type "any". Solution: Add runtime index and slice.
* patch 8.2.1465: Vim9: subscript not handled properlyv8.2.1465Bram Moolenaar2020-08-161-4/+5
| | | | | | Problem: Vim9: subscript not handled properly. Solution: Adjust error message. Remove dead code. Disallow string to number conversion in scripts.
* patch 8.2.1460: error messages are spread outv8.2.1460Bram Moolenaar2020-08-151-12/+12
| | | | | Problem: Error messages are spread out. Solution: Move more messages into errors.h.
* patch 8.2.1459: Vim9: declaring script var in script does not infer the typev8.2.1459Bram Moolenaar2020-08-151-0/+8
| | | | | | Problem: Vim9: declaring ascript variable at the script level does not infer the type. Solution: Get the type from the value. (closes #6716)
* patch 8.2.1450: Vim9: no check that script-local items don't become globalv8.2.1450Bram Moolenaar2020-08-141-0/+36
| | | | | Problem: Vim9: no check that script-local items don't become global. Solution: Add a test.
* patch 8.2.1445: Vim9: function expanded name is cleared when sourcing againv8.2.1445Bram Moolenaar2020-08-141-0/+23
| | | | | | | Problem: Vim9: function expanded name is cleared when sourcing a script again. Solution: Only clear the expanded name when deleting the function. (closes #6707)
* patch 8.2.1437: Vim9: 'statusline' is evaluated using Vim9 script syntaxv8.2.1437Bram Moolenaar2020-08-121-0/+14
| | | | | Problem: Vim9: 'statusline' is evaluated using Vim9 script syntax. Solution: Always use legacy script syntax.