summaryrefslogtreecommitdiffstats
path: root/testsuites/libtests/dumpbuf01/init.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-08-02 18:17:11 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-08-02 18:17:11 +0000
commitd0e825d0b9dad90af550c5fbbccb5a00d01c6117 (patch)
treee00538f6ec927aced857161ebc9705cb5e38158d /testsuites/libtests/dumpbuf01/init.c
parent2010-08-02 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-d0e825d0b9dad90af550c5fbbccb5a00d01c6117.tar.bz2
2010-08-02 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac: Add test for rtems_print_buffer(). * dumpbuf01/.cvsignore, dumpbuf01/Makefile.am, dumpbuf01/dumpbuf01.doc, dumpbuf01/dumpbuf01.scn, dumpbuf01/init.c: New files.
Diffstat (limited to '')
-rw-r--r--testsuites/libtests/dumpbuf01/init.c57
1 files changed, 57 insertions, 0 deletions
diff --git a/testsuites/libtests/dumpbuf01/init.c b/testsuites/libtests/dumpbuf01/init.c
new file mode 100644
index 0000000000..c382bd2d0a
--- /dev/null
+++ b/testsuites/libtests/dumpbuf01/init.c
@@ -0,0 +1,57 @@
+/*
+ * COPYRIGHT (c) 1989-2010.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#include <tmacros.h>
+#include "test_support.h"
+#include <rtems/dumpbuf.h>
+
+unsigned char Buffer[] =
+"ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890\n";
+
+void do_test(
+ int length
+)
+{
+ printf( "====== Printing %d Bytes ======\n", length );
+ rtems_print_buffer( Buffer, length );
+ printf( "===============================\n\n" );
+}
+
+rtems_task Init(
+ rtems_task_argument argument
+)
+{
+ int i;
+
+ puts( "\n\n*** TEST DUMPBUF01 ***" );
+
+ for ( i = 0 ; i < sizeof(Buffer) ; i++ ) {
+ do_test( i );
+ }
+ do_test( -1 );
+
+ puts( "*** END OF TEST DUMPBUF01 ***" );
+
+ rtems_test_exit(0);
+}
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
+/* end of file */