mirror of
https://github.com/mawww/kakoune.git
synced 2024-08-16 16:20:38 +03:00
Test to demonstrate fifo buffer blank line inconsistency
When "edit -fifo" reads data without a trailing newline, the fifo buffer will not have a trailing blank line. But if there is a trailing newline, we will get a trailing blank line. This is weird because the trailing blank line exists for scrolling, it should not be determined by the data read. Add a test case to demonstrates the inconsistency which is fixed by the next patch.
This commit is contained in:
parent
c124c8f517
commit
fdbad4d9b2
1
test/commands/edit-fifo-noscroll-noeol/cmd
Normal file
1
test/commands/edit-fifo-noscroll-noeol/cmd
Normal file
@ -0,0 +1 @@
|
||||
:nop %sh{mkfifo fifo}; edit -fifo fifo *fifo*<ret>
|
1
test/commands/edit-fifo-noscroll-noeol/out
Normal file
1
test/commands/edit-fifo-noscroll-noeol/out
Normal file
@ -0,0 +1 @@
|
||||
* noeol
|
10
test/commands/edit-fifo-noscroll-noeol/script
Normal file
10
test/commands/edit-fifo-noscroll-noeol/script
Normal file
@ -0,0 +1,10 @@
|
||||
ui_out -ignore 7
|
||||
exec 5>fifo
|
||||
ui_out '{ "jsonrpc": "2.0", "method": "refresh", "params": [true] }'
|
||||
|
||||
printf '* noeol' >&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": " noeol\u000a" }]], { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, { "fg": "blue", "bg": "default", "underline": "default", "attributes": [] }] }'
|
||||
ui_out -ignore 2
|
||||
|
||||
exec 5>&-
|
||||
ui_out '{ "jsonrpc": "2.0", "method": "draw_status", "params": [[], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "*fifo* 1:1 " }, { "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": [] }] }'
|
Loading…
Reference in New Issue
Block a user