diff options
| author | nodist <kevin.comas.git@gmail.com> | 2026-10-24 20:06:26 -0400 |
|---|---|---|
| committer | nodist <kevin.comas.git@gmail.com> | 2026-10-24 20:06:26 -0400 |
| commit | 19eb183b38511998322d99c33515c079d89785e3 (patch) | |
| tree | 3d0446b1d2fe6a99ea2e9a6c1300516bfba1f590 /test/identifier.c | |
| parent | 689719e0a1f139e28e57a4df334d5fde354b3379 (diff) | |
add kpl_identifier
Diffstat (limited to 'test/identifier.c')
| -rw-r--r-- | test/identifier.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/identifier.c b/test/identifier.c new file mode 100644 index 0000000..94c57bb --- /dev/null +++ b/test/identifier.c @@ -0,0 +1,11 @@ + +#include "kpl_test.h" + +KPL_TEST(c_string_to_identifier) { + const char *string = "aA0_t4_12w0Z"; + kpl_identifier identifier; + KPL_ASSERT(kpl_identifier_encode(&identifier, string, strlen(string)), "should encode"); + char buffer[100] = {}; + kpl_identifier_decode(&identifier, buffer); + KPL_ASSERT(strcmp(string, buffer) == 0, "should decode to same string"); +} |
