~andyc/oil

8fbfdc18acbe248a98fa77ea34fbc2ba25f6cdea — Andy Chu a month ago aa0915e
[spec/prompt] Relax test for Github Actions build and OSH

For some reason _deps/spec-bin/bash on Github Actions give this error:

bash: cannot set terminal process group (1134): Inappropriate ioctl for
device
bash: no job control in this shell
$ echo foo
$ exit

The test didn't pass under OSH so it's not really worth it to make
precise
2 files changed, 9 insertions(+), 9 deletions(-)

M spec/prompt.test.sh
M test/spec.sh
M spec/prompt.test.sh => spec/prompt.test.sh +8 -8
@@ 1,14 1,14 @@

#### sh -i
# This fails because OSH prompt goes to stdout, and other differences. It's
# probably OK to be honest.
echo 'echo foo' | PS1='$ ' $SH --rcfile /dev/null -i
# Notes:
# - OSH prompt goes to stdout and bash goes to stderr
# - This test seems to fail on the system bash, but succeeds with
# _deps/spec-bin/bash
echo 'echo foo' | PS1='[prompt] ' $SH --rcfile /dev/null -i >out.txt 2>err.txt
fgrep -q '[prompt]' out.txt err.txt
echo status=$?
## STDOUT:
foo
## END
## STDERR:
$ echo foo
$ exit
status=0
## END

#### \[\] are non-printing

M test/spec.sh => test/spec.sh +1 -1
@@ 291,7 291,7 @@ interactive() {
}

prompt() {
  sh-spec spec/prompt.test.sh --osh-failures-allowed 1 \
  sh-spec spec/prompt.test.sh --osh-failures-allowed 0 \
    $BASH $OSH_LIST "$@"
}