-
Notifications
You must be signed in to change notification settings - Fork 395
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Demonstrate leaking of display for cram test
<!-- ps-id: bca52dae-c074-4edc-8022-073c2c7b551d --> Signed-off-by: Ali Caglayan <alizter@gmail.com>
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
We demonstrate the leaking of the display of internal processes when running | ||
cram tests. | ||
|
||
First we make a cram test: | ||
|
||
$ cat > dune-project << EOF | ||
> (lang dune 3.7) | ||
> EOF | ||
$ cat > mytest.t << EOF | ||
> $ echo A | ||
> B | ||
> EOF | ||
We need to avoid the special treatment of the test when INSIDE_DUNE is set: | ||
$ unset INSIDE_DUNE | ||
We get nonsense internal output in the display: | ||
$ dune build --root=. --diff-command="exit 123" --display=short @runtest 2>&1 >/dev/null | head -n2 | ||
File "mytest.t", line 1, characters 0-0: | ||
sh (internal) (exit 1) | ||
The rest of this message will look like this: | ||
/nix/store/4xw8n979xpivdc46a9ndcvyhwgif00hz-bash-5.1-p16/bin/sh: line 1: exit: too many arguments | ||
[1] |