]> git.kaiwu.me - njs.git/commit
Tests: tighten shell test checks
authorDmitry Volyntsev <xeioex@nginx.com>
Tue, 29 Sep 2026 01:31:09 +0000 (18:31 -0700)
committerDmitry Volyntsev <xeioexception@gmail.com>
Tue, 29 Sep 2026 18:57:53 +0000 (11:57 -0700)
commite9b1747f26cfdf2bd9b3e09bc5aba0f46e602ac3
tree6e5e688e67637d5b10522c3751503a59e503db65
parent353c202022f3d149218e53d09567cdb7c01fdf6a
Tests: tighten shell test checks

Previously, Expect treated timeouts as successful matches, and EOF
passed even if the REPL exited abnormally.  Some checks could match
the input echo alone, while completion checks required a bell that
varies between libedit versions.

The fix is to fail on timeouts, premature EOF, and abnormal exit;
check the result and prompt for Unicode input and guard against a
repeated promise rejection.  Send Unicode as ASCII escapes to work
around libedit 3.1.snap20150325-2.12 on SLES 15 SP7, which reports
a character count where the readline callback expects a byte count.
test/shell_test.exp
test/shell_test_njs.exp