From 6b3744a8bdf45348f4184a22cf086e772d8c520a Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 20 Mar 2016 19:14:20 +0000 Subject: [PATCH] Added unit tests for the GetMIME function. --- source/tests/xestiaab_common.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/tests/xestiaab_common.h b/source/tests/xestiaab_common.h index 3dafa80..8d60863 100644 --- a/source/tests/xestiaab_common.h +++ b/source/tests/xestiaab_common.h @@ -19,6 +19,7 @@ #include #include "../common/dirs.h" #include "../common/filename.h" +#include "../common/mime.h" TEST(CommonFunctions, GetUserDir){ @@ -224,4 +225,11 @@ TEST(CommonFunctions, CreateFilenamePath){ #endif +} + +TEST(CommonFunctions, GetMIME){ + + ASSERT_EQ("text/plain", GetMIME("TextMIMEExample.txt")); + ASSERT_EQ("image/png", GetMIME("PictureMIMEExample.png")); + } \ No newline at end of file -- 2.39.5