blob: d3de9c495815db01bbd33ad60d0adc4a60eb10a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include "login-util.h"
#include "macro.h"
static void test_session_id_valid(void) {
assert_se(session_id_valid("c1"));
assert_se(session_id_valid("1234"));
assert_se(!session_id_valid("1-2"));
assert_se(!session_id_valid(""));
assert_se(!session_id_valid("\tid"));
}
int main(int argc, char* argv[]) {
log_parse_environment();
log_open();
test_session_id_valid();
return 0;
}
|