Skip to content

Commit

Permalink
fix(cram): add missing location to error (ocaml#10167)
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
  • Loading branch information
rgrinberg committed Feb 29, 2024
1 parent 9e92ed0 commit 98c576e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/dune_rules/cram/cram_rules.ml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ let missing_run_t (error : Cram_test.t) =
| Dir { dir; file = _ } -> dir
in
User_error.raise
~loc:(Loc.in_dir (Path.source dir))
[ Pp.textf
"Cram test directory %s does not contain a run.t file."
(Path.Source.to_string dir)
Expand Down
2 changes: 1 addition & 1 deletion test/blackbox-tests/test-cases/cram/kinds.t
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ If there is no run.t file, an error message is displayed.
$ mkdir -p dir-no-run/dir.t
$ echo "Contents of file a" > dir-no-run/dir.t/a
$ dune runtest dir-no-run
File "dir-no-run/dir.t", line 1, characters 0-0:
Error: Cram test directory dir-no-run/dir.t does not contain a run.t file.
-> required by alias dir-no-run/runtest
[1]
However, if the directory is empty, this check is skipped. (git can leave such
Expand Down

0 comments on commit 98c576e

Please sign in to comment.