summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-05-15 15:03:02 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-05-15 15:03:02 +0000
commit4f67befd4840e04488663f78f5daef4a28e3c1fe (patch)
treefd42053d6a1660e1de32d65a8dc03688d84f537d /testsuites
parent2009-05-15 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-4f67befd4840e04488663f78f5daef4a28e3c1fe.tar.bz2
2009-05-15 Joel Sherrill <joel.sherrill@OARcorp.com>
* spprintk/init.c: printk() now 100% covered.
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/sptests/ChangeLog4
-rw-r--r--testsuites/sptests/spprintk/init.c14
2 files changed, 18 insertions, 0 deletions
diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog
index 6e9c32dede..b41920353b 100644
--- a/testsuites/sptests/ChangeLog
+++ b/testsuites/sptests/ChangeLog
@@ -1,3 +1,7 @@
+2009-05-15 Joel Sherrill <joel.sherrill@OARcorp.com>
+
+ * spprintk/init.c: printk() now 100% covered.
+
2009-05-14 Joel Sherrill <joel.sherrill@oarcorp.com>
* spprintk/init.c: More test cases.
diff --git a/testsuites/sptests/spprintk/init.c b/testsuites/sptests/spprintk/init.c
index cd835e12ec..4acf3e104c 100644
--- a/testsuites/sptests/spprintk/init.c
+++ b/testsuites/sptests/spprintk/init.c
@@ -33,14 +33,28 @@ rtems_task Init(
printk( "%%i of 16 -- %i\n", 16 );
printk( "%%D of 16 -- %D\n", 16 );
printk( "%%d of 16 -- %d\n", 16 );
+ printk( "%%-3d of 16 -- %-3d\n", 16 );
printk( "%%U of 16 -- %U\n", 16 );
printk( "%%u of 16 -- %u\n", 16 );
printk( "%%X of 16 -- %X\n", 16 );
printk( "%%x of 16 -- %x\n", 16 );
printk( "%%p of 0x1234 -- %p\n", (void *)0x1234 );
+
+ /* negative numbers */
+ printk( "%%d of -16 -- %d\n", -16 );
+ printk( "%%d of -16 -- %-3d\n", -16 );
+ printk( "%%u of -16 -- %u\n", -16 );
+
+ /* string formats */
printk( "%%s of Mary Had a Little Lamb -- (%s)\n",
"Mary Had a Little Lamb" );
printk( "%%s of NULL -- (%s)\n", NULL );
+ printk( "%%12s of joel -- (%20s)\n", "joel" );
+ printk( "%%4s of joel -- (%4s)\n", "joel" );
+ printk( "%%-12s of joel -- (%-20s)\n", "joel" );
+ printk( "%%-4s of joel -- (%-4s)\n", "joel" );
+ printk( "%%c of X -- (%c)\n", 'X' );
+
printk( "*** END OF TEST PRINTK ***" );
rtems_test_exit( 0 );