]> sigrok.org Git - libsigrok.git/commit - tests/strutil.c
tests: implement strutil tests for text line and word splitting
authorGerhard Sittig <redacted>
Sun, 2 Jul 2023 07:48:57 +0000 (09:48 +0200)
committerGerhard Sittig <redacted>
Wed, 12 Jul 2023 18:42:45 +0000 (20:42 +0200)
commit4db61ed4d0c5df35a15da380ef55d27c73e38051
treea6c262947f1e806c620fa866f07a4967d0f72f86
parent227913f26433bb09b353c2339c1ecc339692df61
tests: implement strutil tests for text line and word splitting

Add the test_text_line() and test_text_word() routines to cover the
splitting of text buffers into lines and the splitting of words on a
text line.

This implementation "suffers" from global vars at the file scope,
because moving the table of test cases into the test routine results in
compiler errors (initializer data not constant), the cause is uncertain.
tests/strutil.c