MCPcopy
hub / github.com/kopia/kopia / TestLocalFilesystemPath

Function TestLocalFilesystemPath

fs/localfs/local_fs_test.go:251–273  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

249}
250
251func TestLocalFilesystemPath(t *testing.T) {
252 if isWindows {
253 t.Skip()
254 }
255
256 testDir := testutil.TempDirectory(t)
257
258 cases := map[string]string{
259 "/": "/",
260 testDir: testDir,
261 testDir + "/": testDir,
262 }
263
264 for input, want := range cases {
265 ent, err := NewEntry(input)
266 require.NoError(t, err)
267
268 dir, ok := ent.(fs.Directory)
269 require.True(t, ok, input)
270
271 require.Equal(t, want, dir.LocalFilesystemPath())
272 }
273}
274
275func TestSplitDirPrefix(t *testing.T) {
276 type pair struct {

Callers

nothing calls this directly

Calls 4

TempDirectoryFunction · 0.92
NewEntryFunction · 0.85
EqualMethod · 0.80
LocalFilesystemPathMethod · 0.65

Tested by

no test coverage detected