From efa986887e2c87705946df7f9607c0cc9de752a9 Mon Sep 17 00:00:00 2001 From: Arseniy Alekseyev Date: Fri, 2 Aug 2019 16:11:29 +0100 Subject: [PATCH] Add a test that staging area isn't used for normal [diff] Signed-off-by: Arseniy Alekseyev --- test/blackbox-tests/test-cases/promote/dune | 2 ++ test/blackbox-tests/test-cases/promote/run.t | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/test/blackbox-tests/test-cases/promote/dune b/test/blackbox-tests/test-cases/promote/dune index 212ab534c568..e31de1394fd6 100644 --- a/test/blackbox-tests/test-cases/promote/dune +++ b/test/blackbox-tests/test-cases/promote/dune @@ -4,6 +4,8 @@ (name blah) (action (diff x x.gen))) +(rule (with-stdout-to x.gen.copy (cat x.gen))) + (rule (with-stdout-to y.gen (echo "titi"))) (alias diff --git a/test/blackbox-tests/test-cases/promote/run.t b/test/blackbox-tests/test-cases/promote/run.t index 55e08c83dc93..133b5e6cf596 100644 --- a/test/blackbox-tests/test-cases/promote/run.t +++ b/test/blackbox-tests/test-cases/promote/run.t @@ -19,6 +19,20 @@ General tests $ cat x toto +The correction file stays on the filesystem even after promotion and +can be depended on by other actions. + + $ cat _build/default/x.gen + toto + + $ printf titi > x + $ dune build --display short @blah x.gen.copy + File "x", line 1, characters 0-0: + Error: Files _build/default/x and _build/default/x.gen differ. + [1] + $ cat _build/default/x.gen.copy + toto + Otherwise this test fails on OSX $ dune clean --display short