diff options
| author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-05-24 14:43:47 -0400 |
|---|---|---|
| committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-05-24 15:25:32 -0400 |
| commit | 1b0937dd894d4ea5d1c66f8037b4e1c4e2b888bd (patch) | |
| tree | d4f14bd0d4e723780f19e4f10235758f46a47f88 /src/nvim/testdir/test_functions.vim | |
| parent | 529d88c64164f69e8005192f75e392640c941b9f (diff) | |
| download | rneovim-1b0937dd894d4ea5d1c66f8037b4e1c4e2b888bd.tar.gz rneovim-1b0937dd894d4ea5d1c66f8037b4e1c4e2b888bd.tar.bz2 rneovim-1b0937dd894d4ea5d1c66f8037b4e1c4e2b888bd.zip | |
test/old: partial port of patch v8.2.1.0183
Prep for patch v8.2.0511.
Diffstat (limited to 'src/nvim/testdir/test_functions.vim')
| -rw-r--r-- | src/nvim/testdir/test_functions.vim | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim index 85d1bc7076..224ca257ab 100644 --- a/src/nvim/testdir/test_functions.vim +++ b/src/nvim/testdir/test_functions.vim @@ -28,12 +28,14 @@ func Test_empty() call assert_equal(0, empty(1)) call assert_equal(0, empty(-1)) - call assert_equal(1, empty(0.0)) - call assert_equal(1, empty(-0.0)) - call assert_equal(0, empty(1.0)) - call assert_equal(0, empty(-1.0)) - call assert_equal(0, empty(1.0/0.0)) - call assert_equal(0, empty(0.0/0.0)) + if has('float') + call assert_equal(1, empty(0.0)) + call assert_equal(1, empty(-0.0)) + call assert_equal(0, empty(1.0)) + call assert_equal(0, empty(-1.0)) + call assert_equal(0, empty(1.0/0.0)) + call assert_equal(0, empty(0.0/0.0)) + endif call assert_equal(1, empty([])) call assert_equal(0, empty(['a'])) @@ -115,7 +117,9 @@ func Test_strwidth() call assert_fails('call strwidth({->0})', 'E729:') call assert_fails('call strwidth([])', 'E730:') call assert_fails('call strwidth({})', 'E731:') - call assert_fails('call strwidth(1.2)', 'E806:') + if has('float') + call assert_fails('call strwidth(1.2)', 'E806:') + endif endfor set ambiwidth& |