test/old: partial port of patch v8.2.1.0183

Prep for patch v8.2.0511.
This commit is contained in:
Jan Edmund Lazo
2021-05-24 14:43:47 -04:00
parent 529d88c641
commit 1b0937dd89
11 changed files with 83 additions and 78 deletions

View File

@@ -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&