diff --git a/test/append-test-log.c b/test/append-test-log.c index 99f476d..2e1a42e 100644 --- a/test/append-test-log.c +++ b/test/append-test-log.c @@ -29,6 +29,7 @@ // Local Prototypes static void append_to_empty(TestState *); +static void append_to_existing(TestState *); // Public Functions @@ -37,6 +38,7 @@ test_append_test_log(TestState *s) { print("append_test_log()\n"); append_to_empty(s); + append_to_existing(s); } // Local Functions @@ -77,4 +79,23 @@ append_to_empty(TestState *s) ); } +static void +append_to_existing(TestState *s) +{ + TestState test; + TestLogEntry first, second; + print("\tappend to existing\n"); + + // build initial state/log + mk_sample_state(&test); + first.text = "foo"; + first.next = &second; + second.text = "bar"; + second.next = 0; + test.first_log = &first; + test.last_log = &second; + + append_test_log(&test, "baz"); +} + //jl