MCPcopy
hub / github.com/rclone/rclone / toGolden

Method toGolden

cmd/bisync/bisync_test.go:1868–1877  ·  view source on GitHub ↗

toGolden makes a result file name golden. It replaces each canonical path separately instead of using the session name to allow for subdirs in the extended-char-paths case.

(name string)

Source from the content-addressed store, hash-verified

1866// It replaces each canonical path separately instead of using the
1867// session name to allow for subdirs in the extended-char-paths case.
1868func (b *bisyncTest) toGolden(name string) string {
1869 name = strings.ReplaceAll(name, b.canonPath1, goldenCanonBase)
1870 name = strings.ReplaceAll(name, b.canonPath2, goldenCanonBase)
1871 name = strings.TrimSuffix(name, ".sav")
1872
1873 // normalize unicode so tets are runnable on macOS
1874 name = norm.NFC.String(name)
1875
1876 return name
1877}
1878
1879func (b *bisyncTest) mkdir(dir string) {
1880 require.NoError(b.t, os.MkdirAll(dir, os.ModePerm))

Callers 3

saveTestListingsMethod · 0.95
compareResultsMethod · 0.95
storeGoldenMethod · 0.95

Calls 1

StringMethod · 0.65

Tested by

no test coverage detected