diff --git a/autotest/UppHub/UppHub.cpp b/autotest/UppHub/UppHub.cpp new file mode 100644 index 000000000..7f48fa241 --- /dev/null +++ b/autotest/UppHub/UppHub.cpp @@ -0,0 +1,25 @@ +#include + +using namespace Upp; + +CONSOLE_APP_MAIN +{ + HttpRequest r("https://raw.githubusercontent.com/ultimatepp/UppHub/main/README.md"); + + String s = r.Execute(); + + int begin = s.FindAfter("UPPHUB_BEGIN"); + int end = s.Find("UPPHUB_END"); + + if(begin >= 0 && end >= 0) + s = s.Mid(begin, end - begin); + + Value v = ParseJSON(s); + if(v.IsError()) { + s.Replace(""", "\""); + s.Replace("&", "&"); + v = ParseJSON(s); + } + + ASSERT(!v.IsError()); +} diff --git a/autotest/UppHub/UppHub.upp b/autotest/UppHub/UppHub.upp new file mode 100644 index 000000000..63f0e462b --- /dev/null +++ b/autotest/UppHub/UppHub.upp @@ -0,0 +1,10 @@ +uses + Core, + Core/SSL; + +file + UppHub.cpp; + +mainconfig + "" = ""; +