• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# lws api test lws_tokenize
2
3Performs selftests for lws_tokenize
4
5## build
6
7```
8 $ cmake . && make
9```
10
11## usage
12
13Commandline option|Meaning
14---|---
15-d <loglevel>|Debug verbosity in decimal, eg, -d15
16-s "input string"|String to tokenize
17-f 15|LWS_TOKENIZE_F_ flag values to apply to processing of -s
18
19```
20 $ ./lws-api-test-lws_tokenize
21[2018/10/09 09:14:17:4834] USER: LWS API selftest: lws_tokenize
22[2018/10/09 09:14:17:4835] USER: Completed: PASS: 6, FAIL: 0
23```
24
25If the `-s string` option is given, the string is tokenized on stdout in
26the format used to produce the tests in the sources
27
28```
29 $ ./lws-api-test-lws_tokenize -s "hello: 1234,256"
30[2018/10/09 09:14:17:4834] USER: LWS API selftest: lws_tokenize
31{ LWS_TOKZE_TOKEN_NAME_COLON, "hello", 5 }
32{ LWS_TOKZE_INTEGER, "1234", 4 }
33{ LWS_TOKZE_DELIMITER, ",", 1 }
34{ LWS_TOKZE_INTEGER, "256", 3 }
35{ LWS_TOKZE_ENDED, "", 0 }
36```
37
38