diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2023-06-12 14:41:19 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-12 14:41:19 +0800 |
| commit | 551cc3a2a3e2ee180234910cbe2ef81bd37508de (patch) | |
| tree | af539897ec260bd4ac8a8db8f3544501f455a363 /test/old/testdir/test_float_func.vim | |
| parent | 3c4890d1efe7c23c0bff7bc4532f19cf03c94e04 (diff) | |
| parent | 41ee7bc7dbcca4ce3d35c13450220d3bffcad15e (diff) | |
| download | rneovim-551cc3a2a3e2ee180234910cbe2ef81bd37508de.tar.gz rneovim-551cc3a2a3e2ee180234910cbe2ef81bd37508de.tar.bz2 rneovim-551cc3a2a3e2ee180234910cbe2ef81bd37508de.zip | |
Merge pull request #23995 from zeertzjq/vim-8.2.1524
vim-patch:8.2.{1524,2948,2949}: Float to String conversion
Diffstat (limited to 'test/old/testdir/test_float_func.vim')
| -rw-r--r-- | test/old/testdir/test_float_func.vim | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/old/testdir/test_float_func.vim b/test/old/testdir/test_float_func.vim index 902a011a9d..f9a7251d59 100644 --- a/test/old/testdir/test_float_func.vim +++ b/test/old/testdir/test_float_func.vim @@ -2,6 +2,7 @@ source check.vim CheckFeature float +source vim9.vim func Test_abs() call assert_equal('1.23', string(abs(1.23))) @@ -238,7 +239,9 @@ func Test_str2float() call assert_equal("str2float('nan')", string(str2float('NaN'))) call assert_equal("str2float('nan')", string(str2float(' nan '))) - call assert_fails("call str2float(1.2)", 'E806:') + call assert_equal(1.2, str2float(1.2)) + call CheckDefExecFailure(['str2float(1.2)'], 'E1013:') + call CheckScriptFailure(['vim9script', 'str2float(1.2)'], 'E806:') call assert_fails("call str2float([])", 'E730:') call assert_fails("call str2float({})", 'E731:') call assert_fails("call str2float(function('string'))", 'E729:') |