File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 1+ #include < odr/exceptions.hpp>
12#include < odr/odr.hpp>
23
4+ #include < odr/internal/project_info.hpp>
5+
36#include < test_util.hpp>
47
58#include < gtest/gtest.h>
@@ -20,6 +23,9 @@ TEST(odr, types_odt) {
2023 EXPECT_EQ (types.size (), 2 );
2124 EXPECT_EQ (types[0 ], FileType::zip);
2225 EXPECT_EQ (types[1 ], FileType::opendocument_text);
26+
27+ const auto mime = mimetype (path, *logger);
28+ EXPECT_EQ (mime, " application/vnd.oasis.opendocument.text" );
2329}
2430
2531TEST (odr, types_wpd) {
@@ -30,4 +36,11 @@ TEST(odr, types_wpd) {
3036 const auto types = list_file_types (path, *logger);
3137 EXPECT_EQ (types.size (), 1 );
3238 EXPECT_EQ (types[0 ], FileType::word_perfect);
39+
40+ if (project_info::has_libmagic ()) {
41+ const auto mime = mimetype (path, *logger);
42+ EXPECT_EQ (mime, " application/vnd.wordperfect" );
43+ } else {
44+ EXPECT_THROW (auto mime = mimetype (path, *logger), UnsupportedFileType);
45+ }
3346}
You can’t perform that action at this time.
0 commit comments