mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
e30e1f9651
QRCODE: use stricter interpretation of ZINT_FULL_MULTIBYTE, excluding certain trailing bytes libzint: fix some confusing error messages introduced by segment stuff general: new escape chars \U, \d and \o backend_qt: fudge rendering of border rectangles due to scaling/translation rounding errors TODO: better fudge GUI: foreground/background colours -> text boxes and icon buttons, add swap button, independently movable picker (NULL parent), preview colour changes, preview Data Window changes, add clear data (del) buttons, add zap button and Factory Reset menu option, various other fixes libzint: remove STATIC_UNLESS_ZINT_TEST, use wrappers CMake: add find package QtSvg, remove QtXml manual: split symbology and general specs and sort, move DAFT to 4-state, UPC/EAN -> EAN/UPC, DataBar -> GS1 DataBar always, expand MAILMARK info, various other fiddlings man page: options or -> |, expand MSI Plessey check digit options README.linux: add packages info license: add SPDX-License-Identifier to touched files |
||
---|---|---|
.. | ||
cmake/Modules | ||
data | ||
tools | ||
CMakeLists.txt | ||
README | ||
test_2of5.c | ||
test_auspost.c | ||
test_aztec.c | ||
test_big5_tab.h | ||
test_big5.c | ||
test_bmp.c | ||
test_channel.c | ||
test_codablock.c | ||
test_code1.c | ||
test_code16k.c | ||
test_code49.c | ||
test_code128.c | ||
test_code.c | ||
test_common.c | ||
test_composite.c | ||
test_dmatrix.c | ||
test_dotcode.c | ||
test_eci.c | ||
test_emf.c | ||
test_gb2312_tab.h | ||
test_gb2312.c | ||
test_gb18030_tab.h | ||
test_gb18030.c | ||
test_gbk_tab.h | ||
test_gif.c | ||
test_gridmtx.c | ||
test_gs1.c | ||
test_hanxin.c | ||
test_imail.c | ||
test_iso3166.c | ||
test_iso4217.c | ||
test_ksx1001_tab.h | ||
test_ksx1001.c | ||
test_large.c | ||
test_library.c | ||
test_mailmark.c | ||
test_maxicode.c | ||
test_medical.c | ||
test_output.c | ||
test_pcx.c | ||
test_pdf417.c | ||
test_plessey.c | ||
test_png.c | ||
test_postal.c | ||
test_print.c | ||
test_ps.c | ||
test_qr.c | ||
test_raster.c | ||
test_reedsol.c | ||
test_rss.c | ||
test_sjis_tab.h | ||
test_sjis.c | ||
test_svg.c | ||
test_telepen.c | ||
test_tif.c | ||
test_ultra.c | ||
test_upcean.c | ||
test_vector.c | ||
testcommon.c | ||
testcommon.h |
Zint backend test suite ----------------------- In order to build the zint test suite, zint has to be compiled with the ZINT_TEST option enabled: cd <project-dir> mkdir build cd build cmake -DZINT_TEST=ON .. cmake --build . When using generators that support multiple build configurations, such as Visual C++ Project Files (the default generator on win32), the configuration can be provided via --config: cd <project-dir> mkdir build cd build cmake -DZINT_TEST=ON .. cmake --build . --config Debug ------------------------------------------------------------------------------ In order to run the test suite, the path of the zint library may need to be communicated to the runtime linker. On UNIX-like systems, this is done by exporting LD_LIBRARY_PATH to the path containing the zint library, which is <build-dir>/backend: cd <project-dir> cd build export LD_LIBRARY_PATH=$(pwd)/backend Setting LD_LIBRARY_PATH is not required if the zint library to be tested is installed into a system library path ( /usr/lib for example ) prior to running the tests. To run all tests (within <build-dir>): ctest When using a generator that does support multiple build configurations, the configuration that was used to build the project has to be explicitly provided to ctest, even if it was the default one: ctest -C Debug For various useful options, e.g. matching (-R) and excluding (-E) tests, see https://cmake.org/cmake/help/latest/manual/ctest.1.html#options Tests can also be run individually, eg: backend/tests/test_common backend/tests/test_vector To run a single test function within an individual test, use '-f <func-name>': backend/tests/test_common -f utf8_to_unicode backend/tests/test_dotcode -f input To run a single dataset item in a single test function, use '-i <index>': backend/tests/test_dotcode -f input -i 2 To show debug info (if any), use '-d <flag>': backend/tests/test_dotcode -f input -i 2 -d 1 (for other flags see <project-dir>/backend/tests/testcommon.h) To generate test data, use '-g': backend/tests/test_dotcode -f encode -g To run a test against BWIPP (if any), use '-d 128': backend/tests/test_composite -d 128 (see also <project-dir>/backend/tests/tools/run_bwipp_tests.sh) ------------------------------------------------------------------------------ If the zint library was built with static linkage support, i.e. ZINT_STATIC is ON, an additional test executable, which uses the zint-static library, will be built. The static variant of each test shares the test name, but has a "-static" suffix. For example, backend/tests/test_dotcode would run the dotcode test that uses the shared zint library, while backend/tests/test_dotcode-static runs the same test built against the zint-static library. ------------------------------------------------------------------------------ To make with gcc sanitize, first set for libzint and make: cd <project-dir> cd build cmake -DZINT_SANITIZE=ON .. make && sudo make install Similarly to make with gcc debug: cd <project-dir> cd build cmake -DZINT_DEBUG=ON .. make && sudo make install To undo sanitize/debug, remake each after setting: cmake -DZINT_SANITIZE=OFF .. cmake -DZINT_DEBUG=OFF .. To get a clean libzint, set the above and also: cmake -DZINT_TEST=OFF .. (The tests will now fail to link.)