Skip to main content
Glama
emicklei

melrōse musical expression player

by emicklei
complete_test.go1.2 kB
package cli import ( "testing" "github.com/emicklei/melrose/dsl" ) func TestCompleteMe(t *testing.T) { t.Skip() globalStore := dsl.NewVariableStore() defer func() { globalStore.Delete("aart") }() globalStore.Put("aart", "?") for i, each := range []struct { line string pos int head string firstcomplete string tail string }{ { "se", 0, "", "", "se", }, { "", 0, "", "", "", }, { "a = seq", 7, "a = seq", "uence('')", "", }, { "a = seq[eqs]", 4, "a = ", "", "seq[eqs]", }, { "seq", 3, "seq", "uence('')", "", }, { "a", 1, "a", "art", "", }, } { head, c, tail := completeMe(each.line, each.pos) if got, want := head, each.head; got != want { t.Errorf("%d: got [head=%v] want [%v]", i, got, want) } firstcomplete := "" if len(c) > 0 { firstcomplete = c[0] } if got, want := firstcomplete, each.firstcomplete; got != want { t.Errorf("%d: got [firstcomplete=%v] want [%v]", i, got, want) } if got, want := tail, each.tail; got != want { t.Errorf("%d: got [tail=%v] want [%v]", i, got, want) } } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/emicklei/melrose'

If you have feedback or need assistance with the MCP directory API, please join our Discord server