| 3 |
* test_bwf |
* test_bwf |
| 4 |
* - tester for bad words filter |
* - tester for bad words filter |
| 5 |
* |
* |
| 6 |
* Copyright (C) 2004-2025 Leaflet <leaflet@leafok.com> |
* Copyright (C) 2004-2026 Leaflet <leaflet@leafok.com> |
| 7 |
*/ |
*/ |
| 8 |
|
|
| 9 |
|
#ifdef HAVE_CONFIG_H |
| 10 |
|
#include "config.h" |
| 11 |
|
#endif |
| 12 |
|
|
| 13 |
#include "bwf.h" |
#include "bwf.h" |
| 14 |
#include "log.h" |
#include "log.h" |
| 15 |
#include <stdio.h> |
#include <stdio.h> |
| 55 |
return -2; |
return -2; |
| 56 |
} |
} |
| 57 |
|
|
| 58 |
|
if (bwf_compile() < 0) |
| 59 |
|
{ |
| 60 |
|
return -2; |
| 61 |
|
} |
| 62 |
|
|
| 63 |
for (i = 0; i < str_cnt; i++) |
for (i = 0; i < str_cnt; i++) |
| 64 |
{ |
{ |
| 65 |
strncpy(str, str_in[i], sizeof(str) - 1); |
strncpy(str, str_in[i], sizeof(str) - 1); |
| 82 |
} |
} |
| 83 |
} |
} |
| 84 |
|
|
| 85 |
bwf_unload(); |
bwf_cleanup(); |
| 86 |
|
|
| 87 |
log_end(); |
log_end(); |
| 88 |
|
|