summaryrefslogtreecommitdiff
path: root/support/regression/tests/bug-2749.c
blob: 7b8a7737979e4ddf90c084ee2231b8359fbc8d33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
    bug-2627.c, an issue in initialization of unterminated strings that contain \" or \\ escape sequences.
*/

#include <testfwk.h>

#ifndef PORT_HOST
#pragma disable_warning 147
#endif

char array1[2] = "\"t";
char array2[2] = "\\t";
const char array3[2] = "\"t";
const char array4[2] = "\\t";

void testBug(void)
{
	ASSERT(array1[0] == '\"');
	ASSERT(array2[0] == '\\');
	ASSERT(array3[0] == '\"');
	ASSERT(array4[0] == '\\');
}