Demonstrate that we (wrongly) allow the expected file to be generated by a rule:

  $ cat >dune-project <<EOF
  > (lang dune 3.18)
  > EOF

  $ cat >dune <<EOF
  > (rule (write-file foo.expected "foo bar"))
  > (test
  >  (name foo))
  > EOF

  $ cat >foo.ml <<EOF
  > print_endline "baz";;
  > EOF

  $ dune runtest
  File "foo.expected", line 1, characters 0-0:
  Error: Files _build/default/foo.expected and _build/default/foo.exe.output
  differ.
  [1]

The promotion wasn't registered

  $ dune promotion list

Therefore, we keep re-running the test

  $ dune runtest
  File "foo.expected", line 1, characters 0-0:
  Error: Files _build/default/foo.expected and _build/default/foo.exe.output
  differ.
  [1]
