-
- SECTION("Test the function xbt_str_split_quoted")
- {
- test_split_quoted("Empty", "", {});
- test_split_quoted("Basic test", "toto tutu", {"toto", "tutu"});
- test_split_quoted("Useless backslashes", "\\t\\o\\t\\o \\t\\u\\t\\u", {"toto", "tutu"});
- test_split_quoted("Protected space", "toto\\ tutu", {"toto tutu"});
- test_split_quoted("Several spaces", "toto tutu", {"toto", "tutu"});
- test_split_quoted("LTriming", " toto tatu", {"toto", "tatu"});
- test_split_quoted("Triming", " toto tutu ", {"toto", "tutu"});
- test_split_quoted("Single quotes", "'toto tutu' tata", {"toto tutu", "tata"});
- test_split_quoted("Double quotes", "\"toto tutu\" tata", {"toto tutu", "tata"});
- test_split_quoted("Mixed quotes", "\"toto' 'tutu\" tata", {"toto' 'tutu", "tata"});
- test_split_quoted("Backslashed quotes", "\\'toto tutu\\' tata", {"'toto", "tutu'", "tata"});
- test_split_quoted("Backslashed quotes + quotes", "'toto \\'tutu' tata", {"toto 'tutu", "tata"});
- }
-