diff --git a/src/main/scala/uk/org/floop/sparqlTestRunner/Run.scala b/src/main/scala/uk/org/floop/sparqlTestRunner/Run.scala index 1b3a4e5..eafe78f 100644 --- a/src/main/scala/uk/org/floop/sparqlTestRunner/Run.scala +++ b/src/main/scala/uk/org/floop/sparqlTestRunner/Run.scala @@ -36,7 +36,7 @@ import scopt.OptionParser import scala.io.Source -import scala.xml.{NodeSeq, PCData, PrettyPrinter} +import scala.xml.{NodeSeq, PCData, PrettyPrinter, XML} case class Config(dir: File = new File("tests/sparql"), report: File = new File("reports/TESTS-sparql-test-runner.xml"), @@ -146,17 +146,15 @@ for (dir <- Option(config.report.getParentFile)) { dir.mkdirs } - val pp = new PrettyPrinter(80, 2) - val pw = new PrintWriter(config.report) - pw.write(pp.format( + XML.save(config.report.getPath, {results} - )) - pw.close() + , + enc = "UTF-8", xmlDecl = true) System.exit(if (!config.ignoreFail && (errors > 0 || failures > 0)) 1 else 0) case None => }