Fix typos found by codespell
[openssl.git] / test / membio_test.c
index d1b01061a99a30ed1ace26169cc3258b34abd0d3..254f71b9c52053bdef65b38f12851c0788cbcc11 100644 (file)
@@ -10,6 +10,7 @@
 #include <openssl/bio.h>
 #include "testutil.h"
 
+#ifndef OPENSSL_NO_DGRAM
 static int test_dgram(void)
 {
     BIO *bio = BIO_new(BIO_s_dgram_mem()), *rbio = NULL;
@@ -27,7 +28,7 @@ static int test_dgram(void)
     if (!TEST_ptr(rbio))
         goto err;
 
-    /* Seeting the EOF return value on a non datagram mem BIO should be fine */
+    /* Setting the EOF return value on a non datagram mem BIO should be fine */
     if (!TEST_int_gt(BIO_set_mem_eof_return(rbio, 0), 0))
         goto err;
 
@@ -98,13 +99,17 @@ static int test_dgram(void)
             || !TEST_true(BIO_should_retry(bio)))
         goto err;
 
+    if (!TEST_int_eq(BIO_dgram_set_mtu(bio, 123456), 1)
+            || !TEST_int_eq(BIO_dgram_get_mtu(bio), 123456))
+        goto err;
+
     testresult = 1;
  err:
     BIO_free(rbio);
     BIO_free(bio);
     return testresult;
 }
-
+#endif
 
 int setup_tests(void)
 {
@@ -113,7 +118,9 @@ int setup_tests(void)
         return 0;
     }
 
+#ifndef OPENSSL_NO_DGRAM
     ADD_TEST(test_dgram);
+#endif
 
     return 1;
 }