diff options
| author | Eugene Triguba <hello@eugenetriguba.com> | 2025-10-11 14:19:39 -0400 |
|---|---|---|
| committer | Eugene Triguba <hello@eugenetriguba.com> | 2025-10-11 14:31:37 -0400 |
| commit | d3ec525b7d6ecd8de064d3f3a54d112769d1d3b3 (patch) | |
| tree | 935b51f95afb513604c82c9e1efca223af60c109 /tests/test_linebuffer.c | |
| parent | Fix git clone link in readme (diff) | |
| download | cli-d3ec525b7d6ecd8de064d3f3a54d112769d1d3b3.zip | |
Add unicode support to justify
Diffstat (limited to 'tests/test_linebuffer.c')
| -rw-r--r-- | tests/test_linebuffer.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/test_linebuffer.c b/tests/test_linebuffer.c index ae233cc..6d84780 100644 --- a/tests/test_linebuffer.c +++ b/tests/test_linebuffer.c @@ -10,17 +10,19 @@ #include <string.h> /** - * GIVEN a specific buffer capacity + * GIVEN a specific line width * WHEN we attempt to create a LineBuffer * THEN we expect it to be created successfully * with the expected internal state */ void test_linebuffer_create(void **state) { - const int buffer_capacity = 50; - LineBuffer *lb = linebuffer_create(buffer_capacity); + const int line_width = 50; + LineBuffer *lb = linebuffer_create(line_width); assert_non_null(lb); - assert_int_equal(lb->_buffer_capacity, buffer_capacity); + assert_int_equal(lb->_line_width, line_width); + assert_int_equal(lb->_buffer_capacity, line_width * 4); assert_int_equal(lb->_buffer_length, 0); + assert_int_equal(lb->_display_width, 0); assert_int_equal(lb->_num_words, 0); linebuffer_destroy(lb); } |