File tree 1 file changed +14
-13
lines changed
1 file changed +14
-13
lines changed Original file line number Diff line number Diff line change 1
1
#[ cfg( test) ]
2
2
mod scanner {
3
- use scanner:: detect_sources:: DetectSources ;
4
3
use std:: process:: Command ;
5
4
use std:: { fs, path} ;
6
5
@@ -35,18 +34,20 @@ mod scanner {
35
34
let base = format ! ( "{}" , dir. display( ) ) ;
36
35
37
36
// Resolve all content paths for the (temporary) current working directory
38
- let mut scanner = Scanner :: new (
39
- Some ( DetectSources :: new ( base. clone ( ) . into ( ) ) ) ,
40
- Some (
41
- globs
42
- . iter ( )
43
- . map ( |x| GlobEntry {
44
- base : base. clone ( ) ,
45
- pattern : x. to_string ( ) ,
46
- } )
47
- . collect ( ) ,
48
- ) ,
49
- ) ;
37
+ let mut sources: Vec < GlobEntry > = globs
38
+ . iter ( )
39
+ . map ( |x| GlobEntry {
40
+ base : base. clone ( ) ,
41
+ pattern : x. to_string ( ) ,
42
+ } )
43
+ . collect ( ) ;
44
+
45
+ sources. push ( GlobEntry {
46
+ base : base. clone ( ) ,
47
+ pattern : "**/*" . to_string ( ) ,
48
+ } ) ;
49
+
50
+ let mut scanner = Scanner :: new ( Some ( sources) ) ;
50
51
51
52
let candidates = scanner. scan ( ) ;
52
53
You can’t perform that action at this time.
0 commit comments