struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug1932626.c
blob112f54eccdbadcef6f6a9f31d506d9659645003d
1 /*
2 * bug1932626.c
3 */
5 #include <testfwk.h>
6 #include <string.h>
8 void CopyString(char acSource[], char acDestination[])
10 unsigned char ucCurrentPosition;
12 for (ucCurrentPosition = 0; ; ucCurrentPosition++)
14 acDestination[ucCurrentPosition]=acSource[ucCurrentPosition];
15 if (0==acSource[ucCurrentPosition])
16 break;
20 void testBug(void)
22 char text1[] = "spam";
23 char text2[16];
24 CopyString(text1, text2);
25 ASSERT(!strcmp(text1, text2));