]> source.dussan.org Git - sonarqube.git/commitdiff
Fix test on Windows
authorJulien HENRY <julien.henry@sonarsource.com>
Fri, 21 Nov 2014 17:21:16 +0000 (18:21 +0100)
committerJulien HENRY <julien.henry@sonarsource.com>
Fri, 21 Nov 2014 17:21:16 +0000 (18:21 +0100)
sonar-batch/src/test/java/org/sonar/batch/source/CodeColorizersTest.java

index 605624780f2e5a2a5f0cafab561ee59a1781a066..3932cdbb630801f6839dc0452920762e23481e49 100644 (file)
@@ -62,9 +62,9 @@ public class CodeColorizersTest {
     CodeColorizers codeColorizers = new CodeColorizers(Arrays.<CodeColorizerFormat>asList(new JavaScriptColorizerFormat()));
 
     File fileWithBom = temp.newFile();
-    FileUtils.write(fileWithBom, "\uFEFF");
+    FileUtils.write(fileWithBom, "\uFEFF", "UTF-8");
     File jsFile = new File(this.getClass().getResource("CodeColorizersTest/Person.js").toURI());
-    FileUtils.write(fileWithBom, FileUtils.readFileToString(jsFile), true);
+    FileUtils.write(fileWithBom, FileUtils.readFileToString(jsFile), "UTF-8", true);
 
     SyntaxHighlightingData syntaxHighlighting = codeColorizers.toSyntaxHighlighting(fileWithBom, "UTF-8", "js");