From 1ec600b52ebbb62a1f47785723f8def856638ec6 Mon Sep 17 00:00:00 2001 From: rr- Date: Fri, 4 Sep 2015 22:47:52 +0200 Subject: [PATCH] tests: test AliceSoft's ALD archive --- tests/fmt/alice_soft/ald_archive_test.cc | 22 ++++++++++++++++++++++ tests/fmt/alice_soft/files/ald/test.ald | Bin 0 -> 570 bytes 2 files changed, 22 insertions(+) create mode 100644 tests/fmt/alice_soft/ald_archive_test.cc create mode 100644 tests/fmt/alice_soft/files/ald/test.ald diff --git a/tests/fmt/alice_soft/ald_archive_test.cc b/tests/fmt/alice_soft/ald_archive_test.cc new file mode 100644 index 000000000..d9b1e2a7b --- /dev/null +++ b/tests/fmt/alice_soft/ald_archive_test.cc @@ -0,0 +1,22 @@ +#include "fmt/alice_soft/ald_archive.h" +#include "test_support/archive_support.h" +#include "test_support/catch.hh" +#include "test_support/file_support.h" + +using namespace au; +using namespace au::fmt::alice_soft; + +TEST_CASE("Unpacking AliceSoft's ALD archives works") +{ + std::vector> expected_files + { + tests::stub_file("123.txt", "1234567890"_b), + tests::stub_file("abc.txt", "abcdefghijklmnopqrstuvwxyz"_b), + }; + + AldArchive archive; + auto actual_files = au::tests::unpack_to_memory( + "tests/fmt/alice_soft/files/ald/test.ald", archive); + + au::tests::compare_files(expected_files, actual_files, true); +} diff --git a/tests/fmt/alice_soft/files/ald/test.ald b/tests/fmt/alice_soft/files/ald/test.ald new file mode 100644 index 0000000000000000000000000000000000000000..e1b18c8550ad006368c3b0fe4dd7af735d2fcd40 GIT binary patch literal 570 zcmZQ%U|?imU}69PuTVelk%kq3{^mmRyP=V>UP(m>Py_;id=pbMa|=s@;TbjxKyOL` mF)ZE_laf*V59Ft$rln_OW@YE(=H(X@78RG2mX%jjRsjGwY@*fx literal 0 HcmV?d00001