Unfortunately the previous solution was too naive and misidentified
some errors.
In essence, passing regex-source couldn't work, because those could
not match any other line, so we have to inject regex-matching into the
SequenceMatcher.
Through awful hackery, this is possible.
Updates littlecheck to 0f6841bbc1674e89f512b5f19d1ad4e0227d2934.
This is the start of an effort to make it easier to build and run tests in
various Linux environments. The idea is to reduce our reliance on CI and
also allow an easy to way capture tricky environments like musl or gcc 5.
This adds two initial Dockerfiles corresponding to Ubuntu Bionic, and
Ubuntu Bionic with Thread Sanitizer enabled. It also adds a new script
`docker/docker_run_tests.sh`. An example of usage:
docker/docker_run_tests.sh docker/bionic-tsan.Dockerfile
When run, this builds a Docker image (which is cached after the first
build) and sets its entry point to a new script `fish_run_tests.sh`. It
then launches a container with that image, with a directory `/fish-source`
bound to the fish-shell source directory on the host. Note it is a bind
mount, not a copy, so changes to host files are instantly visible inside
the container. It then configures with CMake and runs the tests.
The Docker user is `fishuser` with password `fish`.
The script also supports two arguments `--shell-before` and
`--shell-after`. These drop the user into a bash shell before (or after)
the tests are run, to aid in debugging.
Note there's no automation for invoking this script yet; it must be run
manually. But it runs on both Mac and Linux!
Previously this parameter was used to more-eagerly restore the terminal
mode. This was the basis for #2214. However now we restore the mode
from the reader instead, so we can remove this unused parameter.
Prior to this fix, when key binding is a script command (i.e. not a
readline command), fish would run that key binding using fish's shell
tty modes. Switch to using the external tty modes. This re-fixes
issue #2214.
With the upcoming fix to place the tty in external-proc mode, add a sleep
which resolves a race between emitting a newline and restoring it to shell
mode.
Prior to this change, when a process resumes because it is brought back
to the foreground, we would reset the terminal attributes to shell mode.
This fixed#2114 but subtly introduced #7483.
This backs out 9fd9f70346, re-introducing #2114 and re-fixing #7483.
A followup fix will re-fix #2114; these are broken out separately for
bisecting purposes.
Fixes#7483.
Prior to this change, for bindings which have script commands, the
inputter would execute them directly. However an upcoming fix for #7483
will require more integration with the reader. Switch to a new model where
the reader passes in a function to use for executing script commands.
This allows us to write the changelog reasonably simply.
The biggest downside is that pandoc won't be able to handle it anymore
when converting to markdown, but
sphinx-markdown-builder (https://github.com/codejamninja/sphinx-markdown-builder)
should be able to handle it.
This lets littlecheck "diff" the given output with the checks, leading
to easier to understand errors.
E.g. changing some random lines in andandoror.fish yields error output
like:
```
Testing file checks/andandoror.fish ... Failure:
The CHECK on line 36 wants:
if test 4 ok
which failed to match line stdout:9:
if test 3 ok
Context:
[...] from line 17 (stdout:6):
true && false || true: 0
if test 1 ok
if test 2 ok
if test 3 ok <= no check matches this, previous check on line 35
if test 4 ok
0 0 0
1 1 1
2 2 2
3 3 3 <= does not match CHECK '3 5 3' on line 55
4 4 4
0
1
[...] from line 126 (stdout:33):
0
0
0
<= nothing to match CHECK 'banana' on line 135
when running command:
../test/root/bin/fish checks/andandoror.fish
```
This updates littlecheck to b9c24a3.
Use the `-d` parameter to `zfs list` to limit snapshots to the dataset
named in the current token being completed. Thanks to @Debilski for the
tip.
Closes#7472
This was using "/usr/local/bin/fish" for no good reason - 1. fish
might not be installed, 2. fish might not be installed *there*.
Just use /bin/sh in this case, if that doesn't exist we have bigger
problems, and this is just a simple wrapper for a command call.
[ci skip]