44 lines
1000 B
C++
44 lines
1000 B
C++
/**
|
|
* @author Edouard DUPIN
|
|
* @copyright 2017, Edouard DUPIN, all right reserved
|
|
* @license MPL-2 (see license file)
|
|
*/
|
|
#include <estyle/estyle.hpp>
|
|
#include <estyle/Generator.hpp>
|
|
#include <etk/etk.hpp>
|
|
#include <etk/os/FSNode.hpp>
|
|
#include <test-debug/debug.hpp>
|
|
#include <etest/etest.hpp>
|
|
|
|
|
|
int main(int _argc, const char** _argv) {
|
|
// the only one init for etk:
|
|
etest::init(_argc, _argv);
|
|
for (int32_t iii=1; iii<_argc ; ++iii) {
|
|
etk::String data = _argv[iii];
|
|
if ( data == "-h"
|
|
|| data == "--help") {
|
|
ETEST_PRINT("Help : ");
|
|
ETEST_PRINT(" ./xxx [options]");
|
|
ETEST_PRINT(" File to test");
|
|
ETEST_PRINT(" -h/--help: this help");
|
|
exit(0);
|
|
}
|
|
}
|
|
return RUN_ALL_TESTS();
|
|
}
|
|
|
|
TEST(testParsingJS, test018) {
|
|
estyle::Generator interface;
|
|
|
|
|
|
etk::String source = "/* simple comment */\nint32_t hello = \"plouf \\n\";\n";
|
|
etk::String output = interface.process(source);
|
|
|
|
TEST_INFO("source:\n" << source);
|
|
TEST_INFO("output:\n" << output);
|
|
|
|
}
|
|
|
|
|