summaryrefslogtreecommitdiffhomepage
path: root/tpl
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2017-07-08 10:34:42 +0200
committerBjørn Erik Pedersen <[email protected]>2017-07-08 10:34:42 +0200
commite0cf2e05bbdcb8b4a3f875df84a878f4ca80e904 (patch)
tree4a95c78901970e5f1979a02361412ba6338e1f3a /tpl
parentdbbc5c4810a04ac06fad7500d88cf5c3bfe0c7fd (diff)
downloadhugo-e0cf2e05bbdcb8b4a3f875df84a878f4ca80e904.tar.gz
hugo-e0cf2e05bbdcb8b4a3f875df84a878f4ca80e904.zip
tpl/collections: Add some empty slice tests to intersect
See #3686
Diffstat (limited to 'tpl')
-rw-r--r--tpl/collections/collections_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/tpl/collections/collections_test.go b/tpl/collections/collections_test.go
index 239affad1..c82d3c3bb 100644
--- a/tpl/collections/collections_test.go
+++ b/tpl/collections/collections_test.go
@@ -344,6 +344,10 @@ func TestIntersect(t *testing.T) {
{pagesVals{p1v, p4v, p2v, p3v}, pagesVals{p1v, p3v, p3v}, pagesVals{p1v, p3v}},
{[]interface{}{p1, p4, p2, p3}, []interface{}{p4, p2, p2}, []interface{}{p4, p2}},
{[]interface{}{p1v, p4v, p2v, p3v}, []interface{}{p1v, p3v, p3v}, []interface{}{p1v, p3v}},
+ {pagesPtr{p1, p4, p2, p3}, pagesPtr{}, pagesPtr{}},
+ {pagesVals{}, pagesVals{p1v, p3v, p3v}, pagesVals{}},
+ {[]interface{}{p1, p4, p2, p3}, []interface{}{}, []interface{}{}},
+ {[]interface{}{}, []interface{}{p1v, p3v, p3v}, []interface{}{}},
} {
errMsg := fmt.Sprintf("[%d]", test)