Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'hugofs/glob/glob_test.go')
-rw-r--r--hugofs/glob/glob_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/hugofs/glob/glob_test.go b/hugofs/glob/glob_test.go
index cca8e4e0f..5a6ef5b7e 100644
--- a/hugofs/glob/glob_test.go
+++ b/hugofs/glob/glob_test.go
@@ -73,5 +73,14 @@ func TestGetGlob(t *testing.T) {
g, err := GetGlob("**.JSON")
c.Assert(err, qt.IsNil)
c.Assert(g.Match("data/my.json"), qt.Equals, true)
+}
+
+func BenchmarkGetGlob(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ _, err := GetGlob("**/foo")
+ if err != nil {
+ b.Fatal(err)
+ }
+ }
}