summaryrefslogtreecommitdiff
path: root/test/files/run/numeric-range.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/numeric-range.scala')
-rw-r--r--test/files/run/numeric-range.scala13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/files/run/numeric-range.scala b/test/files/run/numeric-range.scala
new file mode 100644
index 0000000000..4645db6ef0
--- /dev/null
+++ b/test/files/run/numeric-range.scala
@@ -0,0 +1,13 @@
+
+
+
+
+object Test {
+ def main(args: Array[String]) {
+ val r = 'a' to 'z'
+ for (i <- -2 to (r.length + 2)) {
+ assert(r.take(i) == r.toList.take(i), (i, r.take(i)))
+ assert(r.drop(i) == r.toList.drop(i), (i, r.drop(i)))
+ }
+ }
+}