Mercurial > archived > louis > perso > liblxcstats
comparison tests/strsplit.c @ 5:8d8c49b066d4
Add a test for strsplit()
author | Louis Opter <louis@dotcloud.com> |
---|---|
date | Sat, 01 Jan 2011 16:05:08 +0100 |
parents | 50215911acb3 |
children |
comparison
equal
deleted
inserted
replaced
4:50215911acb3 | 5:8d8c49b066d4 |
---|---|
32 errx(EXIT_FAILURE, "invalid number of fields."); | 32 errx(EXIT_FAILURE, "invalid number of fields."); |
33 check(fields[0], "word1"); | 33 check(fields[0], "word1"); |
34 check(fields[1], "word2"); | 34 check(fields[1], "word2"); |
35 check(fields[2], "word3"); | 35 check(fields[2], "word3"); |
36 | 36 |
37 if (_lxcst_strsplit(usage, fields, 1) != 1) | |
38 errx(EXIT_FAILURE, "invalid number of fields."); | |
39 check(fields[0], "system:"); | |
40 check(fields[1], "word2"); | |
41 | |
37 return (EXIT_SUCCESS); | 42 return (EXIT_SUCCESS); |
38 } | 43 } |