Skip to content

Commit

Permalink
Add a test illustrating issue 1842
Browse files Browse the repository at this point in the history
  • Loading branch information
voodoos committed Dec 13, 2024
1 parent be34518 commit c47b3c5
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions tests/test-dirs/locate/issue1842.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
$ cat >dune-project <<'EOF'
> (lang dune 3.0)
> EOF

$ mkdir real_source

$ cat >real_source/pparse.ml <<'EOF'
> let x = "Hello"
> EOF

$ mkdir source

$ cat >source/main.ml <<'EOF'
> let () = print_endline Pparse.x
> EOF

$ cat >source/dune <<'EOF'
> (rule (copy# ../real_source/pparse.ml pparse.ml))
> (executable (name main))
> EOF


$ dune build @check
$ dune exec ./source/main.exe
Hello

$ $MERLIN single locate -look-for ml -position 1:30 \
> -filename source/main.ml <source/main.ml
{
"class": "return",
"value": "'Dune__exe.Pparse.x' seems to originate from 'Pparse' whose ML file could not be found",
"notifications": []
}

0 comments on commit c47b3c5

Please sign in to comment.