test-split.cpp 348 B

123456
  1. TEST(split) {
  2. ensure(split(" ab b rrrr", ' ') == vector<string>({"", "ab", "", "b", "rrrr"}));
  3. ensure(split(" ab b rrrr ", ' ') == vector<string>({"", "ab", "", "b", "rrrr", ""}));
  4. ensure(split(" ab b rrrr ", ' ') == vector<string>({"", "ab", "", "b", "rrrr", "", ""}));
  5. ensure(split("", ',') == vector<string>(1, ""));
  6. }