|
|
@@ -3,6 +3,8 @@
|
|
|
import { Terminal } from "../Terminal"
|
|
|
import { TerminalRegistry } from "../TerminalRegistry"
|
|
|
|
|
|
+const PAGER = process.platform === "win32" ? "" : "cat"
|
|
|
+
|
|
|
// Mock vscode.window.createTerminal
|
|
|
const mockCreateTerminal = jest.fn()
|
|
|
|
|
|
@@ -29,7 +31,7 @@ describe("TerminalRegistry", () => {
|
|
|
})
|
|
|
|
|
|
describe("createTerminal", () => {
|
|
|
- it("creates terminal with PAGER set to cat", () => {
|
|
|
+ it("creates terminal with PAGER set appropriately for platform", () => {
|
|
|
TerminalRegistry.createTerminal("/test/path", "vscode")
|
|
|
|
|
|
expect(mockCreateTerminal).toHaveBeenCalledWith({
|
|
|
@@ -37,7 +39,7 @@ describe("TerminalRegistry", () => {
|
|
|
name: "Roo Code",
|
|
|
iconPath: expect.any(Object),
|
|
|
env: {
|
|
|
- PAGER: "cat",
|
|
|
+ PAGER,
|
|
|
VTE_VERSION: "0",
|
|
|
PROMPT_EOL_MARK: "",
|
|
|
},
|
|
|
@@ -57,7 +59,7 @@ describe("TerminalRegistry", () => {
|
|
|
name: "Roo Code",
|
|
|
iconPath: expect.any(Object),
|
|
|
env: {
|
|
|
- PAGER: "cat",
|
|
|
+ PAGER,
|
|
|
PROMPT_COMMAND: "sleep 0.05",
|
|
|
VTE_VERSION: "0",
|
|
|
PROMPT_EOL_MARK: "",
|
|
|
@@ -79,7 +81,7 @@ describe("TerminalRegistry", () => {
|
|
|
name: "Roo Code",
|
|
|
iconPath: expect.any(Object),
|
|
|
env: {
|
|
|
- PAGER: "cat",
|
|
|
+ PAGER,
|
|
|
VTE_VERSION: "0",
|
|
|
PROMPT_EOL_MARK: "",
|
|
|
ITERM_SHELL_INTEGRATION_INSTALLED: "Yes",
|
|
|
@@ -100,7 +102,7 @@ describe("TerminalRegistry", () => {
|
|
|
name: "Roo Code",
|
|
|
iconPath: expect.any(Object),
|
|
|
env: {
|
|
|
- PAGER: "cat",
|
|
|
+ PAGER,
|
|
|
VTE_VERSION: "0",
|
|
|
PROMPT_EOL_MARK: "",
|
|
|
POWERLEVEL9K_TERM_SHELL_INTEGRATION: "true",
|