aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_functions.vim
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-05-24 14:43:47 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-05-24 15:25:32 -0400
commit1b0937dd894d4ea5d1c66f8037b4e1c4e2b888bd (patch)
treed4f14bd0d4e723780f19e4f10235758f46a47f88 /src/nvim/testdir/test_functions.vim
parent529d88c64164f69e8005192f75e392640c941b9f (diff)
downloadrneovim-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.vim18
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&