| 42 |
"[color red]Red[/color][plain][color blue]Blue[/color][plain]", |
"[color red]Red[/color][plain][color blue]Blue[/color][plain]", |
| 43 |
"[color yellow]Yellow[/color][nolml][left][color blue]Blue[/color][right][lml][color red]Red[/color]", |
"[color yellow]Yellow[/color][nolml][left][color blue]Blue[/color][right][lml][color red]Red[/color]", |
| 44 |
"[abc][left ][ right ][ colory ][left \nABCD[left]EFG[right ", |
"[abc][left ][ right ][ colory ][left \nABCD[left]EFG[right ", |
| 45 |
"ABCD]EFG" |
"ABCD]EFG", |
| 46 |
|
": : A123456789B123456789C123456789D123456789E123456789F123456789G123456789H123456789I123456789J123456789", |
| 47 |
}; |
}; |
| 48 |
|
|
| 49 |
const int str_cnt = sizeof(str_in) / sizeof(const char *); |
const int str_cnt = sizeof(str_in) / sizeof(const char *); |
| 66 |
printf("Test #1: quote_mode = 0\n"); |
printf("Test #1: quote_mode = 0\n"); |
| 67 |
for (i = 0; i < str_cnt; i++) |
for (i = 0; i < str_cnt; i++) |
| 68 |
{ |
{ |
| 69 |
j = lml_render(str_in[i], str_out_buf, sizeof(str_out_buf), 0); |
j = lml_render(str_in[i], str_out_buf, sizeof(str_out_buf), 80, 0); |
| 70 |
|
|
| 71 |
printf("Input(len=%ld): %s\nOutput(len=%d): %s\n", strlen(str_in[i]), str_in[i], j, str_out_buf); |
printf("Input(len=%ld): %s\nOutput(len=%d): %s\n", strlen(str_in[i]), str_in[i], j, str_out_buf); |
| 72 |
} |
} |
| 75 |
printf("Test #2: quote_mode = 1\n"); |
printf("Test #2: quote_mode = 1\n"); |
| 76 |
for (i = 0; i < str_cnt; i++) |
for (i = 0; i < str_cnt; i++) |
| 77 |
{ |
{ |
| 78 |
j = lml_render(str_in[i], str_out_buf, sizeof(str_out_buf), 1); |
j = lml_render(str_in[i], str_out_buf, sizeof(str_out_buf), 80, 1); |
| 79 |
|
|
| 80 |
printf("Input(len=%ld): %s\nOutput(len=%d): %s\n", strlen(str_in[i]), str_in[i], j, str_out_buf); |
printf("Input(len=%ld): %s\nOutput(len=%d): %s\n", strlen(str_in[i]), str_in[i], j, str_out_buf); |
| 81 |
} |
} |