summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEnrico Borba <enricozb@users.noreply.github.com>2024-12-23 09:23:58 +0100
committerGitHub <noreply@github.com>2024-12-23 09:23:58 +0100
commit52125e6336d596aebdd4da91080b3178ddca7449 (patch)
tree27d3e5c01660d567f22fee621c97753f294256b0 /test
parent14cb35f62b36b2f1aa530adb5e31c05ff1347bfc (diff)
parent9c458c50661446fc6e7295787b06422137af099d (diff)
Merge branch 'master' into enricozb/daemon-stdin
Diffstat (limited to 'test')
-rw-r--r--test/commands/edit-fifo-noscroll-noeol/script8
-rw-r--r--test/commands/edit-fifo-noscroll/script4
-rw-r--r--test/commands/fifo-read-ranges-noeol-scroll/cmd1
-rw-r--r--test/commands/fifo-read-ranges-noeol-scroll/rc5
-rw-r--r--test/commands/fifo-read-ranges-noeol-scroll/script11
-rw-r--r--test/commands/fifo-read-ranges-noeol/cmd1
-rw-r--r--test/commands/fifo-read-ranges-noeol/rc5
-rw-r--r--test/commands/fifo-read-ranges-noeol/script11
-rw-r--r--test/commands/fifo-read-ranges-scroll/cmd1
-rw-r--r--test/commands/fifo-read-ranges-scroll/rc5
-rw-r--r--test/commands/fifo-read-ranges-scroll/script9
-rw-r--r--test/commands/fifo-read-ranges/cmd1
-rw-r--r--test/commands/fifo-read-ranges/rc5
-rw-r--r--test/commands/fifo-read-ranges/script9
-rw-r--r--test/highlight/replace-multiline-range/script2
-rw-r--r--test/highlight/replace-only-fully-selected-ranges/script2
-rw-r--r--test/hooks/completion-hide-using-register/cmd1
-rw-r--r--test/hooks/completion-hide-using-register/in1
-rw-r--r--test/hooks/completion-hide-using-register/out2
-rw-r--r--test/hooks/completion-hide-using-register/rc8
-rw-r--r--test/hooks/completion-hide-using-register/script7
-rw-r--r--test/regression/0-eval-creates-prompt/script2
-rw-r--r--test/regression/0-mouse-during-insert/script2
-rw-r--r--test/regression/0-nothing-selected-on-prompt-initial-shift-tab/script4
-rw-r--r--test/regression/3219-scroll-json-ui/script17
-rw-r--r--test/regression/5001-line-highlighting-breaks-at-region/rc2
-rw-r--r--test/regression/5001-line-highlighting-breaks-at-region/script2
-rw-r--r--test/regression/5118-crash-on-scroll-with-insert-completion-and-wrap/script10
-rw-r--r--test/regression/5253-line-and-column-highlighter-issue/cmd1
-rw-r--r--test/regression/5253-line-and-column-highlighter-issue/in3
-rw-r--r--test/regression/5253-line-and-column-highlighter-issue/rc2
-rw-r--r--test/regression/5253-line-and-column-highlighter-issue/script1
-rw-r--r--test/regression/638-highlight-codepoint-with-bracket/patch11
-rwxr-xr-xtest/run62
-rw-r--r--test/shell/prompt-shell-script-candidates/script8
-rw-r--r--test/shell/prompt-shell-script-completion/cmd2
-rw-r--r--test/shell/prompt-shell-script-completion/rc3
-rw-r--r--test/shell/prompt-shell-script-completion/script5
-rw-r--r--test/tools/git/blame-in-diff/script2
-rw-r--r--test/tools/git/blame-jump-message/script7
40 files changed, 159 insertions, 86 deletions
diff --git a/test/commands/edit-fifo-noscroll-noeol/script b/test/commands/edit-fifo-noscroll-noeol/script
index e543ddc0..44e078e2 100644
--- a/test/commands/edit-fifo-noscroll-noeol/script
+++ b/test/commands/edit-fifo-noscroll-noeol/script
@@ -1,10 +1,8 @@
-ui_out -ignore 7
+ui_out -until '{ "jsonrpc": "2.0", "method": "refresh", "params": [true] }'
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
+ui_out -until '{ "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": [] }] }'
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": [] }] }'
+ui_out -until '{ "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": [] }] }'
diff --git a/test/commands/edit-fifo-noscroll/script b/test/commands/edit-fifo-noscroll/script
index 3a719e6a..4c8e329f 100644
--- a/test/commands/edit-fifo-noscroll/script
+++ b/test/commands/edit-fifo-noscroll/script
@@ -2,11 +2,11 @@ ui_out -until '{ "jsonrpc": "2.0", "method": "refresh", "params": [true] }'
exec 5>fifo
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 -until '{ "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 -until '{ "jsonrpc": "2.0", "method": "refresh", "params": [false] }'
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 -until '{ "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 -until '{ "jsonrpc": "2.0", "method": "refresh", "params": [false] }'
dd if=/dev/zero bs=2049 count=1 2>/dev/null | sed s/././g >&5
diff --git a/test/commands/fifo-read-ranges-noeol-scroll/cmd b/test/commands/fifo-read-ranges-noeol-scroll/cmd
new file mode 100644
index 00000000..8b137891
--- /dev/null
+++ b/test/commands/fifo-read-ranges-noeol-scroll/cmd
@@ -0,0 +1 @@
+
diff --git a/test/commands/fifo-read-ranges-noeol-scroll/rc b/test/commands/fifo-read-ranges-noeol-scroll/rc
new file mode 100644
index 00000000..a839307c
--- /dev/null
+++ b/test/commands/fifo-read-ranges-noeol-scroll/rc
@@ -0,0 +1,5 @@
+hook global BufReadFifo .* %{
+ echo -to-file ranges %val{hook_param}
+}
+nop %sh{mkfifo fifo 2>/dev/null}
+edit -fifo fifo -scroll *fifo*
diff --git a/test/commands/fifo-read-ranges-noeol-scroll/script b/test/commands/fifo-read-ranges-noeol-scroll/script
new file mode 100644
index 00000000..5c10189c
--- /dev/null
+++ b/test/commands/fifo-read-ranges-noeol-scroll/script
@@ -0,0 +1,11 @@
+mkfifo fifo ranges 2>/dev/null
+exec 5>fifo
+printf a >&5
+assert_eq 1.1,1.1 "$(cat ranges)"
+printf b >&5
+assert_eq 1.2,1.2 "$(cat ranges)"
+printf 'c\n' >&5
+assert_eq 1.3,1.4 "$(cat ranges)"
+printf d >&5
+assert_eq 2.1,2.1 "$(cat ranges)"
+exec 5>&-
diff --git a/test/commands/fifo-read-ranges-noeol/cmd b/test/commands/fifo-read-ranges-noeol/cmd
new file mode 100644
index 00000000..8b137891
--- /dev/null
+++ b/test/commands/fifo-read-ranges-noeol/cmd
@@ -0,0 +1 @@
+
diff --git a/test/commands/fifo-read-ranges-noeol/rc b/test/commands/fifo-read-ranges-noeol/rc
new file mode 100644
index 00000000..6c6b32d8
--- /dev/null
+++ b/test/commands/fifo-read-ranges-noeol/rc
@@ -0,0 +1,5 @@
+hook global BufReadFifo .* %{
+ echo -to-file ranges %val{hook_param}
+}
+nop %sh{mkfifo fifo 2>/dev/null}
+edit -fifo fifo *fifo*
diff --git a/test/commands/fifo-read-ranges-noeol/script b/test/commands/fifo-read-ranges-noeol/script
new file mode 100644
index 00000000..5c10189c
--- /dev/null
+++ b/test/commands/fifo-read-ranges-noeol/script
@@ -0,0 +1,11 @@
+mkfifo fifo ranges 2>/dev/null
+exec 5>fifo
+printf a >&5
+assert_eq 1.1,1.1 "$(cat ranges)"
+printf b >&5
+assert_eq 1.2,1.2 "$(cat ranges)"
+printf 'c\n' >&5
+assert_eq 1.3,1.4 "$(cat ranges)"
+printf d >&5
+assert_eq 2.1,2.1 "$(cat ranges)"
+exec 5>&-
diff --git a/test/commands/fifo-read-ranges-scroll/cmd b/test/commands/fifo-read-ranges-scroll/cmd
new file mode 100644
index 00000000..8b137891
--- /dev/null
+++ b/test/commands/fifo-read-ranges-scroll/cmd
@@ -0,0 +1 @@
+
diff --git a/test/commands/fifo-read-ranges-scroll/rc b/test/commands/fifo-read-ranges-scroll/rc
new file mode 100644
index 00000000..a839307c
--- /dev/null
+++ b/test/commands/fifo-read-ranges-scroll/rc
@@ -0,0 +1,5 @@
+hook global BufReadFifo .* %{
+ echo -to-file ranges %val{hook_param}
+}
+nop %sh{mkfifo fifo 2>/dev/null}
+edit -fifo fifo -scroll *fifo*
diff --git a/test/commands/fifo-read-ranges-scroll/script b/test/commands/fifo-read-ranges-scroll/script
new file mode 100644
index 00000000..2f39bc31
--- /dev/null
+++ b/test/commands/fifo-read-ranges-scroll/script
@@ -0,0 +1,9 @@
+mkfifo fifo ranges 2>/dev/null
+exec 5>fifo
+echo a >&5
+assert_eq 1.1,1.2 "$(cat ranges)"
+echo b >&5
+assert_eq 2.1,2.2 "$(cat ranges)"
+echo c >&5
+assert_eq 3.1,3.2 "$(cat ranges)"
+exec 5>&-
diff --git a/test/commands/fifo-read-ranges/cmd b/test/commands/fifo-read-ranges/cmd
new file mode 100644
index 00000000..8b137891
--- /dev/null
+++ b/test/commands/fifo-read-ranges/cmd
@@ -0,0 +1 @@
+
diff --git a/test/commands/fifo-read-ranges/rc b/test/commands/fifo-read-ranges/rc
new file mode 100644
index 00000000..6c6b32d8
--- /dev/null
+++ b/test/commands/fifo-read-ranges/rc
@@ -0,0 +1,5 @@
+hook global BufReadFifo .* %{
+ echo -to-file ranges %val{hook_param}
+}
+nop %sh{mkfifo fifo 2>/dev/null}
+edit -fifo fifo *fifo*
diff --git a/test/commands/fifo-read-ranges/script b/test/commands/fifo-read-ranges/script
new file mode 100644
index 00000000..2f39bc31
--- /dev/null
+++ b/test/commands/fifo-read-ranges/script
@@ -0,0 +1,9 @@
+mkfifo fifo ranges 2>/dev/null
+exec 5>fifo
+echo a >&5
+assert_eq 1.1,1.2 "$(cat ranges)"
+echo b >&5
+assert_eq 2.1,2.2 "$(cat ranges)"
+echo c >&5
+assert_eq 3.1,3.2 "$(cat ranges)"
+exec 5>&-
diff --git a/test/highlight/replace-multiline-range/script b/test/highlight/replace-multiline-range/script
index f45ba1dc..a102ee43 100644
--- a/test/highlight/replace-multiline-range/script
+++ b/test/highlight/replace-multiline-range/script
@@ -2,6 +2,6 @@ ui_out '{ "jsonrpc": "2.0", "method": "set_ui_options", "params": [{}] }'
ui_out '{ "jsonrpc": "2.0", "method": "draw", "params": [[[{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": ".." }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "\u000a" }], [{ "face": { "fg": "white", "bg": "blue", "underline": "default", "attributes": [] }, "contents": "1" }, { "face": { "fg": "white", "bg": "blue", "underline": "default", "attributes": [] }, "contents": ".." }, { "face": { "fg": "black", "bg": "white", "underline": "default", "attributes": [] }, "contents": "0" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "\u000a" }]], { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, { "fg": "blue", "bg": "default", "underline": "default", "attributes": [] }] }'
ui_out '{ "jsonrpc": "2.0", "method": "menu_hide", "params": [] }'
ui_out '{ "jsonrpc": "2.0", "method": "info_hide", "params": [] }'
-ui_out '{ "jsonrpc": "2.0", "method": "draw_status", "params": [[], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "out 5:5 " }, { "face": { "fg": "black", "bg": "yellow", "underline": "default", "attributes": [] }, "contents": "[+]" }, { "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": [] }] }'
+ui_out '{ "jsonrpc": "2.0", "method": "draw_status", "params": [[{ "face": { "fg": "black", "bg": "yellow", "underline": "default", "attributes": [] }, "contents": "committed change #1" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "out 5:5 " }, { "face": { "fg": "black", "bg": "yellow", "underline": "default", "attributes": [] }, "contents": "[+]" }, { "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": [] }] }'
ui_out '{ "jsonrpc": "2.0", "method": "set_cursor", "params": ["buffer", { "line": 2, "column": 3 }] }'
ui_out '{ "jsonrpc": "2.0", "method": "refresh", "params": [true] }'
diff --git a/test/highlight/replace-only-fully-selected-ranges/script b/test/highlight/replace-only-fully-selected-ranges/script
index 8eef5ba5..31f6e9a1 100644
--- a/test/highlight/replace-only-fully-selected-ranges/script
+++ b/test/highlight/replace-only-fully-selected-ranges/script
@@ -2,6 +2,6 @@ ui_out '{ "jsonrpc": "2.0", "method": "set_ui_options", "params": [{}] }'
ui_out '{ "jsonrpc": "2.0", "method": "draw", "params": [[[{ "face": { "fg": "black", "bg": "blue", "underline": "default", "attributes": [] }, "contents": "1" }, { "face": { "fg": "black", "bg": "blue", "underline": "default", "attributes": [] }, "contents": "replaced" }, { "face": { "fg": "black", "bg": "blue", "underline": "default", "attributes": [] }, "contents": " text" }, { "face": { "fg": "black", "bg": "white", "underline": "default", "attributes": [] }, "contents": "5" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "1" }, { "face": { "fg": "black", "bg": "white", "underline": "default", "attributes": [] }, "contents": "replaced" }, { "face": { "fg": "black", "bg": "white", "underline": "default", "attributes": [] }, "contents": " text" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "5\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "1" }, { "face": { "fg": "black", "bg": "white", "underline": "default", "attributes": [] }, "contents": "2" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "345\u000a" }]], { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, { "fg": "blue", "bg": "default", "underline": "default", "attributes": [] }] }'
ui_out '{ "jsonrpc": "2.0", "method": "menu_hide", "params": [] }'
ui_out '{ "jsonrpc": "2.0", "method": "info_hide", "params": [] }'
-ui_out '{ "jsonrpc": "2.0", "method": "draw_status", "params": [[], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "out 3:2 " }, { "face": { "fg": "black", "bg": "yellow", "underline": "default", "attributes": [] }, "contents": "[+]" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "blue", "bg": "default", "underline": "default", "attributes": [] }, "contents": "3 sels (3)" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " - client0@[kak-tests]" }], { "fg": "cyan", "bg": "default", "underline": "default", "attributes": [] }] }'
+ui_out '{ "jsonrpc": "2.0", "method": "draw_status", "params": [[{ "face": { "fg": "black", "bg": "yellow", "underline": "default", "attributes": [] }, "contents": "committed change #1" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "out 3:2 " }, { "face": { "fg": "black", "bg": "yellow", "underline": "default", "attributes": [] }, "contents": "[+]" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "blue", "bg": "default", "underline": "default", "attributes": [] }, "contents": "3 sels (3)" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " - client0@[kak-tests]" }], { "fg": "cyan", "bg": "default", "underline": "default", "attributes": [] }] }'
ui_out '{ "jsonrpc": "2.0", "method": "set_cursor", "params": ["buffer", { "line": 2, "column": 1 }] }'
ui_out '{ "jsonrpc": "2.0", "method": "refresh", "params": [true] }'
diff --git a/test/hooks/completion-hide-using-register/cmd b/test/hooks/completion-hide-using-register/cmd
new file mode 100644
index 00000000..8b137891
--- /dev/null
+++ b/test/hooks/completion-hide-using-register/cmd
@@ -0,0 +1 @@
+
diff --git a/test/hooks/completion-hide-using-register/in b/test/hooks/completion-hide-using-register/in
new file mode 100644
index 00000000..fa11a6a9
--- /dev/null
+++ b/test/hooks/completion-hide-using-register/in
@@ -0,0 +1 @@
+echo
diff --git a/test/hooks/completion-hide-using-register/out b/test/hooks/completion-hide-using-register/out
new file mode 100644
index 00000000..97e70d26
--- /dev/null
+++ b/test/hooks/completion-hide-using-register/out
@@ -0,0 +1,2 @@
+echofoobar
+echo
diff --git a/test/hooks/completion-hide-using-register/rc b/test/hooks/completion-hide-using-register/rc
new file mode 100644
index 00000000..8b579f63
--- /dev/null
+++ b/test/hooks/completion-hide-using-register/rc
@@ -0,0 +1,8 @@
+set-option global autocomplete insert
+hook global InsertCompletionHide .+ %{
+ evaluate-commands -draft -save-regs '"' %{
+ select %val{hook_param}
+ set-register dquote foo bar
+ execute-keys <a-p>
+ }
+}
diff --git a/test/hooks/completion-hide-using-register/script b/test/hooks/completion-hide-using-register/script
new file mode 100644
index 00000000..a6096a99
--- /dev/null
+++ b/test/hooks/completion-hide-using-register/script
@@ -0,0 +1,7 @@
+ui_out -until '{ "jsonrpc": "2.0", "method": "refresh", "params": [true] }'
+ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "Oe" ] }'
+ui_out -until '{ "jsonrpc": "2.0", "method": "menu_show", "params": [[[{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "echo" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "cyan", "bg": "default", "underline": "default", "attributes": [] }, "contents": "out" }]], { "line": 0, "column": 0 }, { "fg": "white", "bg": "blue", "underline": "default", "attributes": [] }, { "fg": "blue", "bg": "white", "underline": "default", "attributes": [] }, "inline"] }'
+ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "<c-n>" ] }'
+ui_out -until '{ "jsonrpc": "2.0", "method": "menu_select", "params": [1] }'
+ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "<c-r>\"" ] }'
+ui_out -until '{ "jsonrpc": "2.0", "method": "menu_hide", "params": [] }'
diff --git a/test/regression/0-eval-creates-prompt/script b/test/regression/0-eval-creates-prompt/script
index c9455f5e..d2028b9c 100644
--- a/test/regression/0-eval-creates-prompt/script
+++ b/test/regression/0-eval-creates-prompt/script
@@ -2,4 +2,4 @@ ui_out -ignore 7
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ ":eval %{ exec %{:echo -} }<ret>" ] }'
ui_out -ignore 5
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "markup 123<ret>" ] }'
-ui_out -until-grep '"method": "draw_status", .* "contents": "123"' >/dev/null
+ui_out -until-grep '"method": "draw_status", .* "contents": "123"'
diff --git a/test/regression/0-mouse-during-insert/script b/test/regression/0-mouse-during-insert/script
index 439d70d3..924de56b 100644
--- a/test/regression/0-mouse-during-insert/script
+++ b/test/regression/0-mouse-during-insert/script
@@ -1,6 +1,6 @@
ui_out -ignore 7
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "i" ] }'
-ui_out -ignore 4
+ui_out -ignore 3
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "a" ] }'
ui_out -ignore 4
ui_in '{ "jsonrpc": "2.0", "method": "mouse_press", "params": [ "left", 0, 2 ] }'
diff --git a/test/regression/0-nothing-selected-on-prompt-initial-shift-tab/script b/test/regression/0-nothing-selected-on-prompt-initial-shift-tab/script
index f73d1c08..c5fe57eb 100644
--- a/test/regression/0-nothing-selected-on-prompt-initial-shift-tab/script
+++ b/test/regression/0-nothing-selected-on-prompt-initial-shift-tab/script
@@ -1,6 +1,4 @@
ui_out -ignore 7
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ ":my-command " ] }'
-ui_out -ignore 7
-ui_out '{ "jsonrpc": "2.0", "method": "refresh", "params": [false] }'
-ui_out '{ "jsonrpc": "2.0", "method": "menu_show", "params": [[[{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "aaa" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "bbb" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "ccc" }]], { "line": 0, "column": 0 }, { "fg": "white", "bg": "blue", "underline": "default", "attributes": [] }, { "fg": "blue", "bg": "white", "underline": "default", "attributes": [] }, "prompt"] }'
+ui_out -until '{ "jsonrpc": "2.0", "method": "menu_show", "params": [[[{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "aaa" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "bbb" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "ccc" }]], { "line": 0, "column": 0 }, { "fg": "white", "bg": "blue", "underline": "default", "attributes": [] }, { "fg": "blue", "bg": "white", "underline": "default", "attributes": [] }, "prompt"] }'
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "<s-tab><ret>" ] }'
diff --git a/test/regression/3219-scroll-json-ui/script b/test/regression/3219-scroll-json-ui/script
index 2ba5f829..a555872d 100644
--- a/test/regression/3219-scroll-json-ui/script
+++ b/test/regression/3219-scroll-json-ui/script
@@ -1,13 +1,4 @@
-ui_out '{ "jsonrpc": "2.0", "method": "set_ui_options", "params": [{}] }'
-ui_out '{ "jsonrpc": "2.0", "method": "draw", "params": [[[{ "face": { "fg": "black", "bg": "white", "underline": "default", "attributes": [] }, "contents": "0" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "1\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "02\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "03\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "04\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "05\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "06\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "07\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "08\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "09\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "10\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "11\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "12\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "13\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "14\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "15\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "16\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "17\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "18\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "19\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "20\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "21\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "22\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "23\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "24\u000a" }]], { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, { "fg": "blue", "bg": "default", "underline": "default", "attributes": [] }] }'
-ui_out '{ "jsonrpc": "2.0", "method": "menu_hide", "params": [] }'
-ui_out '{ "jsonrpc": "2.0", "method": "info_hide", "params": [] }'
-ui_out '{ "jsonrpc": "2.0", "method": "draw_status", "params": [[], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "out 1:1 " }, { "face": { "fg": "black", "bg": "yellow", "underline": "default", "attributes": [] }, "contents": "" }, { "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": [] }] }'
-ui_out '{ "jsonrpc": "2.0", "method": "set_cursor", "params": ["buffer", { "line": 0, "column": 0 }] }'
-ui_out '{ "jsonrpc": "2.0", "method": "refresh", "params": [true] }'
-ui_in '{ "jsonrpc": "2.0", "method": "scroll", "params": [ 2 ] }'
-ui_out '{ "jsonrpc": "2.0", "method": "draw", "params": [[[{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "03\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "04\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "05\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "06\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "07\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "08\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "09\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "10\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "11\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "12\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "13\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "14\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "15\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "16\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "17\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "18\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "19\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "20\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "21\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "22\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "23\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "24\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "25\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "26\u000a" }]], { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, { "fg": "blue", "bg": "default", "underline": "default", "attributes": [] }] }'
-ui_out '{ "jsonrpc": "2.0", "method": "info_hide", "params": [] }'
-ui_out '{ "jsonrpc": "2.0", "method": "draw_status", "params": [[], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "out 1:1 " }, { "face": { "fg": "black", "bg": "yellow", "underline": "default", "attributes": [] }, "contents": "" }, { "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": [] }] }'
-ui_out '{ "jsonrpc": "2.0", "method": "set_cursor", "params": ["buffer", { "line": 0, "column": 0 }] }'
-ui_out '{ "jsonrpc": "2.0", "method": "refresh", "params": [false] }'
+ui_out -until '{ "jsonrpc": "2.0", "method": "draw", "params": [[[{ "face": { "fg": "black", "bg": "white", "underline": "default", "attributes": [] }, "contents": "0" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "1\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "02\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "03\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "04\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "05\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "06\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "07\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "08\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "09\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "10\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "11\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "12\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "13\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "14\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "15\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "16\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "17\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "18\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "19\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "20\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "21\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "22\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "23\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "24\u000a" }]], { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, { "fg": "blue", "bg": "default", "underline": "default", "attributes": [] }] }'
+ui_out -until '{ "jsonrpc": "2.0", "method": "refresh", "params": [true] }'
+ui_in '{ "jsonrpc": "2.0", "method": "scroll", "params": [ 2, 0, 0 ] }'
+ui_out -until '{ "jsonrpc": "2.0", "method": "draw", "params": [[[{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "03\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "04\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "05\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "06\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "07\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "08\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "09\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "10\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "11\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "12\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "13\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "14\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "15\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "16\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "17\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "18\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "19\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "20\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "21\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "22\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "23\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "24\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "25\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "26\u000a" }]], { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, { "fg": "blue", "bg": "default", "underline": "default", "attributes": [] }] }'
diff --git a/test/regression/5001-line-highlighting-breaks-at-region/rc b/test/regression/5001-line-highlighting-breaks-at-region/rc
index 78060e1c..bd8b4cfb 100644
--- a/test/regression/5001-line-highlighting-breaks-at-region/rc
+++ b/test/regression/5001-line-highlighting-breaks-at-region/rc
@@ -2,4 +2,6 @@ add-highlighter window/test regions
add-highlighter window/test/macro region %{#} %{(?=\\n)} group
add-highlighter window/test/code default-region group
add-highlighter window/ number-lines
+face global LineNumbers default,default+F
+face global LineNumberCursor default,default+rF
add-highlighter window/ line 2 ,red
diff --git a/test/regression/5001-line-highlighting-breaks-at-region/script b/test/regression/5001-line-highlighting-breaks-at-region/script
index f696b0d1..89885a7d 100644
--- a/test/regression/5001-line-highlighting-breaks-at-region/script
+++ b/test/regression/5001-line-highlighting-breaks-at-region/script
@@ -1,2 +1,2 @@
ui_out -ignore 1
-ui_out '{ "jsonrpc": "2.0", "method": "draw", "params": [[[{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " 1│" }, { "face": { "fg": "black", "bg": "white", "underline": "default", "attributes": [] }, "contents": "#" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "foo\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " 2│" }, { "face": { "fg": "default", "bg": "red", "underline": "default", "attributes": [] }, "contents": "bar\u000a" }, { "face": { "fg": "default", "bg": "red", "underline": "default", "attributes": [] }, "contents": " " }]], { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, { "fg": "blue", "bg": "default", "underline": "default", "attributes": [] }] }'
+ui_out '{ "jsonrpc": "2.0", "method": "draw", "params": [[[{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": ["final_fg","final_bg","final_attr"] }, "contents": " 1│" }, { "face": { "fg": "black", "bg": "white", "underline": "default", "attributes": [] }, "contents": "#" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "foo\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": ["final_fg","final_bg","final_attr"] }, "contents": " 2│" }, { "face": { "fg": "default", "bg": "red", "underline": "default", "attributes": [] }, "contents": "bar\u000a" }, { "face": { "fg": "default", "bg": "red", "underline": "default", "attributes": [] }, "contents": " " }]], { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, { "fg": "blue", "bg": "default", "underline": "default", "attributes": [] }] }'
diff --git a/test/regression/5118-crash-on-scroll-with-insert-completion-and-wrap/script b/test/regression/5118-crash-on-scroll-with-insert-completion-and-wrap/script
index 070b8544..2356f6e4 100644
--- a/test/regression/5118-crash-on-scroll-with-insert-completion-and-wrap/script
+++ b/test/regression/5118-crash-on-scroll-with-insert-completion-and-wrap/script
@@ -1,8 +1,8 @@
ui_out -ignore 6
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "a<space>2<c-x><c-w>" ] }'
-ui_out -until-grep menu_show >/dev/null
-ui_out -until-grep refresh >/dev/null
-ui_out -until-grep menu_show >/dev/null
-ui_out -until-grep refresh >/dev/null
-ui_in '{ "jsonrpc": "2.0", "method": "scroll", "params": [ -5 ] }'
+ui_out -until-grep menu_show
+ui_out -until-grep refresh
+ui_out -until-grep menu_show
+ui_out -until-grep refresh
+ui_in '{ "jsonrpc": "2.0", "method": "scroll", "params": [ -5, 0, 0 ] }'
ui_out '{ "jsonrpc": "2.0", "method": "draw", "params": [[[{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "1\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "2\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "3\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "4\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "5\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "6\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "7\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "8\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "9\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "10\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "11\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "12\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "13\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "14\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "15\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "16\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "17\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "18\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "19\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "20\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "21\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "22\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "23\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "24\u000a" }]], { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, { "fg": "blue", "bg": "default", "underline": "default", "attributes": [] }] }'
diff --git a/test/regression/5253-line-and-column-highlighter-issue/cmd b/test/regression/5253-line-and-column-highlighter-issue/cmd
new file mode 100644
index 00000000..8b137891
--- /dev/null
+++ b/test/regression/5253-line-and-column-highlighter-issue/cmd
@@ -0,0 +1 @@
+
diff --git a/test/regression/5253-line-and-column-highlighter-issue/in b/test/regression/5253-line-and-column-highlighter-issue/in
new file mode 100644
index 00000000..b183936e
--- /dev/null
+++ b/test/regression/5253-line-and-column-highlighter-issue/in
@@ -0,0 +1,3 @@
+
+TEST
+
diff --git a/test/regression/5253-line-and-column-highlighter-issue/rc b/test/regression/5253-line-and-column-highlighter-issue/rc
new file mode 100644
index 00000000..66e02ca3
--- /dev/null
+++ b/test/regression/5253-line-and-column-highlighter-issue/rc
@@ -0,0 +1,2 @@
+add-highlighter global/ column 40 "default,green"
+add-highlighter global/ line 2 "default,blue"
diff --git a/test/regression/5253-line-and-column-highlighter-issue/script b/test/regression/5253-line-and-column-highlighter-issue/script
new file mode 100644
index 00000000..ad7a4881
--- /dev/null
+++ b/test/regression/5253-line-and-column-highlighter-issue/script
@@ -0,0 +1 @@
+ui_out -until-grep '"method": "draw"' '{ "jsonrpc": "2.0", "method": "draw", "params": [[[{ "face": { "fg": "black", "bg": "cyan", "underline": "default", "attributes": [] }, "contents": "\u000a" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "default", "bg": "green", "underline": "default", "attributes": [] }, "contents": " " }], [{ "face": { "fg": "default", "bg": "blue", "underline": "default", "attributes": [] }, "contents": "TEST\u000a" }, { "face": { "fg": "default", "bg": "blue", "underline": "default", "attributes": [] }, "contents": " " }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "\u000a" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "default", "bg": "green", "underline": "default", "attributes": [] }, "contents": " " }]], { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, { "fg": "blue", "bg": "default", "underline": "default", "attributes": [] }] }'
diff --git a/test/regression/638-highlight-codepoint-with-bracket/patch b/test/regression/638-highlight-codepoint-with-bracket/patch
deleted file mode 100644
index 475f268a..00000000
--- a/test/regression/638-highlight-codepoint-with-bracket/patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/display 2016-05-10 09:21:59.272300947 +0100
-+++ b/display 2016-05-10 09:37:27.866341923 +0100
-@@ -1,5 +1,5 @@
--{ "jsonrpc": "2.0", "method": "draw", "params": [[[{ "face": { "fg": "black", "bg": "white", "underline": "default", "attributes": [] }, "contents": "“" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "We ought to scrape this planet clean of every living thing on it," }, { "face": { "fg": "red", "bg": "default", "underline": "default", "attributes": [] }, "contents": "”" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "\u000a" }]], { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, { "fg": "blue", "bg": "default", "underline": "default", "attributes": [] }] }
-+{ "jsonrpc": "2.0", "method": "draw", "params": [[[{ "face": { "fg": "red", "bg": "default", "underline": "default", "attributes": [] }, "contents": "“" }, { "face": { "fg": "white", "bg": "blue", "underline": "default", "attributes": [] }, "contents": "We" }, { "face": { "fg": "black", "bg": "white", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "ought to scrape this planet clean of every living thing on it," }, { "face": { "fg": "red", "bg": "default", "underline": "default", "attributes": [] }, "contents": "”" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "\u000a" }]], { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, { "fg": "blue", "bg": "default", "underline": "default", "attributes": [] }] }
- { "jsonrpc": "2.0", "method": "menu_hide", "params": [] }
- { "jsonrpc": "2.0", "method": "info_hide", "params": [] }
--{ "jsonrpc": "2.0", "method": "draw_status", "params": [[], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "out 1:1 " }, { "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": [] }] }
-+{ "jsonrpc": "2.0", "method": "draw_status", "params": [[], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "out 1:4 " }, { "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": [] }] }
- { "jsonrpc": "2.0", "method": "refresh", "params": [true] }
-
diff --git a/test/run b/test/run
index a65f5396..a26642da 100755
--- a/test/run
+++ b/test/run
@@ -180,36 +180,42 @@ ui_in() {
}
ui_out() {
- while [ $# -ne 0 ]; do
- case "$1" in
- -ignore)
- shift
- skip_count=$1
- while [ $skip_count -gt 0 ]; do
- read -r event <&4
- skip_count=$(( skip_count - 1 ))
- done
- ;;
- -until)
- shift
- while read -r event <&4; do
- [ "$event" = "$1" ] && break
- done
- ;;
- -until-grep)
- shift
- while
- read -r event <&4
- ! printf %s "$event" | grep "$@"
- do :; done
- ;;
- *)
+ arg=$1
+ shift
+ case "$arg" in
+ -ignore)
+ skip_count=$1
+ shift
+ while [ $skip_count -gt 0 ]; do
read -r event <&4
- assert_eq "$1" "$event"
- ;;
- esac
+ skip_count=$(( skip_count - 1 ))
+ done
+ ;;
+ -until)
+ expected=$1
shift
- done
+ while read -r event <&4; do
+ [ "$event" = "$expected" ] && break
+ done
+ ;;
+ -until-eval | -until-grep)
+ pattern=$1
+ shift
+ while read -r event <&4; do
+ if printf %s "$event" | "${arg#-until-}" "$pattern" >/dev/null; then
+ if [ $# -ne 0 ]; then
+ assert_eq "$1" "$event"
+ shift
+ fi
+ break
+ fi
+ done
+ ;;
+ *)
+ read -r event <&4
+ assert_eq "$arg" "$event"
+ ;;
+ esac
}
main "$@"
diff --git a/test/shell/prompt-shell-script-candidates/script b/test/shell/prompt-shell-script-candidates/script
index 231c8725..33cf94ab 100644
--- a/test/shell/prompt-shell-script-candidates/script
+++ b/test/shell/prompt-shell-script-candidates/script
@@ -1,7 +1,5 @@
-ui_out -ignore 7
+ui_out -until '{ "jsonrpc": "2.0", "method": "refresh", "params": [true] }'
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ ":foo<ret>b" ] }'
-ui_out -ignore 4
-ui_out '{ "jsonrpc": "2.0", "method": "refresh", "params": [false] }'
-ui_out -ignore 3
-ui_out '{ "jsonrpc": "2.0", "method": "menu_show", "params": [[[{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "bar" }]], { "line": 0, "column": 0 }, { "fg": "white", "bg": "blue", "underline": "default", "attributes": [] }, { "fg": "blue", "bg": "white", "underline": "default", "attributes": [] }, "prompt"] }'
+ui_out -until '{ "jsonrpc": "2.0", "method": "refresh", "params": [false] }'
+ui_out -until '{ "jsonrpc": "2.0", "method": "menu_show", "params": [[[{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "bar" }]], { "line": 0, "column": 0 }, { "fg": "white", "bg": "blue", "underline": "default", "attributes": [] }, { "fg": "blue", "bg": "white", "underline": "default", "attributes": [] }, "prompt"] }'
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "<tab><ret>" ] }'
diff --git a/test/shell/prompt-shell-script-completion/cmd b/test/shell/prompt-shell-script-completion/cmd
index 7cc38390..8b137891 100644
--- a/test/shell/prompt-shell-script-completion/cmd
+++ b/test/shell/prompt-shell-script-completion/cmd
@@ -1 +1 @@
-:foo<ret>b<tab><tab><ret>
+
diff --git a/test/shell/prompt-shell-script-completion/rc b/test/shell/prompt-shell-script-completion/rc
index 3fd111ba..f7175986 100644
--- a/test/shell/prompt-shell-script-completion/rc
+++ b/test/shell/prompt-shell-script-completion/rc
@@ -1,3 +1,4 @@
+set-option global autocomplete prompt
define-command foo %{
- prompt -shell-script-completion %{ printf 'foo\nbar\nhaz\n' } ': ' %{exec i %val{text} <esc>}
+ prompt -shell-script-completion %{ printf 'foo\nbar\nbaz\n' } ': ' %{exec i %val{text} <esc>}
}
diff --git a/test/shell/prompt-shell-script-completion/script b/test/shell/prompt-shell-script-completion/script
new file mode 100644
index 00000000..768a63bd
--- /dev/null
+++ b/test/shell/prompt-shell-script-completion/script
@@ -0,0 +1,5 @@
+ui_out -until '{ "jsonrpc": "2.0", "method": "refresh", "params": [true] }'
+ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ ":foo<ret>b" ] }'
+ui_out -until '{ "jsonrpc": "2.0", "method": "refresh", "params": [false] }'
+ui_out -until '{ "jsonrpc": "2.0", "method": "menu_show", "params": [[[{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "foo" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "bar" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "baz" }]], { "line": 0, "column": 0 }, { "fg": "white", "bg": "blue", "underline": "default", "attributes": [] }, { "fg": "blue", "bg": "white", "underline": "default", "attributes": [] }, "prompt"] }'
+ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "<tab><ret>" ] }'
diff --git a/test/tools/git/blame-in-diff/script b/test/tools/git/blame-in-diff/script
index e22b3ec8..0cee0ca7 100644
--- a/test/tools/git/blame-in-diff/script
+++ b/test/tools/git/blame-in-diff/script
@@ -3,7 +3,7 @@ ui_out -until '{ "jsonrpc": "2.0", "method": "refresh", "params": [false] }'
# We've jumped to the new version of line 2. Move to the old version so we
# can annotate the old file.
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "k:git blame<ret>" ] }'
-while ui_out -until-grep '"draw_status"' | grep '\[fifo\]'; do :; done > /dev/null
+ui_out -until-eval 'grep "draw_status" | grep -v "\[fifo\]"'
# We should have jumped to the old version of line 2, assert on kak_selection.
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "x" ] }'
diff --git a/test/tools/git/blame-jump-message/script b/test/tools/git/blame-jump-message/script
index 9f6fb6e0..92b1f670 100644
--- a/test/tools/git/blame-jump-message/script
+++ b/test/tools/git/blame-jump-message/script
@@ -1,8 +1,3 @@
-while true; do
- ui_out -until-grep draw_status | grep -v '\[fifo\]' >/dev/null && break
-done
-actual_draw_status=$(ui_out -until-grep draw_status)
-
expected_subject=$(cat <<'EOF'
2017-07-14 A U Thor "Don't break on single quotes or unbalanced {"
EOF
@@ -10,5 +5,5 @@ 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 "$expected_draw_status" "$actual_draw_status"
+ui_out -until-grep 'draw_status.*single quotes' "$expected_draw_status"
ui_out -ignore 2