Skip to content

Commit

Permalink
[test][regression] Add no source size with dictionary test
Browse files Browse the repository at this point in the history
* Add a test that runs without a pledgedSrcSize and with a dictionary.
* Add github.tar data with uses the github dictionary while compressing
  github.tar, instead of each file individually.
  • Loading branch information
terrelln committed Jan 4, 2021
1 parent bc0a1e4 commit 4fd14d3
Show file tree
Hide file tree
Showing 3 changed files with 318 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/regression/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ static config_t no_pledged_src_size = {
.no_pledged_src_size = 1,
};

static config_t no_pledged_src_size_with_dict = {
.name = "no source size with dict",
.cli_args = "",
.param_values = PARAM_VALUES(level_0_param_values),
.no_pledged_src_size = 1,
.use_dictionary = 1,
};

static param_value_t const ldm_param_values[] = {
{.param = ZSTD_c_enableLongDistanceMatching, .value = 1},
};
Expand Down Expand Up @@ -192,6 +200,7 @@ static config_t const* g_configs[] = {
#undef FAST_LEVEL

&no_pledged_src_size,
&no_pledged_src_size_with_dict,
&ldm,
&mt,
&mt_ldm,
Expand Down
17 changes: 17 additions & 0 deletions tests/regression/data.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,27 @@ data_t github = {
},
};

data_t github_tar = {
.name = "github.tar",
.type = data_type_file,
.data =
{
.url = REGRESSION_RELEASE("github.tar.zst"),
.xxhash64 = 0xa9b1b44b020df292LL,
},
.dict =
{
.url = REGRESSION_RELEASE("github.dict.zst"),
.xxhash64 = 0x1eddc6f737d3cb53LL,

},
};

static data_t* g_data[] = {
&silesia,
&silesia_tar,
&github,
&github_tar,
NULL,
};

Expand Down
Loading

0 comments on commit 4fd14d3

Please sign in to comment.