@@ -10,9 +10,9 @@ test_description='Test string list functionality'
10
10
test_split () {
11
11
cat > expected &&
12
12
test_expect_success " split $1 at $2 , max $3 " "
13
- test-string-list split '$1 ' '$2 ' '$3 ' >actual &&
13
+ test-tool string-list split '$1 ' '$2 ' '$3 ' >actual &&
14
14
test_cmp expected actual &&
15
- test-string-list split_in_place '$1 ' '$2 ' '$3 ' >actual &&
15
+ test-tool string-list split_in_place '$1 ' '$2 ' '$3 ' >actual &&
16
16
test_cmp expected actual
17
17
"
18
18
}
@@ -61,31 +61,31 @@ test_split ":" ":" "-1" <<EOF
61
61
EOF
62
62
63
63
test_expect_success " test filter_string_list" '
64
- test "x-" = "x$(test-string-list filter - y)" &&
65
- test "x-" = "x$(test-string-list filter no y)" &&
66
- test yes = "$(test-string-list filter yes y)" &&
67
- test yes = "$(test-string-list filter no:yes y)" &&
68
- test yes = "$(test-string-list filter yes:no y)" &&
69
- test y1:y2 = "$(test-string-list filter y1:y2 y)" &&
70
- test y2:y1 = "$(test-string-list filter y2:y1 y)" &&
71
- test "x-" = "x$(test-string-list filter x1:x2 y)"
64
+ test "x-" = "x$(test-tool string-list filter - y)" &&
65
+ test "x-" = "x$(test-tool string-list filter no y)" &&
66
+ test yes = "$(test-tool string-list filter yes y)" &&
67
+ test yes = "$(test-tool string-list filter no:yes y)" &&
68
+ test yes = "$(test-tool string-list filter yes:no y)" &&
69
+ test y1:y2 = "$(test-tool string-list filter y1:y2 y)" &&
70
+ test y2:y1 = "$(test-tool string-list filter y2:y1 y)" &&
71
+ test "x-" = "x$(test-tool string-list filter x1:x2 y)"
72
72
'
73
73
74
74
test_expect_success " test remove_duplicates" '
75
- test "x-" = "x$(test-string-list remove_duplicates -)" &&
76
- test "x" = "x$(test-string-list remove_duplicates "")" &&
77
- test a = "$(test-string-list remove_duplicates a)" &&
78
- test a = "$(test-string-list remove_duplicates a:a)" &&
79
- test a = "$(test-string-list remove_duplicates a:a:a:a:a)" &&
80
- test a:b = "$(test-string-list remove_duplicates a:b)" &&
81
- test a:b = "$(test-string-list remove_duplicates a:a:b)" &&
82
- test a:b = "$(test-string-list remove_duplicates a:b:b)" &&
83
- test a:b:c = "$(test-string-list remove_duplicates a:b:c)" &&
84
- test a:b:c = "$(test-string-list remove_duplicates a:a:b:c)" &&
85
- test a:b:c = "$(test-string-list remove_duplicates a:b:b:c)" &&
86
- test a:b:c = "$(test-string-list remove_duplicates a:b:c:c)" &&
87
- test a:b:c = "$(test-string-list remove_duplicates a:a:b:b:c:c)" &&
88
- test a:b:c = "$(test-string-list remove_duplicates a:a:a:b:b:b:c:c:c)"
75
+ test "x-" = "x$(test-tool string-list remove_duplicates -)" &&
76
+ test "x" = "x$(test-tool string-list remove_duplicates "")" &&
77
+ test a = "$(test-tool string-list remove_duplicates a)" &&
78
+ test a = "$(test-tool string-list remove_duplicates a:a)" &&
79
+ test a = "$(test-tool string-list remove_duplicates a:a:a:a:a)" &&
80
+ test a:b = "$(test-tool string-list remove_duplicates a:b)" &&
81
+ test a:b = "$(test-tool string-list remove_duplicates a:a:b)" &&
82
+ test a:b = "$(test-tool string-list remove_duplicates a:b:b)" &&
83
+ test a:b:c = "$(test-tool string-list remove_duplicates a:b:c)" &&
84
+ test a:b:c = "$(test-tool string-list remove_duplicates a:a:b:c)" &&
85
+ test a:b:c = "$(test-tool string-list remove_duplicates a:b:b:c)" &&
86
+ test a:b:c = "$(test-tool string-list remove_duplicates a:b:c:c)" &&
87
+ test a:b:c = "$(test-tool string-list remove_duplicates a:a:b:b:c:c)" &&
88
+ test a:b:c = "$(test-tool string-list remove_duplicates a:a:a:b:b:b:c:c:c)"
89
89
'
90
90
91
91
test_done
0 commit comments