zstd icon indicating copy to clipboard operation
zstd copied to clipboard

Issue #3070

Open GeoffMStaceyWrk opened this issue 3 years ago • 0 comments

Fix for https://github.com/facebook/zstd/issues/3070

Notes: In cases where the inputs are not well formed in terms of suffix (or non numerical prefix) the program will warn and use a default value.

As default this can be found very simply by checking for a null value, but there was an edge case on testing where the "zstd=" command doesn't use white space (which means we need to check both /0 and ',' as well). This does mean that inputs such as "--memory=3,000KB" won't work. This is assumed satisfactory.

There is a potential follow up task here where very small values are allowed since they follow a valid syntax - ie "--memory=15", but if there is a minimum we need, that may be useful to warn the user about, and clamp input in that way.

Have added more tests to the playTests script, which checks for a warning and that we reset default behavior on poorly formed input, but that we don't warn for valid input.

Testing: Have verified that the #3070 issue is indeed fixed, and that the above added tests pass now, but did not in the earlier dev branch.

GeoffMStaceyWrk avatar Jul 25 '22 14:07 GeoffMStaceyWrk