f786fceb73
This test fails occasionally[1] because the order of events and the number of events varies across runs. We should always call draw_status exactly 3 times: [*git*][fifo] [*git*] Commit subject etc. [*git*] Let's check it this way. This seems to work; this time I took the time to run it a couple hundred times and in Cirrus CI. [1] https://builds.sr.ht/~mawww/job/1151239
15 lines
1.2 KiB
Plaintext
15 lines
1.2 KiB
Plaintext
for _ in fifo-opened fifo-closed blame-info
|
|
do
|
|
actual_draw_status=$(ui_out -until-grep draw_status)
|
|
done
|
|
|
|
expected_subject=$(cat <<'EOF'
|
|
2017-07-14 A U Thor "Don't break on single quotes or unbalanced {"
|
|
EOF
|
|
)
|
|
expected_subject_json=\"$(printf '%s' "$expected_subject" | sed 's/"/\\"/g')\"
|
|
expected_draw_status='{ "jsonrpc": "2.0", "method": "draw_status", "params": [[{ "face": { "fg": "black", "bg": "yellow", "underline": "default", "attributes": [] }, "contents": '"$expected_subject_json"' }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "*git* 13:2 " }, { "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": [] }] }'
|
|
|
|
assert_eq "$actual_draw_status" "$expected_draw_status"
|
|
ui_out -ignore 2
|