gleam: Add runnable tests (#11476)

This PR adds basic runnable tests for Gleam.

Functions with names ending in `_test` will be available for running:


https://github.com/zed-industries/zed/assets/1486634/9f3f81e5-a7fa-425c-a5a2-d615062486bb

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-05-06 22:26:36 -04:00 committed by GitHub
parent 843d299d9a
commit 4eca7875ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,6 @@
; Functions with names ending in `_test`.
; This matches the standalone test style used by Startest and Gleeunit.
(
(function name: (_) @run
(#match? @run ".*_test$"))
) @gleam-test

View File

@ -0,0 +1,8 @@
[
{
"label": "gleam test $ZED_SYMBOL",
"command": "gleam",
"args": ["test", "--", "--test-name-filter=$ZED_SYMBOL"],
"tags": ["gleam-test"]
}
]