test(daemon): pin the sqlite3 prompt in the exec-replaced shell repro (#34468)

sqlite3 3.54+ (macOS 27) prints a styled, versioned prompt instead of
`sqlite> `, so the #13767 repro tests timed out waiting for it. Start
sqlite3 with `-cmd ".prompt 'sqlite> '"` so the prompt is deterministic
on every sqlite3 version.

Fixes #27052

Co-authored-by: outof-place <contact@outofplace.space>
This commit is contained in:
Neil
2026-10-27 09:54:19 -07:00
committed by GitHub
co-authored by outof-place
parent 5a0bf8ae6e
commit b01bbb29c8
@@ -372,10 +372,15 @@ zle -N zle-line-init
)
const sqliteTest = hasZsh && existsSync('/usr/bin/sqlite3') ? it : it.skip
// sqlite3 3.54+ defaults to a styled, versioned prompt instead of `sqlite> `.
const sqlitePinnedPrompt = `-cmd ".prompt 'sqlite> '"`
sqliteTest(
'does not treat an exec-replaced readline program as the shell prompt',
async () => {
const running = await startFixture(zshFixture, 'exec /usr/bin/sqlite3\n')
const running = await startFixture(
zshFixture,
`exec /usr/bin/sqlite3 ${sqlitePinnedPrompt}\n`
)
try {
await waitForOutput(running.subscribe, () => running.output().includes('sqlite> '))
await new Promise((resolve) => setTimeout(resolve, 300))
@@ -393,7 +398,7 @@ zle -N zle-line-init
async () => {
const running = await startFixture(
zshFixture,
'ln -s /usr/bin/sqlite3 "$HOME/zsh" && exec "$HOME/zsh"\n'
`ln -s /usr/bin/sqlite3 "$HOME/zsh" && exec "$HOME/zsh" ${sqlitePinnedPrompt}\n`
)
try {
await waitForOutput(running.subscribe, () => running.output().includes('sqlite> '))