2017-10-21 23:40:19 +00:00
|
|
|
/* Conformance Test 2.1.1.2: Verification of newline character */
|
2022-10-17 22:50:42 +00:00
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
int printf(const char *, ...);
|
|
|
|
|
|
|
|
int main (void)
|
2017-10-21 23:40:19 +00:00
|
|
|
{
|
|
|
|
char string [10];
|
|
|
|
|
|
|
|
strcpy (string, "\n");
|
|
|
|
if (string [0] != 0x0A)
|
|
|
|
goto Fail;
|
|
|
|
|
|
|
|
strcpy (string, "abc\nf\ngh\n");
|
|
|
|
if (string [3] != 0x0A)
|
|
|
|
goto Fail;
|
|
|
|
if (string [5] != 0x0A)
|
|
|
|
goto Fail;
|
|
|
|
if (string [8] != 0x0A)
|
|
|
|
goto Fail;
|
|
|
|
|
|
|
|
printf ("Passed Conformance Test 2.1.1.2\n");
|
2022-10-17 22:50:42 +00:00
|
|
|
return 0;
|
2017-10-21 23:40:19 +00:00
|
|
|
|
|
|
|
Fail:
|
|
|
|
printf ("Failed Conformance Test 2.1.1.2\n");
|
|
|
|
}
|