by nowimaman · 2y ago · 0 comments
def 'split #input with sep #sep should return #expected'() {
expect:
Split(input, sep) == expected
where:
testCase | input | sep || expected
"simple" | "a/b/c" | "/" || ['a', 'b', 'c']
"wrong sep" | "a/b/c" | "," || ['a/b/c']
"no sep" | "abc" | "/" || ['abc']
"trailing sep"| "a/b/c/"| "/" || ['a', 'b', 'c']
}No comments yet.