summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-02-23 13:25:00 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-02-25 16:16:25 +0100
commit5f8bc839e89ea6efa7f48ebcec8939861024649f (patch)
tree94fff4d939edd79621c60f66a4164822cb4296d4 /testsuites
parentlibtest: Report build label (diff)
downloadrtems-5f8bc839e89ea6efa7f48ebcec8939861024649f.tar.bz2
score: Add _IO_Base64url()
Update #4267.
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/sptests/spprintk/init.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuites/sptests/spprintk/init.c b/testsuites/sptests/spprintk/init.c
index 0c0e4c7fb8..ffabb9ae91 100644
--- a/testsuites/sptests/spprintk/init.c
+++ b/testsuites/sptests/spprintk/init.c
@@ -242,6 +242,17 @@ static void test_io_base64( test_context *ctx )
rtems_test_assert( n == 0 );
}
+static void test_io_base64url( test_context *ctx )
+{
+ unsigned char buf[] = { 0, 0, 62, 0, 0, 63 };
+ int n;
+
+ clear( ctx );
+ n = _IO_Base64url( put_char, ctx, buf, sizeof( buf ), "\n", 0 );
+ rtems_test_assert( n == 9 );
+ rtems_test_assert( strcmp( ctx->buf, "AAA-\nAAA_" ) == 0 );
+}
+
static rtems_task Init(
rtems_task_argument argument
)
@@ -257,6 +268,7 @@ static rtems_task Init(
do_getchark();
test_io_printf(&test_instance);
test_io_base64(&test_instance);
+ test_io_base64url(&test_instance);
TEST_END();
rtems_test_exit( 0 );