mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 22:02:49 -06:00
29 lines
487 B
C++
29 lines
487 B
C++
#include <Core/Core.h>
|
|
|
|
using namespace Upp;
|
|
|
|
CONSOLE_APP_MAIN
|
|
{
|
|
StdLogSetup(LOG_COUT|LOG_FILE);
|
|
|
|
String fn = GetHomeDirFile("test.txt");
|
|
{
|
|
FileOut out(fn);
|
|
for(int i = 0; i < 10000; i++)
|
|
out.Put('0');
|
|
out.Put("test");
|
|
}
|
|
{
|
|
FileIn in(fn);
|
|
ASSERT(in.Skip(10000) == 10000);
|
|
ASSERT(in.Get(1000) == "test");
|
|
ASSERT(in.Skip(10) == 0);
|
|
}
|
|
{
|
|
FileIn in(fn);
|
|
ASSERT(in.Skip(20000) == 10004);
|
|
}
|
|
|
|
FileDelete(fn);
|
|
LOG("============= OK");
|
|
}
|