25
25
import java .util .List ;
26
26
import java .util .stream .Collectors ;
27
27
28
- import org .junit .jupiter .api .Disabled ;
29
28
import org .junit .jupiter .api .Nested ;
30
29
import org .junit .jupiter .api .Test ;
31
30
@@ -100,7 +99,6 @@ void usingClasspathStarProtocol() {
100
99
assertExactSubPaths (pattern , pathPrefix , "support/resource#test1.txt" , "support/resource#test2.txt" );
101
100
}
102
101
103
- @ Disabled ("Until gh-29333 is resolved" )
104
102
@ Test
105
103
void usingClasspathStarProtocolWithWildcardInPatternAndNotEndingInSlash () throws Exception {
106
104
String pattern = "classpath*:org/springframework/core/io/sup*" ;
@@ -112,7 +110,6 @@ void usingClasspathStarProtocolWithWildcardInPatternAndNotEndingInSlash() throws
112
110
assertThat (actualSubPaths ).containsExactly ("support" );
113
111
}
114
112
115
- @ Disabled ("Until gh-29333 is resolved" )
116
113
@ Test
117
114
void usingFileProtocolWithWildcardInPatternAndNotEndingInSlash () throws Exception {
118
115
Path testResourcesDir = Paths .get ("src/test/resources" ).toAbsolutePath ();
@@ -148,17 +145,15 @@ void usingFileProtocolWithWildcardInPatternAndEndingInSlash() throws Exception {
148
145
assertThat (actualSubPaths ).isEmpty ();
149
146
}
150
147
151
- @ Disabled ("Until gh-29333 is resolved" )
152
148
@ Test
153
- void usingClasspathStarProtocolWithWildcardInPatternAndEndingWithSlashStarStar () throws Exception {
154
- String pattern = "classpath*:org/springframework/core/io/sup*/** " ;
149
+ void usingClasspathStarProtocolWithWildcardInPatternAndEndingWithSuffixPattern () throws Exception {
150
+ String pattern = "classpath*:org/springframework/core/io/sup*/*.txt " ;
155
151
String pathPrefix = ".+org/springframework/core/io/" ;
156
152
157
153
List <String > actualSubPaths = getSubPathsIgnoringClassFilesEtc (pattern , pathPrefix );
158
154
159
- // We DO find "support" if the pattern ENDS with "/**".
160
155
assertThat (actualSubPaths )
161
- .containsExactlyInAnyOrder ("support" , "support /resource#test1.txt" , "support/resource#test2.txt" );
156
+ .containsExactlyInAnyOrder ("support/resource#test1.txt" , "support/resource#test2.txt" );
162
157
}
163
158
164
159
private List <String > getSubPathsIgnoringClassFilesEtc (String pattern , String pathPrefix ) throws IOException {
@@ -173,7 +168,7 @@ private List<String> getSubPathsIgnoringClassFilesEtc(String pattern, String pat
173
168
}
174
169
175
170
@ Test
176
- void usingFileProtocolWithoutWildcardInPatternAndEndingInSlashStarStar () throws Exception {
171
+ void usingFileProtocolWithoutWildcardInPatternAndEndingInSlashStarStar () {
177
172
Path testResourcesDir = Paths .get ("src/test/resources" ).toAbsolutePath ();
178
173
String pattern = String .format ("file:%s/scanned-resources/**" , testResourcesDir );
179
174
String pathPrefix = ".+?resources/" ;
@@ -184,9 +179,8 @@ void usingFileProtocolWithoutWildcardInPatternAndEndingInSlashStarStar() throws
184
179
"scanned-resources/resource#test2.txt" );
185
180
}
186
181
187
- @ Disabled ("Until gh-29333 is resolved" )
188
182
@ Test
189
- void usingFileProtocolWithWildcardInPatternAndEndingInSlashStarStar () throws Exception {
183
+ void usingFileProtocolWithWildcardInPatternAndEndingInSlashStarStar () {
190
184
Path testResourcesDir = Paths .get ("src/test/resources" ).toAbsolutePath ();
191
185
String pattern = String .format ("file:%s/scanned*resources/**" , testResourcesDir );
192
186
String pathPrefix = ".+?resources/" ;
0 commit comments