diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-05-26 10:12:19 +0300 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-05-26 10:42:45 +0300 |
commit | 612f6e3afe0510c31f70f3621f3dc8ba609dade4 (patch) | |
tree | 82d5587cb8057038a8bde05d7f27cff3c212f1d6 /hugolib/page_collections_test.go | |
parent | 50d11138f3e18b545c15fadf52f7b0b744bf3e7c (diff) |
hugolib: Fix ref/relref issue with duplicate base filenames
This commit also makes that function 80x faster.
Fixes #2507
Diffstat (limited to 'hugolib/page_collections_test.go')
-rw-r--r-- | hugolib/page_collections_test.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/hugolib/page_collections_test.go b/hugolib/page_collections_test.go index acf2597d4..4c7575c3f 100644 --- a/hugolib/page_collections_test.go +++ b/hugolib/page_collections_test.go @@ -110,6 +110,9 @@ func TestGetPage(t *testing.T) { } } + content := fmt.Sprintf(pageCollectionsPageTemplate, "UniqueBase") + writeSource(t, fs, filepath.Join("content", "sect3", "unique.md"), content) + s := buildSingleSite(t, deps.DepsCfg{Fs: fs, Cfg: cfg}, BuildCfg{SkipRender: true}) tests := []struct { @@ -122,7 +125,8 @@ func TestGetPage(t *testing.T) { {KindPage, []string{"sect3", "page1.md"}, "Title3_1"}, {KindPage, []string{"sect4/page2.md"}, "Title4_2"}, {KindPage, []string{filepath.FromSlash("sect5/page3.md")}, "Title5_3"}, - // TODO(bep) section maybe support sect5/page2, aka relref. + // Ref/Relref supports this potentially ambiguous lookup. + {KindPage, []string{"unique.md"}, "UniqueBase"}, } for i, test := range tests { |