diff --git a/test/blackbox-tests/test-cases/formatting/raw-block-string-pform.t b/test/blackbox-tests/test-cases/formatting/raw-block-string-pform.t new file mode 100644 index 00000000000..b4328907d84 --- /dev/null +++ b/test/blackbox-tests/test-cases/formatting/raw-block-string-pform.t @@ -0,0 +1,29 @@ +Pform-like text in raw block strings should be literal, not expanded. + + $ cat > dune-project << EOF + > (lang dune 3.17) + > EOF + + $ cat > dune << 'EOF' + > (rule + > (alias default) + > (action + > (echo "\> %{name} + > ))) + > EOF + + $ dune build 2>&1 + %{name} + +In escaped block strings, pforms are expanded as usual. + + $ cat > dune << 'EOF' + > (rule + > (alias default) + > (action + > (echo "\| %{project_root} + > ))) + > EOF + + $ dune build 2>&1 + .