-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
This is related to:
Consider the following tests:
htmltest/htmldoc/document_store_test.go
Lines 9 to 30 in 19cc89c
| func TestDocumentStoreDiscover(t *testing.T) { | |
| // documentstore can scan an os directory | |
| dS := NewDocumentStore() | |
| dS.BasePath = "fixtures/documents" | |
| dS.DocumentExtension = ".html" // Ignores .htm | |
| dS.DirectoryIndex = "index.html" | |
| dS.Discover() | |
| // Fixtures dir has eight documents in various folders | |
| assert.Equals(t, "document count", len(dS.Documents), 6) | |
| } | |
| func TestDocumentStoreIgnorePatterns(t *testing.T) { | |
| // documentstore can scan an os directory | |
| dS := NewDocumentStore() | |
| dS.BasePath = "fixtures/documents" | |
| dS.DocumentExtension = ".html" // Ignores .htm | |
| dS.DirectoryIndex = "index.html" | |
| dS.IgnorePatterns = []interface{}{"^lib/"} | |
| dS.Discover() | |
| // Fixtures dir has seven documents in various folders, (one ignored in lib) | |
| assert.Equals(t, "document count", len(dS.Documents), 6) | |
| } |
Note, in particular, the following two situations where the comments and code don't match:
htmltest/htmldoc/document_store_test.go
Lines 16 to 17 in 19cc89c
// Fixtures dir has eight documents in various folders assert.Equals(t, "document count", len(dS.Documents), 6) htmltest/htmldoc/document_store_test.go
Lines 28 to 29 in 19cc89c
// Fixtures dir has seven documents in various folders, (one ignored in lib) assert.Equals(t, "document count", len(dS.Documents), 6)
The issue runs a deeper that just incorrect comments because the notion of document count has changed since the following fix has landed:
/assign @chalin
Metadata
Metadata
Assignees
Labels
No labels