ultimatepp/autotest/Utf8Format/Utf8Format.cpp
cxl d02fe7d7c7 Creating the *real* autotest nest
git-svn-id: svn://ultimatepp.org/upp/trunk@7141 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2014-04-02 18:36:01 +00:00

70 lines
2.2 KiB
C++

#include <Core/Core.h>
using namespace Upp;
String Sprntf(const char *fmt, ...) {
va_list argptr;
va_start(argptr, fmt);
return VFormat(fmt, argptr);
}
CONSOLE_APP_MAIN
{
DDUMP(String("lubäck").GetCharCount());
DLOG("------------------");
DDUMP(Sprntf("|%s|", "luback"));
DDUMP(Format("|%s|", "lubäck"));
DDUMP(Sprntf("|%40s|", "luback"));
DDUMP(Format("|%40s|", "lubäck"));
DDUMP(Sprntf("|%40s|", "luback"));
DDUMP(Format("|%40s|", "lubäck"));
DDUMP(Sprntf("|%40.40s|", "luback"));
DDUMP(Format("|%40.40s|", "lubäck"));
DDUMP(Sprntf("|%-40.40s|", "luback"));
DDUMP(Format("|%-40.40s|", "lubäck"));
DDUMP(Sprntf("|%40.5s|", "luback"));
DDUMP(Format("|%40.5s|", "lubäck"));
DDUMP(Sprntf("|%-40.5s|", "luback"));
DDUMP(Format("|%-40.5s|", "lubäck"));
DLOG("------------------");
DDUMP(Sprntf("|%5s|", "luback"));
DDUMP(Format("|%5s|", "lubäck"));
DDUMP(Sprntf("|%5s|", "luback"));
DDUMP(Format("|%5s|", "lubäck"));
DDUMP(Sprntf("|%5.5s|", "luback"));
DDUMP(Format("|%5.5s|", "lubäck"));
DDUMP(Sprntf("|%-5.5s|", "luback"));
DDUMP(Format("|%-5.5s|", "lubäck"));
DDUMP(Sprntf("|%.5s|", "luback"));
DDUMP(Format("|%.5s|", "lubäck"));
DDUMP(Sprntf("|%-.5s|", "luback"));
DDUMP(Format("|%-.5s|", "lubäck"));
DLOG("------------------");
DDUMP(Format("|%-40.40s|", "luback"));
DDUMP(Format("|%-40.40s|", "lubäck"));
DDUMP(Format("|%-40.40s|", "luback"));
DDUMP(Format("|%20<s|", "lubäck"));
DDUMP(Format("|%20<s|", "luback"));
DDUMP(Format("|%20=s|", "lubäck"));
DDUMP(Format("|%20=s|", "luback"));
DDUMP(Format("|%20>s|", "lubäck"));
DDUMP(Format("|%20>s|", "luback"));
DLOG("------------------");
DDUMP(Format("|%-4.4s|", "luback"));
DDUMP(Format("|%-4.4s|", "lubäck"));
DDUMP(Format("|%-4.4s|", "luback"));
DDUMP(Format("|%5<s|", "lubäck"));
DDUMP(Format("|%5<s|", "luback"));
DDUMP(Format("|%5=s|", "lubäck"));
DDUMP(Format("|%5=s|", "luback"));
DDUMP(Format("|%5>s|", "lubäck"));
DDUMP(Format("|%5>s|", "luback"));
DLOG("------------------");
DDUMP(Sprintf("%d", 123));
DDUMP(Format("%d", 123));
DLOG("------------------");
SetDefaultCharset(CHARSET_WIN1250);
DDUMP(String("lubäck").GetCharCount());
}