ultimatepp/autotest/PPTest/PPTest.cpp
cxl 6ff842f4a3 .autotest
git-svn-id: svn://ultimatepp.org/upp/trunk@14653 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2020-07-03 11:53:47 +00:00

32 lines
583 B
C++

#include <Core/Core.h>
#include <CppBase/CppBase.h>
#include <CppBase/Internal.h>
using namespace Upp;
CONSOLE_APP_MAIN
{
StdLogSetup(LOG_FILE|LOG_COUT);
String path = GetDataFile("test.in");
PPSync(GetFileFolder(path));
Cpp cpp;
FileIn in(path);
cpp.Preprocess(path, in, path);
String s = cpp.output;
String opath = GetDataFile("test.out");
SaveFile("/home/cxl/outs", s);
LOG("======================");
LOG(s);
#ifdef flagSAVE
SaveFile(opath, s);
#else
ASSERT(LoadFile(opath) == s);
#endif
LOG("===================== OK");
}