aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/scala/firrtlTests/DriverSpec.scala15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/test/scala/firrtlTests/DriverSpec.scala b/src/test/scala/firrtlTests/DriverSpec.scala
index 5bed2a2b..4e1add39 100644
--- a/src/test/scala/firrtlTests/DriverSpec.scala
+++ b/src/test/scala/firrtlTests/DriverSpec.scala
@@ -49,7 +49,7 @@ class DriverSpec extends FreeSpec with Matchers with BackendCompilationUtilities
optionsManager.makeTargetDir() should be (true)
dir = new java.io.File("a/b/c")
dir.exists() should be (true)
- FileUtils.deleteDirectoryHierarchy(commonOptions.targetDirName)
+ FileUtils.deleteDirectoryHierarchy("a") should be (true)
}
}
}
@@ -173,4 +173,17 @@ class DriverSpec extends FreeSpec with Matchers with BackendCompilationUtilities
}
}
}
+
+ "Directory deleter is handy for cleaning up after tests" - {
+ "for example making a directory tree, and deleting it looks like" in {
+ FileUtils.makeDirectory("dog/fox/wolf")
+ val dir = new File("dog/fox/wolf")
+ dir.exists() should be (true)
+ dir.isDirectory should be (true)
+
+ FileUtils.deleteDirectoryHierarchy("wolf") should be (false)
+ FileUtils.deleteDirectoryHierarchy("dog") should be (true)
+ dir.exists() should be (false)
+ }
+ }
}