2 * collectd - src/ceph_test.c
3 * Copyright (C) 2015 Florian octo Forster
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; only version 2 of the License is applicable.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 * Florian octo Forster <octo at collectd.org>
22 #include "ceph.c" /* sic */
31 {"WBThrottle.bytes_dirtied.description.bytes_wb.description.ios_dirtied.description.ios_wb.type", "WBThrottle.bytesDirtied.description.bytesWb.description.iosDirt"},
32 {"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},
33 {"foo:bar", "FooBar"},
34 {"foo:bar+", "FooBarPlus"},
35 {"foo:bar-", "FooBarMinus"},
36 {"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa+", "AaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaPlus"},
37 {"aa.bb.cc.dd.ee.ff", "Aa.bb.cc.dd.ee.ff"},
38 {"aa.bb.cc.dd.ee.ff.type", "Aa.bb.cc.dd.ee.ff"},
39 {"aa.type", "Aa.type"},
43 for (i = 0; i < STATIC_ARRAY_SIZE (cases); i++)
45 char got[DATA_MAX_NAME_LEN];
47 memset (got, 0, sizeof (got));
49 CHECK_ZERO (parse_keys (got, sizeof (got), cases[i].str));
51 CHECK_ZERO (strcmp (got, cases[i].want));
64 /* vim: set sw=2 sts=2 et : */