File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -21,12 +21,12 @@ class TestScripts {
21
21
(ret, sb.toString)
22
22
}
23
23
24
- private def deletePackages : Unit = {
25
- def delete (path : String ) = {
26
- val file = new JFile (path)
27
- if (file.exists) file.delete()
28
- }
24
+ private def delete (path : String ) = {
25
+ val file = new JFile (path)
26
+ if (file.exists) file.delete()
27
+ }
29
28
29
+ private def deletePackages : Unit = {
30
30
try {
31
31
for (jar <- Source .fromFile(" ./.packages" ).getLines())
32
32
delete(jar)
@@ -88,4 +88,11 @@ class TestScripts {
88
88
ret == 0 && ! output.contains(" rebuilding" ),
89
89
s " Project recompiled when it didn't need to be. Status $ret, output: $lineSep$output" )
90
90
}
91
+
92
+ /** dotc script should work after deleting .packages */
93
+ @ Test def reCreatesPackagesIfNecessary = doUnlessWindows {
94
+ delete(" ./.packages" )
95
+ val (retFirstBuild, _) = executeScript(" ./bin/dotc ./tests/pos/HelloWorld.scala" )
96
+ assert(retFirstBuild == 0 , " building dotc failed" )
97
+ }
91
98
}
You can’t perform that action at this time.
0 commit comments