mbeckerle commented on a change in pull request #50: Move CLI tests to sbt 
integration
URL: https://github.com/apache/incubator-daffodil/pull/50#discussion_r171349876
 
 

 ##########
 File path: daffodil-cli/src/it/scala/org/apache/daffodil/CLI/Util.scala
 ##########
 @@ -43,9 +42,8 @@ object Util {
   val binPath = Paths.get(dafRoot, "daffodil-cli", "target", "universal", 
"stage", "bin", String.format("daffodil%s", (if (isWindows) ".bat" else 
""))).toString()
 
   def getExpectedString(filename: String, convertToDos: Boolean = false): 
String = {
-    val rsrc = Misc.getRequiredResource(outputDir + filename)
-    //val source = scala.io.Source.fromFile(outputDir + filename)
-    val source = scala.io.Source.fromFile(rsrc)
+    val is = getClass.getResourceAsStream(outputDir + filename)
 
 Review comment:
   There is a reason to use the Misc library, which is that you get a 
diagnostic that lists out the classpath including all the directories, jars, 
etc. if the thing isn't found. I think it fixes up the typical "no leading 
slash" problem as well.  I think I wrote the Misc.getRequiredResource when 
trying to debug classpath issues with include/import. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to