Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
config_option *opt = config_optionsp + i;
if (opt->type == OPT_STR) {
std::string *str = (std::string *)opt->conf_ptr(this);
- if (str->find("$") != string::npos)
- after_count++;
+
+ size_t pos = 0;
+ while ((pos = str->find("$", pos)) != string::npos) {
+ if (str->substr(pos, 8) != "$channel") {
+ std::cout << "unexpected meta-variable found at pos " << pos
+ << " of '" << *str << "'" << std::endl;
+ after_count++;
+ }
+ pos++;
+ }
}
}
ASSERT_EQ(0, after_count);