@@ -153,6 +153,22 @@ void main() async {
153153 output: allOf (matchesAppPath, contains ('No unused cache entries found' )),
154154 );
155155 final s = RegExp .escape (p.separator);
156+ await runPub (
157+ args: ['cache' , 'gc' , '--force' , '--ignore-timestamp' , '--dry-run' ],
158+ output: allOf ([
159+ matchesAppPath,
160+ contains (RegExp ('Would recover [0-9]{3} KB.' )),
161+ contains (RegExp ('.*git.*cache${s }git1-.*' )),
162+ contains (RegExp ('.*git.*cache${s }git_with_path1-.*' )),
163+ contains (RegExp ('.*git.*git1-.*' )),
164+ contains (RegExp ('.*git.*git_with_path1-.*' )),
165+ contains (RegExp ('.*hosted-hashes.*hosted1-1.0.0.sha256' )),
166+ contains (RegExp ('.*hosted.*hosted1-1.0.0.' )),
167+ isNot (contains (RegExp ('.*hosted2' ))),
168+ isNot (contains (RegExp ('.*git2' ))),
169+ isNot (contains (RegExp ('.*git_with_path2' ))),
170+ ]),
171+ );
156172 await runPub (
157173 args: ['cache' , 'gc' , '--force' , '--ignore-timestamp' ],
158174 output: allOf (
@@ -166,9 +182,7 @@ void main() async {
166182 ),
167183 contains (RegExp ('Deleting directory .*git.*git1-.*' )),
168184 contains (RegExp ('Deleting directory .*git.*git_with_path1-.*' )),
169- contains (
170- RegExp ('Deleting file .*hosted-hashes.*hosted1-1.0.0.sha256.' ),
171- ),
185+ contains (RegExp ('Deleting file .*hosted-hashes.*hosted1-1.0.0.sha256' )),
172186 contains (RegExp ('Deleting directory .*hosted.*hosted1-1.0.0.' )),
173187 isNot (contains (RegExp ('Deleting.*hosted2' ))),
174188 isNot (contains (RegExp ('Deleting.*git2' ))),
0 commit comments