MCPcopy Create free account
hub / github.com/GoMudEngine/GoMud / TestPluginFiles_Open_Found

Function TestPluginFiles_Open_Found

internal/plugins/plugins_test.go:132–143  ·  view source on GitHub ↗

--------------------------------------------------------------------------- PluginFiles.Open ---------------------------------------------------------------------------

(t *testing.T)

Source from the content-addressed store, hash-verified

130// ---------------------------------------------------------------------------
131
132func TestPluginFiles_Open_Found(t *testing.T) {
133 p := newTestPlugin(t)
134
135 f, err := p.files.Open("items/test-sword.yaml")
136 require.NoError(t, err)
137 defer f.Close()
138
139 info, err := f.Stat()
140 require.NoError(t, err)
141 assert.Equal(t, "test-sword.yaml", info.Name())
142 assert.False(t, info.IsDir())
143}
144
145func TestPluginFiles_Open_NotFound(t *testing.T) {
146 p := newTestPlugin(t)

Callers

nothing calls this directly

Calls 5

newTestPluginFunction · 0.85
CloseMethod · 0.65
OpenMethod · 0.45
StatMethod · 0.45
NameMethod · 0.45

Tested by

no test coverage detected