diff --git a/tests/test-dirs/occurrences/issue1410.t b/tests/test-dirs/occurrences/issue1410.t index 14948be952..65e4e27ad5 100644 --- a/tests/test-dirs/occurrences/issue1410.t +++ b/tests/test-dirs/occurrences/issue1410.t @@ -1,11 +1,22 @@ -FIXME: No result is returned, we could expect the one occurrence of None. +No result is returned, we could expect the one occurrence of None. $ $MERLIN single occurrences -identifier-at 3:3 -filename opt.ml < jq '.value' > (* test case *) > let f ?(x=1) () = 2 ;; > None > EOF - [] + [ + { + "start": { + "line": 3, + "col": 0 + }, + "end": { + "line": 3, + "col": 4 + } + } + ] $ $MERLIN single occurrences -identifier-at 3:3 -filename opt.ml < jq '.value' @@ -13,4 +24,15 @@ FIXME: No result is returned, we could expect the one occurrence of None. > let f () = 2 ;; > None > EOF - [] + [ + { + "start": { + "line": 3, + "col": 0 + }, + "end": { + "line": 3, + "col": 4 + } + } + ] diff --git a/tests/test-dirs/occurrences/no-ml.t b/tests/test-dirs/occurrences/no-ml.t new file mode 100644 index 0000000000..f133ca2ea0 --- /dev/null +++ b/tests/test-dirs/occurrences/no-ml.t @@ -0,0 +1,54 @@ + $ cat >oui_ml.ml <<'EOF' + > type t = int + > EOF + + $ cat >no_ml.mli <<'EOF' + > include module type of Oui_ml + > EOF + + $ cat >main.ml <<'EOF' + > let (x : No_ml.t) = 42 + > open No_ml + > let (y : t) = 43 + > EOF + + $ $OCAMLC -bin-annot -c oui_ml.ml no_ml.mli + + $ $MERLIN single occurrences -scope project -identifier-at 1:15 \ + > -filename main.ml -filename main.ml local.ml <<'EOF' + > type t = int + > let x : int = 42 + > EOF + +Predef: + $ $MERLIN single occurrences -identifier-at 2:9 \ + > -filename local.ml local.ml <<'EOF' + > let _ = None + > let None = None + > EOF + + $ $MERLIN single occurrences -identifier-at 1:10 \ + > -filename local.ml local.ml <<'EOF' + > let _ = true + > let _ = true + > EOF + + $ $MERLIN single occurrences -identifier-at 1:10 \ + > -filename local.ml local.ml <<'EOF' + > let _ = () + > let f () = () + > EOF + + $ $MERLIN single occurrences -identifier-at 1:9 \ + > -filename local.ml