File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
test/blackbox-tests/test-cases Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -27,9 +27,12 @@ let explain_unsuccessful_search path ~parent_dir =
2727 (* We search for all files and directories in the parent directory and
2828 suggest them as possible candidates. *)
2929 let + candidates =
30- let + file_candidates =
31- let + files = Source_tree. files_of parent_dir in
32- Path.Source.Set. to_list_map files ~f: Path.Source. to_string
30+ let + cram_candidates =
31+ let + cram_tests = cram_tests_of_dir parent_dir in
32+ List. filter_map cram_tests ~f: (fun res ->
33+ Result. to_option res
34+ |> Option. map ~f: (fun test ->
35+ Source.Cram_test. path test |> Path.Source. to_string))
3336 and + dir_candidates =
3437 let * parent_source_dir = Source_tree. find_dir parent_dir in
3538 match parent_source_dir with
@@ -42,7 +45,7 @@ let explain_unsuccessful_search path ~parent_dir =
4245 >> | Source_tree.Dir. path
4346 >> | Path.Source. to_string)
4447 in
45- List. concat [ file_candidates ; dir_candidates ]
48+ List. concat [ cram_candidates ; dir_candidates ]
4649 in
4750 User_message. did_you_mean (Path.Source. to_string path) ~candidates
4851 in
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ Test the "did you mean" hints for dune runtest command.
1313
1414 $ dune test dip. t
1515 Error: " dip.t" does not match any known test.
16- Hint: did you mean dir_t or dir. t?
16+ Hint: did you mean dir . t or dir. t?
1717 [1 ]
1818
1919 $ dune test other_dip
You can’t perform that action at this time.
0 commit comments