diff --git a/src/vs/workbench/contrib/terminalContrib/suggest/test/browser/recordings/macos_bash_echo_multiline.ts b/src/vs/workbench/contrib/terminalContrib/suggest/test/browser/recordings/macos_bash_echo_multiline.ts new file mode 100644 index 00000000000..8744aa6cde9 --- /dev/null +++ b/src/vs/workbench/contrib/terminalContrib/suggest/test/browser/recordings/macos_bash_echo_multiline.ts @@ -0,0 +1,432 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +/* eslint-disable */ +export const events = [ + { + "type": "resize", + "cols": 129, + "rows": 21 + }, + { + "type": "output", + "data": "starting...\r\n" + }, + { + "type": "output", + "data": "starting...\r\n" + }, + { + "type": "output", + "data": "\u001b]633;P;ContinuationPrompt=\\[\\x1b[90m\\]∙\\[\\x1b[0m\\] \u0007" + }, + { + "type": "output", + "data": "\u001b]633;P;Prompt=\\\\[\\\\e]0\\x3b\\\\u@\\\\h: \\\\w\\\\a\\\\]\\\\[\\\\e]0\\x3b\\\\u@\\\\h: \\\\w\\\\a\\\\]\\\\h:\\\\W \\\\u\\\\$ \u0007\u001b[?1034h\u001b]633;A\u0007\r\n\u001b[31m\u001b[0m\u001b[41;38;2;17;17;17mextensions/vscode-api-tests/testWorkspace\u001b[0m\u001b[41m \u001b[0m\u001b[43;31m\u001b[0m\u001b[43;38;2;17;17;17m \u001b[0m\u001b[43;38;2;17;17;17m \u001b[0m\u001b[43;38;2;17;17;17mtyriar/211869\u001b[0m\u001b[43;38;2;17;17;17m \u001b[0m\u001b[44;33m\u001b[0m\u001b[44;38;2;17;17;17m \u001b[0m\u001b[44;38;2;17;17;17m$\u001b[0m\u001b[44;38;2;17;17;17m⇡\u001b[0m\u001b[44;38;2;17;17;17m \u001b[0m\u001b[34m\u001b[0m via \u001b[1;32m \u001b[0m\u001b[1;32mv18.17.1\u001b[0m\u001b[1;32m \u001b[0m\r\n\u001b[1;32m❯\u001b[0m \u001b]633;B\u0007" + }, + { + "type": "promptInputChange", + "data": "|" + }, + { + "type": "input", + "data": "e" + }, + { + "type": "output", + "data": "e" + }, + { + "type": "promptInputChange", + "data": "e|" + }, + { + "type": "input", + "data": "c" + }, + { + "type": "output", + "data": "c" + }, + { + "type": "promptInputChange", + "data": "ec|" + }, + { + "type": "input", + "data": "h" + }, + { + "type": "output", + "data": "h" + }, + { + "type": "promptInputChange", + "data": "ech|" + }, + { + "type": "input", + "data": "o" + }, + { + "type": "output", + "data": "o" + }, + { + "type": "promptInputChange", + "data": "echo|" + }, + { + "type": "input", + "data": " " + }, + { + "type": "output", + "data": " " + }, + { + "type": "promptInputChange", + "data": "echo |" + }, + { + "type": "input", + "data": "\"" + }, + { + "type": "output", + "data": "\"" + }, + { + "type": "promptInputChange", + "data": "echo \"|" + }, + { + "type": "input", + "data": "a" + }, + { + "type": "output", + "data": "a" + }, + { + "type": "promptInputChange", + "data": "echo \"a|" + }, + { + "type": "input", + "data": "\r" + }, + { + "type": "output", + "data": "\r\n\u001b]633;F\u0007\u001b[90m∙\u001b[0m \u001b]633;G\u0007" + }, + { + "type": "promptInputChange", + "data": "echo \"a⏎|" + }, + { + "type": "input", + "data": "b" + }, + { + "type": "output", + "data": "b" + }, + { + "type": "promptInputChange", + "data": "echo \"a⏎b|" + }, + { + "type": "input", + "data": "\r" + }, + { + "type": "output", + "data": "\r\n\u001b]633;F\u0007\u001b[90m∙\u001b[0m \u001b]633;G\u0007" + }, + { + "type": "promptInputChange", + "data": "echo \"a⏎|b⏎" + }, + { + "type": "input", + "data": "c" + }, + { + "type": "output", + "data": "c" + }, + { + "type": "promptInputChange", + "data": "echo \"a⏎b|⏎c" + }, + { + "type": "input", + "data": "\"" + }, + { + "type": "output", + "data": "\"" + }, + { + "type": "promptInputChange", + "data": "echo \"a⏎b⏎|c\"" + }, + { + "type": "input", + "data": "\r" + }, + { + "type": "output", + "data": "\r\n\u001b]633;E;echo \"a\\x0ab\\x0ac\";c7158082-f9ff-43b3-af50-789be32fca2b\u0007\u001b]633;C\u0007" + }, + { + "type": "promptInputChange", + "data": "echo \"a⏎b⏎c\"" + }, + { + "type": "output", + "data": "a\r\nb\r\nc\r\n" + }, + { + "type": "output", + "data": "\u001b]633;D;0\u0007" + }, + { + "type": "output", + "data": "\u001b]633;P;Cwd=/Users/tyriar/dev/microsoft/vscode/extensions/vscode-api-tests/testWorkspace\u0007" + }, + { + "type": "output", + "data": "\u001b]633;P;Prompt=\\x0a\\\\[\\x1b[31m\\\\]\\\\[\\x1b[0m\\\\]\\\\[\\x1b[41\\x3b38\\x3b2\\x3b17\\x3b17\\x3b17m\\\\]extensions/vscode-api-tests/testWorkspace\\\\[\\x1b[0m\\\\]\\\\[\\x1b[41m\\\\] \\\\[\\x1b[0m\\\\]\\\\[\\x1b[43\\x3b31m\\\\]\\\\[\\x1b[0m\\\\]\\\\[\\x1b[43\\x3b38\\x3b2\\x3b17\\x3b17\\x3b17m\\\\] \\\\[\\x1b[0m\\\\]\\\\[\\x1b[43\\x3b38\\x3b2\\x3b17\\x3b17\\x3b17m\\\\] \\\\[\\x1b[0m\\\\]\\\\[\\x1b[43\\x3b38\\x3b2\\x3b17\\x3b17\\x3b17m\\\\]tyriar/211869\\\\[\\x1b[0m\\\\]\\\\[\\x1b[43\\x3b38\\x3b2\\x3b17\\x3b17\\x3b17m\\\\] \\\\[\\x1b[0m\\\\]\\\\[\\x1b[44\\x3b33m\\\\]\\\\[\\x1b[0m\\\\]\\\\[\\x1b[44\\x3b38\\x3b2\\x3b17\\x3b17\\x3b17m\\\\] \\\\[\\x1b[0m\\\\]\\\\[\\x1b[44\\x3b38\\x3b2\\x3b17\\x3b17\\x3b17m\\\\]\\\\$\\\\[\\x1b[0m\\\\]\\\\[\\x1b[44\\x3b38\\x3b2\\x3b17\\x3b17\\x3b17m\\\\]⇡\\\\[\\x1b[0m\\\\]\\\\[\\x1b[44\\x3b38\\x3b2\\x3b17\\x3b17\\x3b17m\\\\] \\\\[\\x1b[0m\\\\]\\\\[\\x1b[34m\\\\]\\\\[\\x1b[0m\\\\] via \\\\[\\x1b[1\\x3b32m\\\\] \\\\[\\x1b[0m\\\\]\\\\[\\x1b[1\\x3b32m\\\\]v18.17.1\\\\[\\x1b[0m\\\\]\\\\[\\x1b[1\\x3b32m\\\\] \\\\[\\x1b[0m\\\\]\\x0a\\\\[\\x1b[1\\x3b32m\\\\]❯\\\\[\\x1b[0m\\\\] \u0007\u001b]633;A\u0007\r\n\u001b[31m\u001b[0m\u001b[41;38;2;17;17;17mextensions/vscode-api-tests/testWorkspace\u001b[0m\u001b[41m \u001b[0m\u001b[43;31m\u001b[0m\u001b[43;38;2;17;17;17m \u001b[0m\u001b[43;38;2;17;17;17m \u001b[0m\u001b[43;38;2;17;17;17mtyriar/211869\u001b[0m\u001b[43;38;2;17;17;17m \u001b[0m\u001b[44;33m\u001b[0m\u001b[44;38;2;17;17;17m \u001b[0m\u001b[44;38;2;17;17;17m$\u001b[0m\u001b[44;38;2;17;17;17m⇡\u001b[0m\u001b[44;38;2;17;17;17m \u001b[0m\u001b[34m\u001b[0m via \u001b[1;32m \u001b[0m\u001b[1;32mv18.17.1\u001b[0m\u001b[1;32m \u001b[0m\r\n\u001b[1;32m❯\u001b[0m \u001b]633;B\u0007" + }, + { + "type": "promptInputChange", + "data": "|" + }, + { + "type": "input", + "data": "e" + }, + { + "type": "output", + "data": "e" + }, + { + "type": "promptInputChange", + "data": "e|" + }, + { + "type": "input", + "data": "c" + }, + { + "type": "output", + "data": "c" + }, + { + "type": "promptInputChange", + "data": "ec|" + }, + { + "type": "input", + "data": "h" + }, + { + "type": "output", + "data": "h" + }, + { + "type": "promptInputChange", + "data": "ech|" + }, + { + "type": "input", + "data": "o" + }, + { + "type": "output", + "data": "o" + }, + { + "type": "promptInputChange", + "data": "echo|" + }, + { + "type": "input", + "data": " " + }, + { + "type": "output", + "data": " " + }, + { + "type": "promptInputChange", + "data": "echo |" + }, + { + "type": "input", + "data": "\"" + }, + { + "type": "output", + "data": "\"" + }, + { + "type": "promptInputChange", + "data": "echo \"|" + }, + { + "type": "input", + "data": "d" + }, + { + "type": "output", + "data": "d" + }, + { + "type": "promptInputChange", + "data": "echo \"d|" + }, + { + "type": "input", + "data": "\r" + }, + { + "type": "output", + "data": "\r\n\u001b]633;F\u0007\u001b[90m∙\u001b[0m \u001b]633;G\u0007" + }, + { + "type": "promptInputChange", + "data": "echo \"d⏎|" + }, + { + "type": "input", + "data": "e" + }, + { + "type": "output", + "data": "e" + }, + { + "type": "promptInputChange", + "data": "echo \"d⏎e|" + }, + { + "type": "input", + "data": "\r" + }, + { + "type": "output", + "data": "\r\n\u001b]633;F\u0007\u001b[90m∙\u001b[0m \u001b]633;G\u0007" + }, + { + "type": "promptInputChange", + "data": "echo \"d⏎|e⏎" + }, + { + "type": "input", + "data": "f" + }, + { + "type": "output", + "data": "f" + }, + { + "type": "promptInputChange", + "data": "echo \"d⏎e|⏎f" + }, + { + "type": "input", + "data": "\r" + }, + { + "type": "output", + "data": "\r\n\u001b]633;F\u0007\u001b[90m∙\u001b[0m \u001b]633;G\u0007" + }, + { + "type": "promptInputChange", + "data": "echo \"d⏎|e⏎f⏎" + }, + { + "type": "input", + "data": "g" + }, + { + "type": "output", + "data": "g" + }, + { + "type": "promptInputChange", + "data": "echo \"d⏎e|⏎f⏎g" + }, + { + "type": "input", + "data": "\r" + }, + { + "type": "output", + "data": "\r\n\u001b]633;F\u0007\u001b[90m∙\u001b[0m \u001b]633;G\u0007" + }, + { + "type": "promptInputChange", + "data": "echo \"d⏎|e⏎f⏎g⏎" + }, + { + "type": "input", + "data": "h" + }, + { + "type": "output", + "data": "h" + }, + { + "type": "promptInputChange", + "data": "echo \"d⏎e|⏎f⏎g⏎h" + }, + { + "type": "input", + "data": "\"" + }, + { + "type": "output", + "data": "\"" + }, + { + "type": "promptInputChange", + "data": "echo \"d⏎e⏎|f⏎g⏎h\"" + }, + { + "type": "input", + "data": "\r" + }, + { + "type": "output", + "data": "\r\n\u001b]633;E;echo \"d\\x0ae\\x0af\\x0ag\\x0ah\";c7158082-f9ff-43b3-af50-789be32fca2b\u0007\u001b]633;C\u0007" + }, + { + "type": "promptInputChange", + "data": "echo \"d⏎e⏎f⏎g⏎h\"" + }, + { + "type": "output", + "data": "d\r\ne\r\nf\r\ng\r\nh\r\n" + }, + { + "type": "output", + "data": "\u001b]633;D;0\u0007" + }, + { + "type": "output", + "data": "\u001b]633;P;Cwd=/Users/tyriar/dev/microsoft/vscode/extensions/vscode-api-tests/testWorkspace\u0007" + }, + { + "type": "output", + "data": "\u001b]633;P;Prompt=\\x0a\\\\[\\x1b[31m\\\\]\\\\[\\x1b[0m\\\\]\\\\[\\x1b[41\\x3b38\\x3b2\\x3b17\\x3b17\\x3b17m\\\\]extensions/vscode-api-tests/testWorkspace\\\\[\\x1b[0m\\\\]\\\\[\\x1b[41m\\\\] \\\\[\\x1b[0m\\\\]\\\\[\\x1b[43\\x3b31m\\\\]\\\\[\\x1b[0m\\\\]\\\\[\\x1b[43\\x3b38\\x3b2\\x3b17\\x3b17\\x3b17m\\\\] \\\\[\\x1b[0m\\\\]\\\\[\\x1b[43\\x3b38\\x3b2\\x3b17\\x3b17\\x3b17m\\\\] \\\\[\\x1b[0m\\\\]\\\\[\\x1b[43\\x3b38\\x3b2\\x3b17\\x3b17\\x3b17m\\\\]tyriar/211869\\\\[\\x1b[0m\\\\]\\\\[\\x1b[43\\x3b38\\x3b2\\x3b17\\x3b17\\x3b17m\\\\] \\\\[\\x1b[0m\\\\]\\\\[\\x1b[44\\x3b33m\\\\]\\\\[\\x1b[0m\\\\]\\\\[\\x1b[44\\x3b38\\x3b2\\x3b17\\x3b17\\x3b17m\\\\] \\\\[\\x1b[0m\\\\]\\\\[\\x1b[44\\x3b38\\x3b2\\x3b17\\x3b17\\x3b17m\\\\]\\\\$\\\\[\\x1b[0m\\\\]\\\\[\\x1b[44\\x3b38\\x3b2\\x3b17\\x3b17\\x3b17m\\\\]⇡\\\\[\\x1b[0m\\\\]\\\\[\\x1b[44\\x3b38\\x3b2\\x3b17\\x3b17\\x3b17m\\\\] \\\\[\\x1b[0m\\\\]\\\\[\\x1b[34m\\\\]\\\\[\\x1b[0m\\\\] via \\\\[\\x1b[1\\x3b32m\\\\] \\\\[\\x1b[0m\\\\]\\\\[\\x1b[1\\x3b32m\\\\]v18.17.1\\\\[\\x1b[0m\\\\]\\\\[\\x1b[1\\x3b32m\\\\] \\\\[\\x1b[0m\\\\]\\x0a\\\\[\\x1b[1\\x3b32m\\\\]❯\\\\[\\x1b[0m\\\\] \u0007\u001b]633;A\u0007\r\n\u001b[31m\u001b[0m\u001b[41;38;2;17;17;17mextensions/vscode-api-tests/testWorkspace\u001b[0m\u001b[41m \u001b[0m\u001b[43;31m\u001b[0m\u001b[43;38;2;17;17;17m \u001b[0m\u001b[43;38;2;17;17;17m \u001b[0m\u001b[43;38;2;17;17;17mtyriar/211869\u001b[0m\u001b[43;38;2;17;17;17m \u001b[0m\u001b[44;33m\u001b[0m\u001b[44;38;2;17;17;17m \u001b[0m\u001b[44;38;2;17;17;17m$\u001b[0m\u001b[44;38;2;17;17;17m⇡\u001b[0m\u001b[44;38;2;17;17;17m \u001b[0m\u001b[34m\u001b[0m via \u001b[1;32m \u001b[0m\u001b[1;32mv18.17.1\u001b[0m\u001b[1;32m \u001b[0m\r\n\u001b[1;32m❯\u001b[0m \u001b]633;B\u0007" + }, + { + "type": "promptInputChange", + "data": "|" + } +]; diff --git a/src/vs/workbench/contrib/terminalContrib/suggest/test/browser/terminalSuggestAddon.integrationTest.ts b/src/vs/workbench/contrib/terminalContrib/suggest/test/browser/terminalSuggestAddon.integrationTest.ts index 7805b7fba54..073fc39f449 100644 --- a/src/vs/workbench/contrib/terminalContrib/suggest/test/browser/terminalSuggestAddon.integrationTest.ts +++ b/src/vs/workbench/contrib/terminalContrib/suggest/test/browser/terminalSuggestAddon.integrationTest.ts @@ -22,6 +22,7 @@ import type { ITerminalSuggestConfiguration } from 'vs/workbench/contrib/termina import { workbenchInstantiationService } from 'vs/workbench/test/browser/workbenchTestServices'; import { events as macos_bash_echo_simple } from 'vs/workbench/contrib/terminalContrib/suggest/test/browser/recordings/macos_bash_echo_simple'; +import { events as macos_bash_echo_multiline } from 'vs/workbench/contrib/terminalContrib/suggest/test/browser/recordings/macos_bash_echo_multiline'; import { events as windows11_pwsh_getcontent_delete_ghost } from 'vs/workbench/contrib/terminalContrib/suggest/test/browser/recordings/windows11_pwsh_getcontent_delete_ghost'; import { events as windows11_pwsh_getcontent_file } from 'vs/workbench/contrib/terminalContrib/suggest/test/browser/recordings/windows11_pwsh_getcontent_file'; import { events as windows11_pwsh_input_ls_complete_ls } from 'vs/workbench/contrib/terminalContrib/suggest/test/browser/recordings/windows11_pwsh_input_ls_complete_ls'; @@ -29,6 +30,7 @@ import { events as windows11_pwsh_namespace_completion } from 'vs/workbench/cont const recordedTestCases: { name: string; events: RecordedSessionEvent[] }[] = [ { name: 'macos_bash_echo_simple', events: macos_bash_echo_simple as any as RecordedSessionEvent[] }, + { name: 'macos_bash_echo_multiline', events: macos_bash_echo_multiline as any as RecordedSessionEvent[] }, { name: 'windows11_pwsh_getcontent_delete_ghost', events: windows11_pwsh_getcontent_delete_ghost as any as RecordedSessionEvent[] }, { name: 'windows11_pwsh_getcontent_file', events: windows11_pwsh_getcontent_file as any as RecordedSessionEvent[] }, { name: 'windows11_pwsh_input_ls_complete_ls', events: windows11_pwsh_input_ls_complete_ls as any as RecordedSessionEvent[] },