Skip to content

Commit

Permalink
Additional tests using 1-elt sum/record
Browse files Browse the repository at this point in the history
  • Loading branch information
xvw committed Apr 9, 2024
1 parent 9f38a32 commit 615014e
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions tests/test-dirs/destruct/destruct-fun.t
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,55 @@ FIXME UPGRADE 5.2: this was working before the upgrade
],
"notifications": []
}

$ cat >fun.ml <<EOF
> type t = { foo: int }
> let f a (b: t) c = something
> EOF

$ $MERLIN single case-analysis -start 2:10 -end 2:10 \
> -filename fun.ml <fun.ml | \
> sed -e 's/, /,/g' | sed -e 's/ *| */|/g' | tr -d '\n' | jq '.'
{
"class": "return",
"value": [
{
"start": {
"line": 2,
"col": 9
},
"end": {
"line": 2,
"col": 10
}
},
"{ foo }"
],
"notifications": []
}

$ cat >fun.ml <<EOF
> type t = Foo
> let f a (b: t) c = something
> EOF

$ $MERLIN single case-analysis -start 2:10 -end 2:10 \
> -filename fun.ml <fun.ml | \
> sed -e 's/, /,/g' | sed -e 's/ *| */|/g' | tr -d '\n' | jq '.'
{
"class": "return",
"value": [
{
"start": {
"line": 2,
"col": 9
},
"end": {
"line": 2,
"col": 10
}
},
"Foo"
],
"notifications": []
}

0 comments on commit 615014e

Please sign in to comment.