Test the storeutl searching options
[openssl.git] / test / testutil / format_output.c
index 13123d5c6a6a767d8c11b8d49208a1eef261cd79..6ee2a1d266c3c2b14b1b41bb722fbf9564bab399 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
  *
  * Licensed under the OpenSSL license (the "License").  You may not use
  * this file except in compliance with the License.  You can obtain a copy
@@ -13,7 +13,7 @@
 
 #include <string.h>
 #include <ctype.h>
-#include <internal/nelem.h>
+#include "internal/nelem.h"
 
 /* The size of memory buffers to display on failure */
 #define MEM_BUFFER_SIZE     (2000)
@@ -72,12 +72,12 @@ static void test_fail_string_common(const char *prefix, const char *file,
         if (l1 > 0) {
             b1[n1 = l1 > width ? width : l1] = 0;
             for (i = 0; i < n1; i++)
-                b1[i] = isprint(m1[i]) ? m1[i] : '.';
+                b1[i] = isprint((unsigned char)m1[i]) ? m1[i] : '.';
         }
         if (l2 > 0) {
             b2[n2 = l2 > width ? width : l2] = 0;
             for (i = 0; i < n2; i++)
-                b2[i] = isprint(m2[i]) ? m2[i] : '.';
+                b2[i] = isprint((unsigned char)m2[i]) ? m2[i] : '.';
         }
         diff = 0;
         i = 0;
@@ -299,7 +299,7 @@ static void test_fail_bignum_common(const char *prefix, const char *file,
     if (len > MEM_BUFFER_SIZE && (bufp = OPENSSL_malloc(len * 2)) == NULL) {
         bufp = buffer;
         len = MEM_BUFFER_SIZE;
-        test_printf_stderr("WARNING: these BIGNUMs have been truncated");
+        test_printf_stderr("WARNING: these BIGNUMs have been truncated\n");
     }
 
     if (bn1 != NULL) {
@@ -382,7 +382,7 @@ void test_fail_bignum_mono_message(const char *prefix, const char *file,
 void test_output_bignum(const char *name, const BIGNUM *bn)
 {
     if (bn == NULL || BN_is_zero(bn)) {
-        test_printf_stderr("bignum: '%s' = %s", name,
+        test_printf_stderr("bignum: '%s' = %s\n", name,
                            test_bignum_zero_null(bn));
     } else if (BN_num_bytes(bn) <= BN_OUTPUT_SIZE) {
         unsigned char buf[BN_OUTPUT_SIZE];