]> git.ipfire.org Git - thirdparty/zlib-ng.git/commit
Introduce ZLIBNG_ENABLE_TESTS
authorIlya Leoshkevich <iii@linux.ibm.com>
Tue, 27 Sep 2022 22:50:36 +0000 (00:50 +0200)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Tue, 1 Nov 2022 12:25:19 +0000 (13:25 +0100)
commite63f36b1cf615a81e2cfa2d97fc54a5f493c9c19
tree7341603ae3a3a1488fed6b5f8406e31a12b8cae5
parentf127bc96fc57d05f2cda19406cfc506cf5256e26
Introduce ZLIBNG_ENABLE_TESTS

This patch adds the ability to run zlib-ng test suite against the
original zlib as follows:

    cmake -DZLIB_COMPAT=ON -DZLIBNG_ENABLE_TESTS=OFF .
    make
    LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu make test

The benefit of this is that modifications to the original zlib can be
tested with a more extensive zlib-ng's testsuite, and the assumptions
that the zlib-ng tests make can be validated against the original zlib.

In addition to a number of tests that exercise purely zlib-ng specific
API, there are a few that expect zlib-ng specific behavior from the
original zlib API:

- deflate() (obviously) emits different streams
- zlib-ng's deflatePrime() can take more than 16 bits
- zVersion() returns a different string

Adjust or disable the respective tests for ZLIBNG_ENABLE_TESTS=OFF.
CMakeLists.txt
README.md
test/CMakeLists.txt
test/example.c
test/test_deflate_prime.cc
test/test_shared.h
test/test_shared_ng.h [new file with mode: 0644]