From e800d5f8199b860ac8e1b151bf715eb951aeb28f Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Tue, 1 Mar 2022 19:12:04 +0100 Subject: add explicit test for dst==end --- tests.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests.c b/tests.c index 9255a70..306a693 100644 --- a/tests.c +++ b/tests.c @@ -16,7 +16,7 @@ is(char *desc, int ok) int main() { - printf("1..39\n"); + printf("1..40\n"); printf("# stecpy\n"); @@ -54,6 +54,10 @@ main() is("empty append works", strlen(buf) == 3); is("return value is unchanged", pos == prevpos); + pos = buf; + pos = stecpy(pos, end, "xyz"); + pos = stecpy(pos, pos, "foo"); + is("final append works", strlen(buf) == 3); printf("# steprn\n"); -- cgit 1.4.1