I am currently doing:
- Test function allowing zip file / directory. It is claimed that it exists.
- Using
:zip.tand :zip.tt, let it list the contents of the zip folder to see what I expect.
Somehow I think something is missing. Is it better to test with :zip.table? The function looks confusing. Can someone give an example of use? Below is an example of the output I received, but I can’t figure out how to do this in a test? Is md5sum the best test for zip archives?
iex(4)> :zip.table('testing.zip')
{:ok,
[{:zip_comment, []},
{:zip_file, 'mix.exs',
{:file_info, 930, :regular, :read_write, {{2015, 7, 15}, {2, 11, 9}},
{{2015, 7, 15}, {2, 11, 9}}, {{2015, 7, 15}, {2, 11, 9}}, 54, 1, 0, 0, 0, 0,
0}, [], 0, 444},
{:zip_file, 'mix.lock',
{:file_info, 332, :regular, :read_write, {{2015, 7, 15}, {2, 9, 6}},
{{2015, 7, 15}, {2, 9, 6}}, {{2015, 7, 15}, {2, 9, 6}}, 54, 1, 0, 0, 0, 0,
0}, [], 481, 152}]}