mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
fix: replace echo -e with printf in terminal tests
Replace echo -e with printf command in terminal tests for better portability. - Replace echo -e with printf to ensure consistent behavior across different shell implementations - Not all implementations of echo support the -e flag for interpreting backslash escapes - Using printf provides a more reliable way to handle escape sequences Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
This commit is contained in:
parent
e24e5b24d4
commit
0e41241faa
1 changed files with 3 additions and 3 deletions
|
|
@ -225,10 +225,10 @@ describe("TerminalProcess with Real Command Output", () => {
|
|||
)
|
||||
})
|
||||
|
||||
it("should execute 'echo -e \"a\\nb\"' and return 'a\\nb\\n'", async () => {
|
||||
const { executionTimeUs } = await testTerminalCommand('echo -e "a\\nb"', "a\nb\n")
|
||||
it("should execute 'printf \"a\\nb\\n\"' and return 'a\\nb\\n'", async () => {
|
||||
const { executionTimeUs } = await testTerminalCommand('printf "a\\nb\\n"', "a\nb\n")
|
||||
console.log(
|
||||
`'echo -e "a\\nb"' execution time: ${executionTimeUs} microseconds (${executionTimeUs / 1000} milliseconds)`,
|
||||
`'printf "a\\nb\\n"' execution time: ${executionTimeUs} microseconds (${executionTimeUs / 1000} milliseconds)`,
|
||||
)
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue