mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
.autotest
git-svn-id: svn://ultimatepp.org/upp/trunk@11412 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
a9d1212c00
commit
e938af4e83
8 changed files with 3653 additions and 0 deletions
39
autotest/CompresFmt/CompresFmt.cpp
Normal file
39
autotest/CompresFmt/CompresFmt.cpp
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
#include <Core/Core.h>
|
||||
#include <plugin/lzma/lzma.h>
|
||||
#include <plugin/lzma/lzma.h>
|
||||
#include <plugin/lz4/lz4.h>
|
||||
#include <plugin/zstd/zstd.h>
|
||||
#include <plugin/z/z.h>
|
||||
#include <plugin/bz2/bz2.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
void SaveDataFile(const char *fn, const String& data)
|
||||
{
|
||||
SaveFile(GetDataFile(fn), data);
|
||||
}
|
||||
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
StdLogSetup(LOG_COUT|LOG_FILE);
|
||||
|
||||
String data = LoadDataFile("alice30.txt");
|
||||
if(0 && !FileExists(GetDataFile("alice30.gz"))) {
|
||||
LOG("Reference files not found. Press a key to create them");
|
||||
ReadStdIn();
|
||||
|
||||
SaveDataFile("alice30.gz", GZCompress(data));
|
||||
SaveDataFile("alice30.bz2", BZ2Compress(data));
|
||||
SaveDataFile("alice30.lz4", LZ4Compress(data));
|
||||
SaveDataFile("alice30.lzma", LZMACompress(data));
|
||||
SaveDataFile("alice30.zstd", ZstdCompress(data));
|
||||
}
|
||||
|
||||
ASSERT(GZDecompress(LoadDataFile("alice30.gz")) == data);
|
||||
ASSERT(BZ2Decompress(LoadDataFile("alice30.bz2")) == data);
|
||||
ASSERT(LZ4Decompress(LoadDataFile("alice30.lz4")) == data);
|
||||
ASSERT(LZMADecompress(LoadDataFile("alice30.lzma")) == data);
|
||||
ASSERT(ZstdDecompress(LoadDataFile("alice30.zstd")) == data);
|
||||
|
||||
LOG("=================== OK");
|
||||
}
|
||||
15
autotest/CompresFmt/CompresFmt.upp
Normal file
15
autotest/CompresFmt/CompresFmt.upp
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
description "Ensures backwatd compatibility of compression formats\377";
|
||||
|
||||
uses
|
||||
Core,
|
||||
plugin/lzma,
|
||||
plugin/lz4,
|
||||
plugin/zstd,
|
||||
plugin/bz2;
|
||||
|
||||
file
|
||||
CompresFmt.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "";
|
||||
|
||||
BIN
autotest/CompresFmt/alice30.bz2
Normal file
BIN
autotest/CompresFmt/alice30.bz2
Normal file
Binary file not shown.
BIN
autotest/CompresFmt/alice30.gz
Normal file
BIN
autotest/CompresFmt/alice30.gz
Normal file
Binary file not shown.
BIN
autotest/CompresFmt/alice30.lz4
Normal file
BIN
autotest/CompresFmt/alice30.lz4
Normal file
Binary file not shown.
BIN
autotest/CompresFmt/alice30.lzma
Normal file
BIN
autotest/CompresFmt/alice30.lzma
Normal file
Binary file not shown.
3599
autotest/CompresFmt/alice30.txt
Normal file
3599
autotest/CompresFmt/alice30.txt
Normal file
File diff suppressed because it is too large
Load diff
BIN
autotest/CompresFmt/alice30.zstd
Normal file
BIN
autotest/CompresFmt/alice30.zstd
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue