comparison src/testdir/test_vim9_expr.vim @ 20305:9a5e2370df0e v8.2.0708

patch 8.2.0708: Vim9: constant expressions are not simplified Commit: https://github.com/vim/vim/commit/61a89816996a0cad0d711c91e6e7cea9a9101211 Author: Bram Moolenaar <Bram@vim.org> Date: Thu May 7 16:58:17 2020 +0200 patch 8.2.0708: Vim9: constant expressions are not simplified Problem: Vim9: constant expressions are not simplified. Solution: Simplify string concatenation.
author Bram Moolenaar <Bram@vim.org>
date Thu, 07 May 2020 17:00:03 +0200
parents ce1b73835822
children 3cbcee39fc5c
comparison
equal deleted inserted replaced
20304:dd0b3edad4cf 20305:9a5e2370df0e
483 g:anint) 483 g:anint)
484 assert_equal(-1, g:alsoint - 5) 484 assert_equal(-1, g:alsoint - 5)
485 assert_equal(-6, g:alsoint - g:anint) 485 assert_equal(-6, g:alsoint - g:anint)
486 486
487 assert_equal('hello', 'hel' .. 'lo') 487 assert_equal('hello', 'hel' .. 'lo')
488 assert_equal('hello 123', 'hello ' .. 488 " TODO: a line break here doesn't work
489 123) 489 " assert_equal('hello 123', 'hello ' ..
490 " 123)
491 assert_equal('hello 123', 'hello ' .. 123)
490 assert_equal('123 hello', 123 .. ' hello') 492 assert_equal('123 hello', 123 .. ' hello')
491 assert_equal('123456', 123 .. 456) 493 assert_equal('123456', 123 .. 456)
492 494
493 assert_equal([1, 2, 3, 4], [1, 2] + [3, 4]) 495 assert_equal([1, 2, 3, 4], [1, 2] + [3, 4])
494 assert_equal(0z11223344, 0z1122 + 0z3344) 496 assert_equal(0z11223344, 0z1122 + 0z3344)