mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-12 06:12:46 -06:00
.autotest
git-svn-id: svn://ultimatepp.org/upp/trunk@7919 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
f6f6b38fa4
commit
e36c866ac3
4 changed files with 63 additions and 6 deletions
|
|
@ -4,12 +4,15 @@ using namespace Upp;
|
|||
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
StdLogSetup(LOG_COUT|LOG_FILE);
|
||||
|
||||
String s = Sys("svn info svn://www.ultimatepp.org/bak");
|
||||
DUMP(s);
|
||||
int q = s.Find("Last Changed Date: ");
|
||||
LOG("SVN info:");
|
||||
LOG(s);
|
||||
String key = "Last Changed Date: ";
|
||||
int q = s.Find(key);
|
||||
ASSERT(q >= 0);
|
||||
s = s.Mid(q);
|
||||
DUMP(s);
|
||||
s = s.Mid(q + key.GetCount());
|
||||
ASSERT(s.GetCount() > 18);
|
||||
Date d;
|
||||
// 2014-10-30 01:01:56
|
||||
|
|
@ -17,6 +20,18 @@ CONSOLE_APP_MAIN
|
|||
d.year = atoi(s);
|
||||
d.month = atoi(~s + 5);
|
||||
d.day = atoi(~s + 8);
|
||||
DUMP(d);
|
||||
LOG("Bak repository last date: " << d);
|
||||
ASSERT(d >= GetSysDate() - 1);
|
||||
}
|
||||
|
||||
FindFile ff("/mnt/nas/bak/*.*");
|
||||
d = Date::Low();
|
||||
|
||||
while(ff) {
|
||||
d = max(d, (Date)Time(ff.GetLastWriteTime()));
|
||||
ff.Next();
|
||||
}
|
||||
|
||||
LOG("mnt/nas/bak last date: " << d);
|
||||
|
||||
ASSERT(d >= GetSysDate() - 1);
|
||||
}
|
||||
|
|
|
|||
29
autotest/CheckDownloads/CheckDownloads.cpp
Normal file
29
autotest/CheckDownloads/CheckDownloads.cpp
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#include <Core/Core.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
Date d;
|
||||
String downloads = HttpRequest("http://www.ultimatepp.org/www$uppweb$nightly$en-us.html").Execute();
|
||||
int q = downloads.Find("<a href=\"downloads/upp-x11-src-");
|
||||
ASSERT(q > 0);
|
||||
q = downloads.ReverseFind(">", q - 1);
|
||||
ASSERT(q > 0);
|
||||
|
||||
CParser p(~downloads + q + 1);
|
||||
|
||||
try {
|
||||
d.month = p.ReadInt();
|
||||
p.PassChar('/');
|
||||
d.day = p.ReadInt();
|
||||
p.PassChar('/');
|
||||
d.year = p.ReadInt();
|
||||
}
|
||||
catch(...) {
|
||||
NEVER();
|
||||
}
|
||||
|
||||
LOG("downloads last date: " << d);
|
||||
ASSERT(d >= GetSysDate() - 1);
|
||||
}
|
||||
9
autotest/CheckDownloads/CheckDownloads.upp
Normal file
9
autotest/CheckDownloads/CheckDownloads.upp
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
uses
|
||||
Core;
|
||||
|
||||
file
|
||||
CheckDownloads.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "SSE2";
|
||||
|
||||
4
autotest/CheckDownloads/init
Normal file
4
autotest/CheckDownloads/init
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#ifndef _CheckDownloads_icpp_init_stub
|
||||
#define _CheckDownloads_icpp_init_stub
|
||||
#include "Core/init"
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue