diff --git a/upptst/INI/INI.cpp b/upptst/INI/INI.cpp new file mode 100644 index 000000000..4f21d33d2 --- /dev/null +++ b/upptst/INI/INI.cpp @@ -0,0 +1,30 @@ +#include + +using namespace Upp; + +namespace Config { + +INI_STRING(text, "default text", "Text parameter"); + +}; + +struct Test { + int x; + String a; +}; + +Test y = { 123, "123" }; + +CONSOLE_APP_MAIN +{ + StdLogSetup(LOG_COUT|LOG_FILE); + + SetIniFile(GetDataFile("test.ini")); + + for(;;) { + LOG(Config::text); + LOG(GetIniInfoFormatted()); + getchar(); + SetIniFile(GetDataFile("test.ini")); + } +} diff --git a/upptst/INI/INI.upp b/upptst/INI/INI.upp new file mode 100644 index 000000000..9b2a30748 --- /dev/null +++ b/upptst/INI/INI.upp @@ -0,0 +1,10 @@ +uses + Core; + +file + test.ini, + INI.cpp; + +mainconfig + "" = "SSE2"; + diff --git a/upptst/INI/init b/upptst/INI/init new file mode 100644 index 000000000..2cedd1e6d --- /dev/null +++ b/upptst/INI/init @@ -0,0 +1,4 @@ +#ifndef _INI_icpp_init_stub +#define _INI_icpp_init_stub +#include "Core/init" +#endif diff --git a/upptst/INI/test.ini b/upptst/INI/test.ini new file mode 100644 index 000000000..79c54b5a2 --- /dev/null +++ b/upptst/INI/test.ini @@ -0,0 +1 @@ +text = Just a test \ No newline at end of file