Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Set file encoding to `UTF-8` for tests execution in Tycho

* Had to change the return type of the Snowman to `AnyRef` for
  the test to pass against both Scala 2.9 and Scala 2.10 (the
  returned name for the `String` type is different in 2.9 and
  2.10)

* Pass `-Dfile.encoding=UTF-8` to Tycho test task.
* Re-enabled encoding test.

Fix #120
  • Loading branch information...
commit e818b54bcb560cf12cba7b1b867b7f9f9013f6f5 1 parent 566577b
@dotta dotta authored
View
8 org.scalaide.worksheet.tests/src/org/scalaide/worksheet/runtime/WorksheetEvalTest.scala
@@ -301,20 +301,18 @@ object a {
"""
runTest("eval-test/wrongInstrumentationForLoops.sc", initial, expected)
}
-
- @Ignore("Unfortunately this tests fails on MacOSX when executed from the command line, while it works fine when executed inside Eclipse. " +
- "This test was created while working on a fix for the encoding issue reported in #124. We'll keep the mentioned ticket opened until this test is fixed")
+
@Test
def unicodeCharactersAreAllowed() {
val initial = """
object Snowman {
- def ☃ = "yes, this is a snowman"
+ def ☃ : AnyRef = "yes, this is a snowman"
println("%s".format(☃))
}
"""
val expected = """
object Snowman {
- def ☃ = "yes, this is a snowman" //> ☃ : => java.lang.String
+ def ☃ : AnyRef = "yes, this is a snowman" //> ☃ : => AnyRef
println("%s".format(☃)) //> yes, this is a snowman
}
"""
View
5 pom.xml
@@ -18,6 +18,11 @@
<name>Scala Worksheet</name>
<packaging>pom</packaging>
+ <properties>
+ <tycho.test.encoding>-Dfile.encoding=UTF-8</tycho.test.encoding>
+ <tycho.test.jvmArgs>-Xmx800m -XX:MaxPermSize=256m -Dsdtcore.headless ${tycho.test.encoding} ${tycho.test.weaving} ${tycho.test.OSspecific}</tycho.test.jvmArgs>
+ </properties>
+
<modules>
<module>org.scalaide.worksheet.runtime.library</module>
<module>org.scalaide.worksheet</module>
Please sign in to comment.
Something went wrong with that request. Please try again.