| 1 |
/* SPDX-License-Identifier: GPL-3.0-or-later */
|
| 2 |
/*
|
| 3 |
* test_bbs
|
| 4 |
* - tester for BBS related common functions
|
| 5 |
*
|
| 6 |
* Copyright (C) 2004-2026 Leaflet <leaflet@leafok.com>
|
| 7 |
*/
|
| 8 |
|
| 9 |
#ifdef HAVE_CONFIG_H
|
| 10 |
#include "config.h"
|
| 11 |
#endif
|
| 12 |
|
| 13 |
#include "bbs.h"
|
| 14 |
#include <stdio.h>
|
| 15 |
|
| 16 |
int main(int argc, char *argv[])
|
| 17 |
{
|
| 18 |
int i;
|
| 19 |
int user_level;
|
| 20 |
|
| 21 |
const int user_points[] = {
|
| 22 |
-50, -1, 0, 1, 49, 50, 51, 499, 500, 501, 99999, 100000, 100001};
|
| 23 |
|
| 24 |
const int user_cnt = sizeof(user_points) / sizeof(int);
|
| 25 |
|
| 26 |
for (i = 0; i < user_cnt; i++)
|
| 27 |
{
|
| 28 |
user_level = get_user_level(user_points[i]);
|
| 29 |
printf("%10d\t%d\t%s\n", user_points[i], user_level, get_user_level_name(user_level));
|
| 30 |
}
|
| 31 |
|
| 32 |
return 0;
|
| 33 |
}
|