diff options
| author | Enrico Borba <enricozb@users.noreply.github.com> | 2024-12-23 09:23:58 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-23 09:23:58 +0100 |
| commit | 52125e6336d596aebdd4da91080b3178ddca7449 (patch) | |
| tree | 27d3e5c01660d567f22fee621c97753f294256b0 /test/shell | |
| parent | 14cb35f62b36b2f1aa530adb5e31c05ff1347bfc (diff) | |
| parent | 9c458c50661446fc6e7295787b06422137af099d (diff) | |
Merge branch 'master' into enricozb/daemon-stdin
Diffstat (limited to 'test/shell')
| -rw-r--r-- | test/shell/prompt-shell-script-candidates/script | 8 | ||||
| -rw-r--r-- | test/shell/prompt-shell-script-completion/cmd | 2 | ||||
| -rw-r--r-- | test/shell/prompt-shell-script-completion/rc | 3 | ||||
| -rw-r--r-- | test/shell/prompt-shell-script-completion/script | 5 |
4 files changed, 11 insertions, 7 deletions
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>" ] }' |
