| 171 | } |
| 172 | |
| 173 | func TestFilesUnloadNoFileLoader(t *testing.T) { |
| 174 | expected := "no `FileLoader` associated with this extension:" |
| 175 | if err := Files.Unload("test.wrongExtension"); err == nil { |
| 176 | t.Error("did not report error unloading without an associated file loader") |
| 177 | } else if !strings.HasPrefix(err.Error(), expected) { |
| 178 | t.Errorf("wrong error returned unloading without an associated file loader. want: %v, got: %v", expected, err.Error()) |
| 179 | } |
| 180 | } |
| 181 | |
| 182 | func TestFilesResource(t *testing.T) { |
| 183 | Files.Register(".test", &testLoader{}) |