Skip to content

Commit

Permalink
simplify test cases
Browse files Browse the repository at this point in the history
Signed-off-by: teague hansen <thanse23@asu.edu>
  • Loading branch information
H-ANSEN committed Sep 24, 2024
1 parent 855c730 commit cb97cef
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions test/blackbox-tests/test-cases/config/config-version.t
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,27 @@ exists in the config.
Please update your dune config file to have (lang dune 2.0).
[1]

Swap out the invaild stanza for another and try again.
Update the dune configuration with a version that would support the
'(cache enabled)' stanza and attempt a successful project initialization.

$ sed -i -e '$s/.*/(cache-check-probability 0.5)/' dune-config
$ dune init proj test --config-file=dune-config
File "$TESTCASE_ROOT/dune-config", line 2, characters 0-29:
2 | (cache-check-probability 0.5)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: 'cache-check-probability' is only available since version 2.7 of the
dune language. Please update your dune config file to have (lang dune 2.7).
[1]

Create a dune configuration with a version that would support the
'(cache enabled)' stanza and attempt and successful project initialization.

$ touch vaild-dune-config
$ cat >vaild-dune-config <<EOF
$ cat >dune-config <<EOF
> (lang dune 2.0)
> (cache enabled)
> EOF

$ dune init proj test_vaild --config-file=vaild-dune-config
$ dune init proj test_vaild --config-file=dune-config
Entering directory 'test_vaild'
Success: initialized project component named test_vaild
Leaving directory 'test_vaild'

Append an invaild stanza to the config file and attempt project initialzation.

$ echo "(cache-check-probability 0.5)" >> dune-config
$ dune init proj test --config-file=dune-config
File "$TESTCASE_ROOT/dune-config", line 3, characters 0-29:
3 | (cache-check-probability 0.5)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: 'cache-check-probability' is only available since version 2.7 of the
dune language. Please update your dune config file to have (lang dune 2.7).
[1]

0 comments on commit cb97cef

Please sign in to comment.