]> git.ipfire.org Git - thirdparty/glibc.git/blame - string/bug-strncat1.c
Enhance --enable-tunables to select tunables frontend at build time
[thirdparty/glibc.git] / string / bug-strncat1.c
CommitLineData
9c3b1ceb 1/* Test case by Joseph S. Myers <jsm28@cam.ac.uk>. */
02fb3d17 2#undef __USE_STRING_INLINES
9c3b1ceb
UD
3#define __USE_STRING_INLINES
4#include <stdio.h>
5#include <stdlib.h>
6#include <string.h>
7
8char d[3] = "\0\1\2";
9
10int
11main (void)
12{
13 strncat (d, "\5\6", 1);
14 if (d[0] != '\5')
15 {
16 puts ("d[0] != '\\5'");
17 exit (1);
18 }
19 if (d[1] != '\0')
20 {
21 puts ("d[1] != '\\0'");
22 exit (1);
23 }
24 if (d[2] != '\2')
25 {
0696fe75 26 puts ("d[2] != '\\2'");
9c3b1ceb
UD
27 exit (1);
28 }
29
bf4de8f3 30 return 0;
9c3b1ceb 31}