Skip to content

Commit

Permalink
tests: Refine test cases for BenchmarkTaxonomiesGetTerms
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed Jun 19, 2024
1 parent 478a910 commit b7089ee
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions hugolib/taxonomy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -986,19 +986,8 @@ GetTerms.tags: {{ range .GetTerms "tags" }}{{ .Title }}|{{ end }}
-- content/_index.md --
`

tagsVariants := []string{
"tags: ['a']",
"tags: ['a', 'b']",
"tags: ['a', 'b', 'c']",
"tags: ['a', 'b', 'c', 'd']",
"tags: ['a', 'b', 'd', 'e']",
"tags: ['a', 'b', 'c', 'd', 'e']",
"tags: ['a', 'd']",
"tags: ['a', 'f']",
}

for i := 1; i < numPages; i++ {
tags := tagsVariants[i%len(tagsVariants)]
tags := fmt.Sprintf("tags: ['a', 'b%d', 'c%d']", i+1, i+1)
files += fmt.Sprintf("\n-- content/posts/p%d.md --\n---\n%s\n---", i+1, tags)
}
cfg := IntegrationTestConfig{
Expand Down

0 comments on commit b7089ee

Please sign in to comment.