@@ -28,7 +28,12 @@ func TestRun(t *testing.T) {
28
28
},
29
29
wantErr : false ,
30
30
checkFunc : func (t * testing.T , dir string ) {
31
- assert .NoDirExists (t , dir )
31
+ assert .NoDirExists (t , filepath .Join (dir , "fanal" ))
32
+ assert .NoDirExists (t , filepath .Join (dir , "db" ))
33
+ assert .NoDirExists (t , filepath .Join (dir , "java-db" ))
34
+ assert .NoDirExists (t , filepath .Join (dir , "policy" ))
35
+ assert .NoDirExists (t , filepath .Join (dir , "vex" ))
36
+ assert .DirExists (t , dir )
32
37
},
33
38
},
34
39
{
@@ -42,6 +47,7 @@ func TestRun(t *testing.T) {
42
47
assert .DirExists (t , filepath .Join (dir , "db" ))
43
48
assert .DirExists (t , filepath .Join (dir , "java-db" ))
44
49
assert .DirExists (t , filepath .Join (dir , "policy" ))
50
+ assert .DirExists (t , filepath .Join (dir , "vex" ))
45
51
},
46
52
},
47
53
{
@@ -55,6 +61,7 @@ func TestRun(t *testing.T) {
55
61
assert .DirExists (t , filepath .Join (dir , "fanal" ))
56
62
assert .DirExists (t , filepath .Join (dir , "java-db" ))
57
63
assert .DirExists (t , filepath .Join (dir , "policy" ))
64
+ assert .DirExists (t , filepath .Join (dir , "vex" ))
58
65
},
59
66
},
60
67
{
@@ -68,6 +75,7 @@ func TestRun(t *testing.T) {
68
75
assert .DirExists (t , filepath .Join (dir , "fanal" ))
69
76
assert .DirExists (t , filepath .Join (dir , "db" ))
70
77
assert .DirExists (t , filepath .Join (dir , "policy" ))
78
+ assert .DirExists (t , filepath .Join (dir , "vex" ))
71
79
},
72
80
},
73
81
{
@@ -81,6 +89,21 @@ func TestRun(t *testing.T) {
81
89
assert .DirExists (t , filepath .Join (dir , "fanal" ))
82
90
assert .DirExists (t , filepath .Join (dir , "db" ))
83
91
assert .DirExists (t , filepath .Join (dir , "java-db" ))
92
+ assert .DirExists (t , filepath .Join (dir , "vex" ))
93
+ },
94
+ },
95
+ {
96
+ name : "clean vex repositories" ,
97
+ cleanOpts : flag.CleanOptions {
98
+ CleanVEXRepositories : true ,
99
+ },
100
+ wantErr : false ,
101
+ checkFunc : func (t * testing.T , dir string ) {
102
+ assert .DirExists (t , filepath .Join (dir , "policy" ))
103
+ assert .DirExists (t , filepath .Join (dir , "fanal" ))
104
+ assert .DirExists (t , filepath .Join (dir , "db" ))
105
+ assert .DirExists (t , filepath .Join (dir , "java-db" ))
106
+ assert .NoDirExists (t , filepath .Join (dir , "vex" ))
84
107
},
85
108
},
86
109
{
@@ -127,6 +150,7 @@ func createTestFiles(t *testing.T, dir string) {
127
150
"db" ,
128
151
"java-db" ,
129
152
"policy" ,
153
+ "vex" ,
130
154
}
131
155
for _ , subdir := range subdirs {
132
156
err := os .MkdirAll (filepath .Join (dir , subdir ), 0755 )
0 commit comments