about summary refs log tree commit diff
path: root/string/tester.c
diff options
context:
space:
mode:
Diffstat (limited to 'string/tester.c')
-rw-r--r--string/tester.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/string/tester.c b/string/tester.c
index 0e65442063..dfb1258864 100644
--- a/string/tester.c
+++ b/string/tester.c
@@ -1,6 +1,32 @@
+/* Tester for string functions.
+   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
 #ifndef _GNU_SOURCE
 #define _GNU_SOURCE
 #endif
+
+/* Make sure we don't test the optimized inline functions if we want to
+   test the real implementation.  */
+#if !defined DO_STRING_INLINES
+#undef __USE_STRING_INLINES
+#endif
+
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -222,7 +248,7 @@ main (void)
 
   (void) strcpy (one, "abcdefgh");
   (void) strncpy (one, "xyz", 2);
-  equal (one, "xycdefgh", 3);		/* Copy cut by count. */
+  equal (one, "xycdefgh", 3);			/* Copy cut by count. */
 
   (void) strcpy (one, "abcdefgh");
   (void) strncpy (one, "xyz", 3);		/* Copy cut just before NUL. */
@@ -231,7 +257,7 @@ main (void)
   (void) strcpy (one, "abcdefgh");
   (void) strncpy (one, "xyz", 4);		/* Copy just includes NUL. */
   equal (one, "xyz", 5);
-  equal (one+4, "efgh", 6);		/* Wrote too much? */
+  equal (one+4, "efgh", 6);			/* Wrote too much? */
 
   (void) strcpy (one, "abcdefgh");
   (void) strncpy (one, "xyz", 5);		/* Copy includes padding. */