diff --git a/upptst/StrToTime/StrToTime.cpp b/upptst/StrToTime/StrToTime.cpp new file mode 100644 index 000000000..3620a60b6 --- /dev/null +++ b/upptst/StrToTime/StrToTime.cpp @@ -0,0 +1,25 @@ +#include + +using namespace Upp; + +void Test(const char *text) +{ + Time tm; + const char *q = StrToTime(tm, text); + if(q) + LOG(text << " -> " << tm << ", follows: " << q); + else + LOG("FAILED: " << text); +} + +CONSOLE_APP_MAIN +{ + SetLanguage(LNG_CZECH); + Test("15.12.2005 23:10:20 hello!"); + Test("15.12.2005 hello!"); + Test("15.12.2005 12:10 foo!"); + Test("15.12.2005 12 foo!"); + Test("15.12.2005 foo!"); + Test("uck!"); +} + diff --git a/upptst/StrToTime/StrToTime.upp b/upptst/StrToTime/StrToTime.upp new file mode 100644 index 000000000..9acb74561 --- /dev/null +++ b/upptst/StrToTime/StrToTime.upp @@ -0,0 +1,11 @@ +description "String to time conversion test\377"; + +uses + Core; + +file + StrToTime.cpp; + +mainconfig + "" = ""; +