mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-19 21:21:39 +02:00
@@ -56,16 +56,16 @@ func TestWalkRootMappingFs(t *testing.T) {
|
||||
c.Assert(afero.WriteFile(fs, filepath.Join("e/f", testfile), []byte("some content"), 0755), qt.IsNil)
|
||||
|
||||
rm := []RootMapping{
|
||||
RootMapping{
|
||||
{
|
||||
From: "static/b",
|
||||
To: "e/f",
|
||||
},
|
||||
RootMapping{
|
||||
{
|
||||
From: "static/a",
|
||||
To: "c/d",
|
||||
},
|
||||
|
||||
RootMapping{
|
||||
{
|
||||
From: "static/c",
|
||||
To: "a/b",
|
||||
},
|
||||
@@ -79,7 +79,6 @@ func TestWalkRootMappingFs(t *testing.T) {
|
||||
|
||||
c.Assert(err, qt.IsNil)
|
||||
c.Assert(names, qt.DeepEquals, []string{"a/test.txt", "b/test.txt", "c/test.txt"})
|
||||
|
||||
}
|
||||
|
||||
func skipSymlink() bool {
|
||||
@@ -137,7 +136,6 @@ func TestWalkSymbolicLink(t *testing.T) {
|
||||
// Note: the docsreal folder is considered cyclic when walking from the root, but this works.
|
||||
c.Assert(names, qt.DeepEquals, []string{"b.txt", "docsreal/sub/a.txt"})
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
func collectFilenames(fs afero.Fs, base, root string) ([]string, error) {
|
||||
@@ -165,7 +163,6 @@ func collectFilenames(fs afero.Fs, base, root string) ([]string, error) {
|
||||
err := w.Walk()
|
||||
|
||||
return names, err
|
||||
|
||||
}
|
||||
|
||||
func collectFileinfos(fs afero.Fs, base, root string) ([]FileMetaInfo, error) {
|
||||
@@ -186,7 +183,6 @@ func collectFileinfos(fs afero.Fs, base, root string) ([]FileMetaInfo, error) {
|
||||
err := w.Walk()
|
||||
|
||||
return fis, err
|
||||
|
||||
}
|
||||
|
||||
func BenchmarkWalk(b *testing.B) {
|
||||
@@ -234,5 +230,4 @@ func BenchmarkWalk(b *testing.B) {
|
||||
b.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user