mirror of
https://github.com/neovim/neovim.git
synced 2026-08-04 06:38:44 +00:00
vim-patch:7.4.2266
Problem: printf() test fails on Windows. "-inf" is not used.
Solution: Check for Windows-specific values for "nan". Add sign to "inf"
when appropriate.
9992237a3e
This commit is contained in:
committed by
Jurica Bradaric
parent
df1e7b7eda
commit
b4cb5fa610
@@ -201,12 +201,10 @@ function Test_printf_float()
|
||||
|
||||
call assert_equal('inf', printf('%f', 1.0/0.0))
|
||||
|
||||
" This prints inf but shouldn't it print -inf instead?
|
||||
call assert_match('^-\?inf$', printf('%f', -1.0/0.0))
|
||||
call assert_match('^-inf$', printf('%f', -1.0/0.0))
|
||||
|
||||
" This prints -nan but shouldn't it print nan instead?
|
||||
call assert_match('^-\?nan$', printf('%f', sqrt(-1.0)))
|
||||
call assert_match('^-\?nan$', printf('%f', 0.0/0.0))
|
||||
call assert_match('^nan$', printf('%f', sqrt(-1.0)))
|
||||
call assert_match('^nan$', printf('%f', 0.0/0.0))
|
||||
|
||||
call assert_fails('echo printf("%f", "a")', 'E807:')
|
||||
endfunc
|
||||
|
||||
Reference in New Issue
Block a user