From 887250540fc606523960824fac50b533e8e6cda0 Mon Sep 17 00:00:00 2001 From: xvw Date: Thu, 24 Oct 2024 14:36:01 +0200 Subject: [PATCH] Add `search-by-type` comparison --- tests/test-dirs/search/issue1113.t | 54 ++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/tests/test-dirs/search/issue1113.t b/tests/test-dirs/search/issue1113.t index 88cc81f5e..2c87dcd63 100644 --- a/tests/test-dirs/search/issue1113.t +++ b/tests/test-dirs/search/issue1113.t @@ -45,3 +45,57 @@ "name": "__LOC__", "desc": "string" } + + $ $MERLIN single search-by-type -filename ./main.ml \ + > -position 5:25 -limit 10 -query "ezfnifzen -> ezfzef" | + > tr '\n' ' ' | jq '.value[] | {name,type,cost}' + { + "name": "Gc.major", + "type": "unit -> unit", + "cost": 13 + } + { + "name": "Gc.minor", + "type": "unit -> unit", + "cost": 13 + } + { + "name": "Sys.time", + "type": "unit -> float", + "cost": 13 + } + { + "name": "read_int", + "type": "unit -> int", + "cost": 13 + } + { + "name": "read_int", + "type": "unit -> int", + "cost": 13 + } + { + "name": "flush_all", + "type": "unit -> unit", + "cost": 13 + } + { + "name": "flush_all", + "type": "unit -> unit", + "cost": 13 + } + { + "name": "read_line", + "type": "unit -> string", + "cost": 13 + } + { + "name": "read_line", + "type": "unit -> string", + "cost": 13 + } + { + "name": "Bytes.copy", + "type": "bytes -> bytes", + "cost": 13 + }