(t *testing.T)
| 15 | ) |
| 16 | |
| 17 | func TestReadDocument(t *testing.T) { |
| 18 | testFile := filepath.Join(os.TempDir(), "TestReadDocument") |
| 19 | err := os.WriteFile(testFile, []byte("hello world"), 0644) |
| 20 | require.NoError(t, err) |
| 21 | |
| 22 | contents, err := ReadDocument(uri.URI(fmt.Sprintf("file:///%v", strings.TrimPrefix(filepath.ToSlash(testFile), "/")))) |
| 23 | require.NoError(t, err) |
| 24 | require.Equal(t, "hello world", string(contents)) |
| 25 | } |
| 26 | |
| 27 | func TestURIfilename(t *testing.T) { |
| 28 | file := filepath.Join(os.TempDir(), "mod") |
nothing calls this directly
no test coverage detected