/[LeafOK_CVS]/lbbs/src/test_lml.c
ViewVC logotype

Diff of /lbbs/src/test_lml.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.21 by sysadm, Thu Oct 30 03:18:56 2025 UTC Revision 1.22 by sysadm, Thu Oct 30 07:51:47 2025 UTC
# Line 42  const char *str_in[] = { Line 42  const char *str_in[] = {
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 *);
# Line 65  int main(int argc, char *argv[]) Line 66  int main(int argc, char *argv[])
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          }          }
# Line 74  int main(int argc, char *argv[]) Line 75  int main(int argc, char *argv[])
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          }          }


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1