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)
| 1866 | // It replaces each canonical path separately instead of using the |
| 1867 | // session name to allow for subdirs in the extended-char-paths case. |
| 1868 | func (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 | |
| 1879 | func (b *bisyncTest) mkdir(dir string) { |
| 1880 | require.NoError(b.t, os.MkdirAll(dir, os.ModePerm)) |
no test coverage detected