robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
f907614088
master
1local t =require ( 'test.testutil' ) 2local n =require ( 'test.functional.testnvim' )() 3 4local describe , it , before_each , pending =t . describe , t . it , t . before_each , t . pending 5local clear , eval , eq =n . clear , n . eval , t . eq 6local source =n . source 7 8describe ( 'vimscript' , function () 9before_each ( clear ) 10 11it ( 'parses `<SID>` with turkish locale' , function () 12if not pcall ( n . command , 'lang ctype tr_TR.UTF-8' ) then 13pending ( 'Locale tr_TR.UTF-8 not supported' ) 14return 15end 16source ( [[ 17let s:foo = 1 18func! <sid>_dummy_function() 19echo 1 20endfunc 21au VimEnter * call <sid>_dummy_function() 22]] ) 23eq ( nil , string . find ( eval ( 'v:errmsg' ), '^E129' )) 24end ) 25 26it ( 'str2float is not affected by locale' , function () 27if not pcall ( n . command , 'lang ctype sv_SE.UTF-8' ) then 28pending ( 'Locale sv_SE.UTF-8 not supported' ) 29return 30end 31clear { env ={ LANG ='' , LC_NUMERIC ='sv_SE.UTF-8' } } 32eq ( 2.2 , eval ( 'str2float("2.2")' )) 33end ) 34end )