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

Diff of /lbbs/src/test_section_list.c

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

Revision 1.3 by sysadm, Wed May 21 06:17:52 2025 UTC Revision 1.4 by sysadm, Wed May 21 06:33:19 2025 UTC
# Line 59  int main(int argc, char *argv[]) Line 59  int main(int argc, char *argv[])
59          log_std_redirect(STDOUT_FILENO);          log_std_redirect(STDOUT_FILENO);
60          log_err_redirect(STDERR_FILENO);          log_err_redirect(STDERR_FILENO);
61    
62            // block_count = BBS_article_block_limit_per_section * BBS_max_section; // This statement is correct
63            // - 1 to make blocks allocated is less than required
64            // Some error will be triggered while invoking section_data_append_article()
65          block_count = BBS_article_block_limit_per_section * BBS_max_section - 1;          block_count = BBS_article_block_limit_per_section * BBS_max_section - 1;
66    
67          if (section_data_pool_init("../conf/menu.conf", block_count) < 0)          if (section_data_pool_init("../conf/menu.conf", block_count) < 0)
# Line 124  int main(int argc, char *argv[]) Line 127  int main(int argc, char *argv[])
127                          {                          {
128                                  printf("Inconsistent aid at index %d != %d\n", j, last_aid);                                  printf("Inconsistent aid at index %d != %d\n", j, last_aid);
129                          }                          }
130    
131                            if (section_data_mark_del_article(p_section[i], p_article->aid) != 1)
132                            {
133                                    printf("section_data_mark_del_article(aid = %d) error\n", p_article->aid);
134                            }
135                  }                  }
136    
137                  printf("Verify %d articles in section %d\n", p_section[i]->article_count, i);                  printf("Verify %d articles in section %d\n", p_section[i]->article_count, i);
138                    printf("Delete %d articles in section %d\n", p_section[i]->delete_count, i);
139          }          }
140    
141          printf("Testing #2 ...\n");          printf("Testing #2 ...\n");


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

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