git/t/unit-tests
Patrick Steinhardt c9763684ea t/unit-tests: convert ctype tests to use clar
Convert the ctype tests to use the new clar unit testing framework.
Introduce a new function `cl_failf()` that allows us to print a
formatted error message, which we can use to point out which of the
characters was classified incorrectly. This results in output like this
on failure:

    # start of suite 1: ctype
    not ok 1 - ctype::isspace
        ---
        reason: |
          Test failed.
          0x0d is classified incorrectly: expected 0, got 1
        at:
          file: 't/unit-tests/ctype.c'
          line: 36
          function: 'test_ctype__isspace'
        ---
    ok 2 - ctype::isdigit
    ok 3 - ctype::isalpha
    ok 4 - ctype::isalnum
    ok 5 - ctype::is_glob_special
    ok 6 - ctype::is_regex_special
    ok 7 - ctype::is_pathspec_magic
    ok 8 - ctype::isascii
    ok 9 - ctype::islower
    ok 10 - ctype::isupper
    ok 11 - ctype::iscntrl
    ok 12 - ctype::ispunct
    ok 13 - ctype::isxdigit
    ok 14 - ctype::isprint

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-09-04 08:41:37 -07:00
..
clar clar: stop including shellapi.h unnecessarily 2024-09-04 08:41:37 -07:00
.gitignore Makefile: wire up the clar unit testing framework 2024-09-04 08:41:37 -07:00
clar-generate.awk Makefile: wire up the clar unit testing framework 2024-09-04 08:41:37 -07:00
ctype.c t/unit-tests: convert ctype tests to use clar 2024-09-04 08:41:37 -07:00
lib-oid.c t/: migrate helper/test-oidtree.c to unit-tests/t-oidtree.c 2024-06-12 13:33:20 -07:00
lib-oid.h hash-ll: merge with "hash.h" 2024-06-14 10:26:33 -07:00
strvec.c t/unit-tests: convert strvec tests to use clar 2024-09-04 08:41:37 -07:00
t-example-decorate.c t-example-decorate: remove test messages 2024-07-30 13:31:46 -07:00
t-hash.c t/: migrate helper/test-{sha1, sha256} to unit-tests/t-hash 2024-05-29 09:11:41 -07:00
t-hashmap.c t: port helper/test-hashmap.c to unit-tests/t-hashmap.c 2024-08-06 09:25:54 -07:00
t-mem-pool.c mem-pool: fix big allocations 2023-12-28 12:22:43 -08:00
t-oidmap.c t: migrate helper/test-oidmap.c to unit-tests/t-oidmap.c 2024-07-03 09:12:14 -07:00
t-oidtree.c t/: migrate helper/test-oidtree.c to unit-tests/t-oidtree.c 2024-06-12 13:33:20 -07:00
t-prio-queue.c t-prio-queue: simplify using compound literals 2024-04-02 13:41:32 -07:00
t-reftable-basics.c t-reftable-basics: use if_test 2024-07-30 13:32:44 -07:00
t-reftable-merged.c t-reftable-merged: add test for REFTABLE_FORMAT_ERROR 2024-07-12 09:55:41 -07:00
t-reftable-pq.c t-reftable-pq: add tests for merged_iter_pqueue_top() 2024-08-01 09:07:29 -07:00
t-reftable-record.c t-reftable-record: add tests for reftable_log_record_compare_key() 2024-07-02 08:12:26 -07:00
t-reftable-tree.c t-reftable-tree: improve the test for infix_walk() 2024-08-04 09:50:27 -07:00
t-strbuf.c global: improve const correctness when assigning string constants 2024-06-07 10:30:48 -07:00
t-strcmp-offset.c t/: port helper/test-strcmp-offset.c to unit-tests/t-strcmp-offset.c 2024-05-20 13:39:49 -07:00
t-trailer.c trailer unit tests: inspect iterator contents 2024-05-02 09:57:08 -07:00
test-lib.c unit-tests: add if_test 2024-07-30 13:32:43 -07:00
test-lib.h Merge branch 'rs/unit-tests-test-run' 2024-08-19 11:07:36 -07:00
unit-test.c t/unit-tests: implement test driver 2024-09-04 08:41:37 -07:00
unit-test.h t/unit-tests: convert ctype tests to use clar 2024-09-04 08:41:37 -07:00