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

 ##########
 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:
   getRequiredResource returned a path inside a jar (e.g. 
file://path/to/foo.jar!/path/inside/jar.txt) and I could not find a way to 
easily get the contents of that file. I suspect in the past it found the file 
on the classpath so didn't need to look inside a jar. I'll reinvestigate this 
to figure out how to get the contents of a resource inside a jar.

----------------------------------------------------------------
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