summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
Diffstat (limited to 'test/files')
-rw-r--r--test/files/neg/t7292-deprecation.check12
-rw-r--r--test/files/neg/t7292-deprecation.flags1
-rw-r--r--test/files/neg/t7292-deprecation.scala5
-rw-r--r--test/files/neg/t7292-removal.check10
-rw-r--r--test/files/neg/t7292-removal.flags1
-rw-r--r--test/files/neg/t7292-removal.scala5
6 files changed, 34 insertions, 0 deletions
diff --git a/test/files/neg/t7292-deprecation.check b/test/files/neg/t7292-deprecation.check
new file mode 100644
index 0000000000..c7e6111962
--- /dev/null
+++ b/test/files/neg/t7292-deprecation.check
@@ -0,0 +1,12 @@
+t7292-deprecation.scala:2: warning: Octal escape literals are deprecated, use /u0000 instead.
+ val chr1 = '/0'
+ ^
+t7292-deprecation.scala:3: warning: Octal escape literals are deprecated, use /u0053 instead.
+ val str1 = "abc/123456"
+ ^
+t7292-deprecation.scala:4: warning: Octal escape literals are deprecated, use /n instead.
+ val lf = '/012'
+ ^
+error: No warnings can be incurred under -Xfatal-warnings.
+three warnings found
+one error found
diff --git a/test/files/neg/t7292-deprecation.flags b/test/files/neg/t7292-deprecation.flags
new file mode 100644
index 0000000000..7de3c0f3ee
--- /dev/null
+++ b/test/files/neg/t7292-deprecation.flags
@@ -0,0 +1 @@
+-Xfatal-warnings -deprecation
diff --git a/test/files/neg/t7292-deprecation.scala b/test/files/neg/t7292-deprecation.scala
new file mode 100644
index 0000000000..d857f0e1ec
--- /dev/null
+++ b/test/files/neg/t7292-deprecation.scala
@@ -0,0 +1,5 @@
+object OctalEscapes {
+ val chr1 = '\0'
+ val str1 = "abc\123456"
+ val lf = '\012'
+}
diff --git a/test/files/neg/t7292-removal.check b/test/files/neg/t7292-removal.check
new file mode 100644
index 0000000000..fffd0a1104
--- /dev/null
+++ b/test/files/neg/t7292-removal.check
@@ -0,0 +1,10 @@
+t7292-removal.scala:2: error: Octal escape literals are unsupported, use /u0000 instead.
+ val chr1 = '/0'
+ ^
+t7292-removal.scala:3: error: Octal escape literals are unsupported, use /u0053 instead.
+ val str1 = "abc/123456"
+ ^
+t7292-removal.scala:4: error: Octal escape literals are unsupported, use /n instead.
+ val lf = '/012'
+ ^
+three errors found
diff --git a/test/files/neg/t7292-removal.flags b/test/files/neg/t7292-removal.flags
new file mode 100644
index 0000000000..29f4ede37a
--- /dev/null
+++ b/test/files/neg/t7292-removal.flags
@@ -0,0 +1 @@
+-Xfuture
diff --git a/test/files/neg/t7292-removal.scala b/test/files/neg/t7292-removal.scala
new file mode 100644
index 0000000000..d857f0e1ec
--- /dev/null
+++ b/test/files/neg/t7292-removal.scala
@@ -0,0 +1,5 @@
+object OctalEscapes {
+ val chr1 = '\0'
+ val str1 = "abc\123456"
+ val lf = '\012'
+}