File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
test/blackbox-tests/test-cases/cram Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ Test that cram tests with unreachable commands can still partially promote
2+ output from commands that executed successfully.
3+
4+ $ cat > dune-project << EOF
5+ > (lang dune 3.21 )
6+ > EOF
7+
8+ Create a test with some successful commands, then an exit , then unreachable
9+ commands:
10+
11+ $ cat > test. t << EOF
12+ > $ echo " First command"
13+ > $ echo " Second command"
14+ > $ exit 1
15+ > $ echo " This will never execute"
16+ > $ echo " Neither will this"
17+ > EOF
18+
19+ The test should fail but still capture output from executed commands:
20+ $ dune runtest
21+ File " test.t" , line 1 , characters 0 -0:
22+ Error: Files _build/ default / test. t and _build/ default / test. t. corrected
23+ differ.
24+ [1 ]
25+ $ dune promote
26+ Promoting _build/ default / test. t. corrected to test. t.
27+
28+ After promotion, the test file should have output from successful commands and
29+ UNREACHABLE markers for the rest:
30+ $ cat test. t
31+ $ echo " First command"
32+ First command
33+ $ echo " Second command"
34+ Second command
35+ $ exit 1
36+ **** * UNREACHABLE **** *
37+ $ echo " This will never execute"
38+ **** * UNREACHABLE **** *
39+ $ echo " Neither will this"
40+ **** * UNREACHABLE **** *
41+
You can’t perform that action at this time.
0 commit comments