summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests.erl8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests.erl b/tests.erl
index ce891be..60b5227 100644
--- a/tests.erl
+++ b/tests.erl
@@ -34,9 +34,15 @@ test_enc_list3() ->
{string, "xyz"}]})).
%% Dict encoding tests
-test_enc_dict() ->
+test_enc_dict1() ->
Dict = dict:from_list([{"age", {int, 25}}, {"eyes", {string, "blue"}}]),
?match("d3:agei25e4:eyes4:bluee", bencode:bencode({dict, Dict})).
+test_enc_dict2() ->
+ Dict = dict:from_list([{age, {int, 25}}, {eyes, {string, "blue"}}]),
+ ?match("d3:agei25e4:eyes4:bluee", bencode:bencode({dict, Dict})).
+test_enc_dict3() ->
+ Dict = dict:from_list([{{string, "age"}, {int, 25}}, {{string, "eyes"}, {string, "blue"}}]),
+ ?match("d3:agei25e4:eyes4:bluee", bencode:bencode({dict, Dict})).
%% Integer decoding tests