ultimatepp/autotest/FileExtMIME/FileExtMIME.cpp
cxl 5680547c63 .upptst
git-svn-id: svn://ultimatepp.org/upp/trunk@7198 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2014-04-09 08:04:01 +00:00

18 lines
387 B
C++

#include <Core/Core.h>
using namespace Upp;
CONSOLE_APP_MAIN
{
StdLogSetup(LOG_COUT|LOG_FILE);
const Index<String>& h = GetMIMETypes();
for(int i = 0; i < h.GetCount(); i++) {
String ext = MIMEToFileExt(h[i]);
String m2 = FileExtToMIME(ext);
LOG(h[i] << " -> " << ext << ", " << ext << " -> " << m2);
ASSERT(h[i] == m2);
}
LOG("============== OK");
}