diff options
author | Guilherme Andrade <[email protected]> | 2016-08-20 23:26:07 +0100 |
---|---|---|
committer | Guilherme Andrade <[email protected]> | 2016-08-22 13:28:28 +0100 |
commit | dc322963be1e20c153413fe964a59cffe21971b9 (patch) | |
tree | 54914920184026b9291809be5b1cce0dd8e664e3 /lib | |
parent | 640c988fd41f9709b494554b2e5ef1f06f06957e (diff) | |
download | otp-dc322963be1e20c153413fe964a59cffe21971b9.tar.gz otp-dc322963be1e20c153413fe964a59cffe21971b9.tar.bz2 otp-dc322963be1e20c153413fe964a59cffe21971b9.zip |
Skip inflateGetDictionary test case if unsupported
Diffstat (limited to 'lib')
-rw-r--r-- | lib/kernel/test/zlib_SUITE.erl | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/kernel/test/zlib_SUITE.erl b/lib/kernel/test/zlib_SUITE.erl index 4720a7f5ea..4b67fce9a8 100644 --- a/lib/kernel/test/zlib_SUITE.erl +++ b/lib/kernel/test/zlib_SUITE.erl @@ -290,6 +290,18 @@ api_inflateSetDictionary(Config) when is_list(Config) -> %% Test inflateGetDictionary. api_inflateGetDictionary(Config) when is_list(Config) -> + Z1 = zlib:open(), + IsOperationSupported = + case catch zlib:inflateGetDictionary(Z1) of + {'EXIT',{einval,_}} -> true; + {'EXIT',{enotsup,_}} -> false + end, + _ = zlib:close(Z1), + api_inflateGetDictionary_if_supported(IsOperationSupported). + +api_inflateGetDictionary_if_supported(false) -> + {skip, "inflateGetDictionary/1 unsupported in current setup"}; +api_inflateGetDictionary_if_supported(true) -> % Compress payload using custom dictionary Z1 = zlib:open(), ?m(ok, zlib:deflateInit(Z1)), |