Skip to content

Commit

Permalink
test: Demonstrate leaking of display for cram test
Browse files Browse the repository at this point in the history
<!-- ps-id: bca52dae-c074-4edc-8022-073c2c7b551d -->

Signed-off-by: Ali Caglayan <alizter@gmail.com>
  • Loading branch information
Alizter committed Feb 5, 2023
1 parent 9381573 commit 78a248a
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions test/blackbox-tests/test-cases/cram/git-diff-fail.t
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]

0 comments on commit 78a248a

Please sign in to comment.