summaryrefslogtreecommitdiff
path: root/test/mock_pkg_resource.erl
diff options
context:
space:
mode:
authoralisdair sullivan <alisdairsullivan@yahoo.ca>2016-10-13 12:46:03 -0700
committerGitHub <noreply@github.com>2016-10-13 12:46:03 -0700
commit13185b00364ac98061c2999074910afd3d204efd (patch)
treeebd4bc809c31688a891da78615582a049c0cc14c /test/mock_pkg_resource.erl
parent24a43accbde52690e7b6be8fcb9e3db07326ec68 (diff)
parent1f86ed1aed990438103c5f668c4ec930ab637fc9 (diff)
Merge pull request #1337 from ferd/support-aliasing
Properly support package aliasing and alt names
Diffstat (limited to 'test/mock_pkg_resource.erl')
-rw-r--r--test/mock_pkg_resource.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/mock_pkg_resource.erl b/test/mock_pkg_resource.erl
index f837713..5769988 100644
--- a/test/mock_pkg_resource.erl
+++ b/test/mock_pkg_resource.erl
@@ -149,7 +149,10 @@ to_index(AllDeps, Dict) ->
ets:new(package_index, [named_table, public]),
dict:fold(
fun(K, Deps, _) ->
- DepsList = [{ec_cnv:to_binary(DK), ec_cnv:to_binary(DV)} || {DK, DV} <- Deps],
+ DepsList = [{DKB, {pkg, DKB, DVB, undefined}}
+ || {DK, DV} <- Deps,
+ DKB <- [ec_cnv:to_binary(DK)],
+ DVB <- [ec_cnv:to_binary(DV)]],
ets:insert(package_index, {K, DepsList, <<"checksum">>})
end, ok, Dict),
ets:insert(package_index, {package_index_version, 3}),