kakoune/test/commands/edit-fifo-noscroll/script
Johannes Altmanninger 7a86602ff8 Fix edit-fifo-noscroll test on BSD
This has been failing on FreeBSD sourcehut CI, for example
https://builds.sr.ht/~mawww/job/1151241
2024-02-18 09:58:53 +11:00

20 lines
2.1 KiB
Plaintext

ui_out -ignore 7
exec 5>fifo
ui_out '{ "jsonrpc": "2.0", "method": "refresh", "params": [true] }'
echo '* line1' >&5
ui_out '{ "jsonrpc": "2.0", "method": "draw", "params": [[[{ "face": { "fg": "black", "bg": "white", "underline": "default", "attributes": [] }, "contents": "*" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " line1\u000a" }]], { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, { "fg": "blue", "bg": "default", "underline": "default", "attributes": [] }] }'
ui_out -ignore 2
echo '* line2' >&5
ui_out '{ "jsonrpc": "2.0", "method": "draw", "params": [[[{ "face": { "fg": "black", "bg": "white", "underline": "default", "attributes": [] }, "contents": "*" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " line1\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "* line2\u000a" }]], { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, { "fg": "blue", "bg": "default", "underline": "default", "attributes": [] }] }'
ui_out -ignore 2
dd if=/dev/zero bs=2049 count=1 2>/dev/null | sed s/././g >&5
ui_out -ignore 3
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "gjxH|wc -c | tr -d \" \"<ret>" ] }'
ui_out -ignore 6
exec 5>&-
ui_out '{ "jsonrpc": "2.0", "method": "draw_status", "params": [[], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "*fifo* 3:4 " }, { "face": { "fg": "black", "bg": "yellow", "underline": "default", "attributes": [] }, "contents": "[scratch]" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "blue", "bg": "default", "underline": "default", "attributes": [] }, "contents": "1 sel" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " - client0@[kak-tests]" }], { "fg": "cyan", "bg": "default", "underline": "default", "attributes": [] }] }'