diff --git a/test/blackbox-tests/test-cases/test-build-if/feature.t b/test/blackbox-tests/test-cases/test-build-if/feature.t index bebb097ef550..4a73702132ec 100644 --- a/test/blackbox-tests/test-cases/test-build-if/feature.t +++ b/test/blackbox-tests/test-cases/test-build-if/feature.t @@ -1,5 +1,5 @@ $ cat > dune-project << EOF - > (lang dune 3.8) + > (lang dune 3.9) > EOF The fields evaluates to true then var=true is passed. @@ -15,20 +15,6 @@ The fields evaluates to true then var=true is passed. > broken > EOF -Version check: this only works on 3.9+. - - $ dune build - File "dune", line 3, characters 1-30: - 3 | (build_if %{env:BUILD=false}) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Error: 'build_if' is only available since version 3.9 of the dune language. - Please update your dune-project file to have (lang dune 3.9). - [1] - - $ cat > dune-project << EOF - > (lang dune 3.9) - > EOF - The build is attempted only when the enabled_if clause evaluates to true. $ dune build diff --git a/test/blackbox-tests/test-cases/test-build-if/version.t b/test/blackbox-tests/test-cases/test-build-if/version.t new file mode 100644 index 000000000000..e5abbbd9d47c --- /dev/null +++ b/test/blackbox-tests/test-cases/test-build-if/version.t @@ -0,0 +1,25 @@ + $ cat > dune-project << EOF + > (lang dune 3.8) + > EOF + + $ cat > dune << EOF + > (test + > (name t) + > (build_if true)) + > EOF + + $ touch t.ml + + $ dune build + File "dune", line 3, characters 1-16: + 3 | (build_if true)) + ^^^^^^^^^^^^^^^ + Error: 'build_if' is only available since version 3.9 of the dune language. + Please update your dune-project file to have (lang dune 3.9). + [1] + + $ cat > dune-project << EOF + > (lang dune 3.9) + > EOF + + $ dune build