robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
f907614088
master
1local t =require ( 'test.testutil' ) 2local n =require ( 'test.functional.testnvim' )() 3local Screen =require ( 'test.functional.ui.screen' ) 4 5local describe , it , before_each =t . describe , t . it , t . before_each 6local clear , eq , command , fn =n . clear , t . eq , n . command , n . fn 7local assert_alive =n . assert_alive 8 9describe ( ':z^' , function () 10before_each ( clear ) 11 12it ( 'correctly sets the cursor after :z^' , function () 13command ( 'z^' ) 14eq ( 1 , fn . line ( '.' )) 15end ) 16end ) 17 18describe ( ':print' , function () 19before_each ( clear ) 20 21it ( 'does not crash when printing 0xFF byte #34044' , function () 22local screen =Screen . new () 23-- Needs raw 0xFF byte, not 0xFF char 24command ( 'call setline(1, "foo\\xFFbar")' ) 25command ( '%print' ) 26screen : expect ( [[ 27^foo{18:<ff>}bar | 28{1:~ }|*12 29fooÿbar | 30]] ) 31assert_alive () 32end ) 33end )