From: Alan T. DeKok Date: Mon, 21 Aug 2023 15:18:45 +0000 (-0400) Subject: print out more text around mismatch so we can better find it X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0acb5dfd6bab1d5971e3f05d9915aa46f063ee0;p=thirdparty%2Ffreeradius-server.git print out more text around mismatch so we can better find it --- diff --git a/src/bin/unit_test_attribute.c b/src/bin/unit_test_attribute.c index 95b3830d70d..4ad3e467a4f 100644 --- a/src/bin/unit_test_attribute.c +++ b/src/bin/unit_test_attribute.c @@ -359,10 +359,11 @@ static void mismatch_print(command_file_ctx_t *cc, char const *command, spaces = talloc_zero_array(NULL, char, (e - expected) + 1); memset(spaces, ' ', talloc_array_length(spaces) - 1); - if ((e - expected) < 128) { + if ((e - expected) < 80) { ERROR(" %s^ differs here", spaces); } else { - ERROR(" %s^ differs here (%zu)", spaces, e - expected); + ERROR(" %s^ differs here (%zu) ... %.*s ...", spaces, e - expected, + 16, e); } talloc_free(spaces); }