--- lbbs/src/test_bbs.c 2025/10/23 14:50:15 1.1 +++ lbbs/src/test_bbs.c 2025/11/04 14:58:56 1.4 @@ -1,18 +1,10 @@ -/*************************************************************************** - test_bbs.c - description - ------------------- - Copyright : (C) 2004-2025 by Leaflet - Email : leaflet@leafok.com - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 3 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ +/* SPDX-License-Identifier: GPL-3.0-or-later */ +/* + * test_bbs + * - tester for BBS related common functions + * + * Copyright (C) 2004-2025 Leaflet + */ #include "bbs.h" #include @@ -20,6 +12,7 @@ int main(int argc, char *argv[]) { int i; + int user_level; const int user_points[] = { -50, -1, 0, 1, 49, 50, 51, 499, 500, 501, 99999, 100000, 100001}; @@ -28,7 +21,8 @@ int main(int argc, char *argv[]) for (i = 0; i < user_cnt; i++) { - printf("%10d\t\t%s\n", user_points[i], get_user_level_name(user_points[i])); + user_level = get_user_level(user_points[i]); + printf("%10d\t%d\t%s\n", user_points[i], user_level, get_user_level_name(user_level)); } return 0;