aboutsummaryrefslogtreecommitdiffhomepage
path: root/source/content_directory_test.go
diff options
context:
space:
mode:
authorChristoph Burgdorf <[email protected]>2014-04-14 23:25:54 +0200
committerspf13 <[email protected]>2014-04-26 23:17:54 -0600
commitf271faea066c47817c8a9a62ef5509a151452d6a (patch)
tree7cc9b65bc37abd021d04a77020dd7896099e97d4 /source/content_directory_test.go
parent5581e33a34ce852594ba03c3c7f0c067062d1358 (diff)
downloadhugo-f271faea066c47817c8a9a62ef5509a151452d6a.tar.gz
hugo-f271faea066c47817c8a9a62ef5509a151452d6a.zip
Don't process dotfiles
This commit makes it so that not only files but also folders which start with a dot are ignored. Fixes #239
Diffstat (limited to 'source/content_directory_test.go')
-rw-r--r--source/content_directory_test.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/content_directory_test.go b/source/content_directory_test.go
index d8ed8128a..aab3410bb 100644
--- a/source/content_directory_test.go
+++ b/source/content_directory_test.go
@@ -4,11 +4,13 @@ import (
"testing"
)
-func TestIgnoreDotFiles(t *testing.T) {
+func TestIgnoreDotFilesAndDirectories(t *testing.T) {
tests := []struct {
path string
ignore bool
}{
+ {".foobar/", true },
+ {"foobar/.barfoo/", true },
{"barfoo.md", false},
{"foobar/barfoo.md", false},
{"foobar/.barfoo.md", true},
@@ -22,7 +24,7 @@ func TestIgnoreDotFiles(t *testing.T) {
}
for _, test := range tests {
- if ignored := ignoreDotFile(test.path); test.ignore != ignored {
+ if ignored := isNonProcessablePath(test.path); test.ignore != ignored {
t.Errorf("File not ignored. Expected: %t, got: %t", test.ignore, ignored)
}
}