Skip to content

Commit 8450ff0

Browse files
Martijn HoekstraMartijn Hoekstra
authored andcommitted
move encoding tests to pos-special
1 parent 5c5539b commit 8450ff0

File tree

6 files changed

+13
-3
lines changed

6 files changed

+13
-3
lines changed

test/dotc/tests.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ class tests extends CompilerTest {
3737
val allowDoubleBindings = defaultOptions diff List("-Yno-double-bindings")
3838
val scala2mode = List("-language:Scala2")
3939

40+
val explicitUTF8 = List("-encoding", "UTF8")
41+
val explicitUTF16 = List("-encoding", "UTF16")
42+
4043
val testsDir = "./tests/"
4144
val posDir = testsDir + "pos/"
4245
val posSpecialDir = testsDir + "pos-special/"
@@ -116,6 +119,8 @@ class tests extends CompilerTest {
116119
compileFile(posSpecialDir, "spec-t5545/S_1")
117120
compileFile(posSpecialDir, "spec-t5545/S_2")
118121
}
122+
@Test def pos_utf8 = compileFile(posSpecialDir, "utf8encoded", explicitUTF8)
123+
@Test def pos_utf16 = compileFile(posSpecialDir, "utf16encoded", explicitUTF16)
119124

120125
@Test def new_all = compileFiles(newDir, twice)
121126
@Test def repl_all = replFiles(replDir)

tests/pos-special/utf16encoded.scala

324 Bytes
Binary file not shown.

tests/pos-special/utf8encoded.scala

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//this file is saved as UTF-8
2+
object Test {
3+
def main(args: Array[String]): Unit = {
4+
val testchar = '⇒'
5+
println(testchar == '\u21D2')
6+
}
7+
8+
}

tests/run/utf16encoded.check

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/run/utf8encoded.check

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/run/utf8encoded.flags

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)