mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-06-22 22:04:01 -06:00
.autotest
git-svn-id: svn://ultimatepp.org/upp/trunk@15715 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
ac0919a5b1
commit
e9701ea15a
2 changed files with 35 additions and 0 deletions
25
autotest/UppHub/UppHub.cpp
Normal file
25
autotest/UppHub/UppHub.cpp
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#include <Core/Core.h>
|
||||
|
||||
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());
|
||||
}
|
||||
10
autotest/UppHub/UppHub.upp
Normal file
10
autotest/UppHub/UppHub.upp
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
uses
|
||||
Core,
|
||||
Core/SSL;
|
||||
|
||||
file
|
||||
UppHub.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "";
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue