Count the "+" characters in a range string. A truncation marker must appear * once and only at the end: every reader stops at the first token that is not * a range, so a marker in the middle silently hides every range after it. */
| 22965 | * once and only at the end: every reader stops at the first token that is not |
| 22966 | * a range, so a marker in the middle silently hides every range after it. */ |
| 22967 | static int count_plus(const char *s) { |
| 22968 | int n = 0; |
| 22969 | for (const char *p = s; *p; p++) { |
| 22970 | if (*p == '+') { |
| 22971 | n++; |
| 22972 | } |
| 22973 | } |
| 22974 | return n; |
| 22975 | } |
| 22976 | |
| 22977 | TEST(pipeline_objectscript_export_range_join_keeps_one_trailing_marker) { |
| 22978 | char joined[256]; |