tag : simplify nil handling
This commit is contained in:
parent
bd86e90174
commit
762ced6734
2 changed files with 19 additions and 21 deletions
|
|
@ -89,6 +89,15 @@ func TestBadTag(t *testing.T) {
|
|||
assert.False(t, ok)
|
||||
}
|
||||
|
||||
func TestBadTagOr(t *testing.T) {
|
||||
entries := entriesGlobOrStdin(TEST_PATTERN)
|
||||
tagmap := makeTagmap(entries)
|
||||
queries := parseQuery("flob,bar")
|
||||
fs := processQueries(tagmap, queries)
|
||||
expected := Set{"01.foo.md": true, "02.foo.md": true, "03.bar.md": true}
|
||||
assert.Equal(t, expected, fs)
|
||||
}
|
||||
|
||||
// Since entriesGlobOrStdin() involves filesystem reads, we test the underlying logic.
|
||||
func BenchmarkParseContent(b *testing.B) {
|
||||
e := entriesGlobOrStdin(TEST_PATTERN)[0]
|
||||
|
|
|
|||
Loading…
Reference in a new issue