From 6fb6b0c1f302e8637c96131c9ffc4c4b9f3f5f0f Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 28 Mar 2023 17:49:00 -0400 Subject: chore: restore pty tests and make them run on the Linux CI (#18424) 1. Rewrites the tests to be more back and forth rather than getting the output all at once (which I believe was causing the hangs on linux and maybe mac) 2. Runs the pty tests on the linux ci. 3. Fixes a bunch of tests that were just wrong. 4. Adds timeouts on the pty tests. --- runtime/js/41_prompt.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'runtime/js') diff --git a/runtime/js/41_prompt.js b/runtime/js/41_prompt.js index 137f17dcf..37fdaed77 100644 --- a/runtime/js/41_prompt.js +++ b/runtime/js/41_prompt.js @@ -37,12 +37,15 @@ function prompt(message = "Prompt", defaultValue) { return null; } - core.print(`${message} `, false); - if (defaultValue) { - core.print(`[${defaultValue}] `, false); + message += ` [${defaultValue}]`; } + message += " "; + + // output in one shot to make the tests more reliable + core.print(message, false); + return readLineFromStdinSync() || defaultValue; } -- cgit v1.2.3