summaryrefslogtreecommitdiff
path: root/test/files/run/t8015-ffc.scala
diff options
context:
space:
mode:
authorSom Snytt <som.snytt@gmail.com>2013-12-17 20:26:50 -0800
committerSom Snytt <som.snytt@gmail.com>2014-01-08 07:43:42 -0800
commitbb2e99a69201060b88dd25602def42f31ba9ab65 (patch)
tree7a3e3a16a0a5e9ee7221f26a6ec50464856989a3 /test/files/run/t8015-ffc.scala
parentada8d9156baad2d8a24c1a40e032eb4bc7154bac (diff)
downloadscala-bb2e99a69201060b88dd25602def42f31ba9ab65.tar.gz
scala-bb2e99a69201060b88dd25602def42f31ba9ab65.tar.bz2
scala-bb2e99a69201060b88dd25602def42f31ba9ab65.zip
SI-8015 Count lines by EOLs
Source lines were counted by "line break chars", including FF. Clients of `pos.line` seem to all expect the ordinary line num, so that is what they get. Unicode processing now precedes line ending processing.
Diffstat (limited to 'test/files/run/t8015-ffc.scala')
-rw-r--r--test/files/run/t8015-ffc.scala7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/files/run/t8015-ffc.scala b/test/files/run/t8015-ffc.scala
new file mode 100644
index 0000000000..fe6781be42
--- /dev/null
+++ b/test/files/run/t8015-ffc.scala
@@ -0,0 +1,7 @@
+
+object Test extends App {
+ val ms = """This is a long multiline string
+ with \u000d\u000a CRLF embedded."""
+ assert(ms.lines.size == 3, s"lines.size ${ms.lines.size}")
+ assert(ms contains "\r\n CRLF", "no CRLF")
+}