diff --git a/ci_common/common.hocon b/ci_common/common.hocon
index d7086e35c8e313fe67ee633612331b95b11304c1..dbd8fe06aaf9c6ede08f96e6fc10bca416624004 100644
--- a/ci_common/common.hocon
+++ b/ci_common/common.hocon
@@ -1,7 +1,7 @@
 # java 7 is needed by Truffle (for now)
 java7 : {name : oraclejdk, version : "7",    platformspecific: true}
 # java 8 must be a jvmci enabled variant
-java8 : {name : labsjdk, version : "8u172-jvmci-0.46", platformspecific: true}
+java8 : {name : labsjdk, version : "8u172-jvmci-0.47", platformspecific: true}
 java9 : {name : oraclejdk, version : "9.0.4+11", platformspecific: true}
 
 java8Downloads : {
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RRuntime.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RRuntime.java
index 946ddaea7cfaba4cd64baf7d6ecc567425f10f84..952fd55f57d58ac2171a5fc353eb876fdcc93da0 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RRuntime.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RRuntime.java
@@ -450,7 +450,8 @@ public class RRuntime {
         // FIXME use R rules
         int result;
         try {
-            result = Integer.decode(Utils.trimLeadingZeros(s));  // decode supports hex constants
+            result = Integer.decode(Utils.trimLeadingZeros(s.trim()));  // decode supports hex
+                                                                        // constants
         } catch (NumberFormatException e) {
             if (exceptionOnFail) {
                 throw e;
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/conn/ConnectionSupport.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/conn/ConnectionSupport.java
index 27aa8990f60f910196567519034427656d83dd34..17d31db47076141ae5d86d857368007eb69bdf44 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/conn/ConnectionSupport.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/conn/ConnectionSupport.java
@@ -902,7 +902,7 @@ public class ConnectionSupport {
             if (s == null) {
                 return null;
             } else {
-                String[] lines = s.split("\n", 2);
+                String[] lines = TextConnections.splitLines(s, 2);
                 if (lines.length == 2) {
                     // we hit end of the line
                     if (lines[1].length() != 0) {
@@ -923,7 +923,7 @@ public class ConnectionSupport {
                             break;
                         }
 
-                        lines = s.split("\n", 2);
+                        lines = TextConnections.splitLines(s, 2);
                         if (lines.length == 2) {
                             // we hit end of the line
                             if (lines[1].length() != 0) {
@@ -947,7 +947,7 @@ public class ConnectionSupport {
          */
         @TruffleBoundary
         private String[] readLinesWithPushBack(int n, EnumSet<ReadLineWarning> warn, boolean skipNul) throws IOException {
-            // NOTE: 'n' may be negative indicating to read as much lines as available
+            // NOTE: 'n' may be negative indicating to read as many lines as available
             final List<String> res;
             if (n >= 0) {
                 res = new ArrayList<>(n);
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/conn/TextConnections.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/conn/TextConnections.java
index 7695a0d5bee9f6376ec3395a016b8869cbc13852..418df719cedeb6fc53a7486cdffaf15b7aaa309b 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/conn/TextConnections.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/conn/TextConnections.java
@@ -41,6 +41,55 @@ import com.oracle.truffle.r.runtime.env.REnvironment;
 import com.oracle.truffle.r.runtime.env.REnvironment.PutException;
 
 public class TextConnections {
+
+    public static String[] splitLines(String value, int limit) {
+        assert limit != 0;
+        ArrayList<String> strings = null;
+
+        int lastPos = 0;
+        int pos = 0;
+        while (pos < value.length()) {
+            char c = value.charAt(pos);
+            if (c == '\n' || c == '\r') {
+                if (strings == null) {
+                    strings = new ArrayList<>();
+                }
+                if (limit != -1 && strings.size() == limit - 1) {
+                    strings.add(value.substring(lastPos));
+                    return strings.toArray(new String[strings.size()]);
+                }
+                strings.add(value.substring(lastPos, pos));
+                // skip "\r\n" combination
+                if (c == '\r') {
+                    if ((pos + 1) < value.length()) {
+                        c = value.charAt(pos + 1);
+                        if (c == '\r') {
+                            // bug in GNU R: a second "\r" is immediately treated as a EOL
+                            if (limit != -1 && strings.size() == limit - 1) {
+                                strings.add(value.substring(pos + 2));
+                                return strings.toArray(new String[strings.size()]);
+                            }
+                            strings.add("");
+                        } else if (c == '\n') {
+                            pos++;
+                        }
+                    } else {
+                        // bug in GNU R: a final "\r" will be ignored
+                        return strings.toArray(new String[strings.size()]);
+                    }
+                }
+                lastPos = pos + 1;
+            }
+            pos++;
+        }
+        if (strings == null) {
+            return new String[]{value};
+        } else {
+            strings.add(value.substring(lastPos));
+            return strings.toArray(new String[strings.size()]);
+        }
+    }
+
     public static class TextRConnection extends BaseRConnection {
         protected String description;
         private final RAbstractStringVector object;
@@ -97,11 +146,13 @@ public class TextConnections {
             assert object != null;
             StringBuilder sb = new StringBuilder();
             for (int i = 0; i < object.getLength(); i++) {
+                if (i > 0) {
+                    sb.append('\n');
+                }
                 sb.append(object.getDataAt(i));
                 // vector elements are implicitly terminated with a newline
-                sb.append('\n');
             }
-            lines = sb.toString().split("\\n");
+            lines = splitLines(sb.toString(), -1);
         }
 
         @Override
diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ExpectedTestOutput.test b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ExpectedTestOutput.test
index bdb20bc4c554bb1876f4bd2856d4e5273ad45b52..4a61db00c5abe5a412be53699051d7d8ba0886b9 100644
--- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ExpectedTestOutput.test
+++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ExpectedTestOutput.test
@@ -1115,11 +1115,11 @@ Error in `Encoding<-`(`*tmp*`, value = "UTF-8") :
 #argv <- structure(list(x = 'abc', value = 'UTF-8'), .Names = c('x',     'value'));do.call('Encoding<-', argv)
 [1] "abc"
 
-##com.oracle.truffle.r.test.builtins.TestBuiltin_ISOdatetime.testISOdatetime1#Ignored.ImplementationError#
+##com.oracle.truffle.r.test.builtins.TestBuiltin_ISOdatetime.testISOdatetime1#
 #argv <- structure(list(year = 1970, month = 1, day = 1, hour = 0,     min = 0, sec = 0, tz = 'GMT'), .Names = c('year', 'month',     'day', 'hour', 'min', 'sec', 'tz'));do.call('ISOdatetime', argv)
 [1] "1970-01-01 GMT"
 
-##com.oracle.truffle.r.test.builtins.TestBuiltin_ISOdatetime.testISOdatetime2#Ignored.ImplementationError#
+##com.oracle.truffle.r.test.builtins.TestBuiltin_ISOdatetime.testISOdatetime2#
 #argv <- structure(list(year = 2002, month = 6, day = 24, hour = 0,     min = 0, sec = 10), .Names = c('year', 'month', 'day', 'hour',     'min', 'sec'));do.call('ISOdatetime', argv)
 [1] "2002-06-24 00:00:10 GMT"
 
@@ -7377,7 +7377,7 @@ NAs introduced by coercion to integer range
 [551]  4  4  2  4  4  4  4  3  2  3  3  2 NA  3  4  4  3  3  4  4  4  1  4  4  4
 [576]  4  4  4  4  2  4  2  3  4  1  3  1 NA  4  1  2  2  1  4  3  3  4  1  1  3
 
-##com.oracle.truffle.r.test.builtins.TestBuiltin_asinteger.testasinteger2#Ignored.ImplementationError#
+##com.oracle.truffle.r.test.builtins.TestBuiltin_asinteger.testasinteger2#
 #argv <- list(c('   33', '   34', '   35', '   36', '   37', '   38', '   18', '   19', '   20', '   21', '   22', '   23', '   36', '   37', '   38', '   39'));as.integer(argv[[1]]);
  [1] 33 34 35 36 37 38 18 19 20 21 22 23 36 37 38 39
 
@@ -7385,7 +7385,7 @@ NAs introduced by coercion to integer range
 #argv <- list(39);as.integer(argv[[1]]);
 [1] 39
 
-##com.oracle.truffle.r.test.builtins.TestBuiltin_asinteger.testasinteger3#Ignored.ImplementationError#
+##com.oracle.truffle.r.test.builtins.TestBuiltin_asinteger.testasinteger3#
 #argv <- list(c(-Inf, -8.5, -2.83333333333333, -1.41666666666667, -0.85, -0.566666666666666, -0.404761904761905, -0.303571428571428, -0.236111111111111, -0.188888888888889));as.integer(argv[[1]]);
  [1] NA -8 -2 -1  0  0  0  0  0  0
 Warning message:
@@ -45161,7 +45161,7 @@ logical(0)
 Warning message:
 In Ops.factor(argv[[1]]) : ‘!’ not meaningful for factors
 
-##com.oracle.truffle.r.test.builtins.TestBuiltin_operators.testoperators113#Ignored.ImplementationError#
+##com.oracle.truffle.r.test.builtins.TestBuiltin_operators.testoperators113#
 #argv <- list(structure(c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = c('fm2', 'original'), class = c('ordered', 'factor')), 'original');`!=`(argv[[1]],argv[[2]]);
   [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  [13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
@@ -51479,7 +51479,7 @@ Evaluation  city centre   suburbs
 #argv <- structure(list(x = structure(integer(0), .Dim = 0L, .Dimnames = structure(list(NULL),     .Names = ''), class = 'table')), .Names = 'x');do.call('provideDimnames', argv)
 < table of extent 0 >
 
-##com.oracle.truffle.r.test.builtins.TestBuiltin_psigamma.testpsigamma1#Ignored.Unimplemented#
+##com.oracle.truffle.r.test.builtins.TestBuiltin_psigamma.testpsigamma1#
 #argv <- list(c(-100, -3, -2, -1, 0, 1, 2, -99.9, -7.7, -3, -2.9, -2.8, -2.7, -2.6, -2.5, -2.4, -2.3, -2.2, -2.1, -2, -1.9, -1.8, -1.7, -1.6, -1.5, -1.4, -1.3, -1.2, -1.1, -1, -0.9, -0.8, -0.7, -0.6, -0.5, -0.4, -0.3, -0.2, -0.0999999999999996, 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3, 5.1, 77), 1); .Internal(psigamma(argv[[1]], argv[[2]]))
  [1]          Inf          Inf          Inf          Inf          Inf
  [6]   1.64493407   0.64493407 103.34587903  14.95761284          Inf
@@ -51497,11 +51497,11 @@ Evaluation  city centre   suburbs
 [66]   0.46780689   0.44721207   0.42833216   0.41096375   0.39493407
 [71]   0.21654883   0.01307171
 
-##com.oracle.truffle.r.test.builtins.TestBuiltin_psigamma.testpsigamma2#Ignored.Unimplemented#
+##com.oracle.truffle.r.test.builtins.TestBuiltin_psigamma.testpsigamma2#
 #argv <- list(c(1e+30, 1e+45, 1e+60, 1e+75, 1e+90), 2); .Internal(psigamma(argv[[1]], argv[[2]]))
 [1]  -1e-60  -1e-90 -1e-120 -1e-150 -1e-180
 
-##com.oracle.truffle.r.test.builtins.TestBuiltin_psigamma.testpsigamma3#Ignored.Unimplemented#
+##com.oracle.truffle.r.test.builtins.TestBuiltin_psigamma.testpsigamma3#
 #argv <- list(c(1e+20, 1e+30, 1e+40, 1e+50, 1e+60), 5); .Internal(psigamma(argv[[1]], argv[[2]]))
 [1]  2.4e-99 2.4e-149 2.4e-199 2.4e-249 2.4e-299
 
@@ -51871,7 +51871,7 @@ Error in quote() : 0 arguments passed to 'quote' which requires 1
 #quote(expr=...)
 ...
 
-##com.oracle.truffle.r.test.builtins.TestBuiltin_quote.testQuote#Ignored.ImplementationError#
+##com.oracle.truffle.r.test.builtins.TestBuiltin_quote.testQuote#
 #typeof(quote(a[,2])[[3]])
 [1] "symbol"
 
@@ -86035,6 +86035,62 @@ In writeChar(x, zz, nc, eos = NULL) :
 #{ s <- "äöüß"; rc <- rawConnection(raw(0), "w"); writeChar(s, rc); rawConnectionValue(rc) }
 [1] c3 a4 c3 b6 c3 bc c3 9f 00
 
+##com.oracle.truffle.r.test.library.base.TestConnections.testReadLines#
+#readLines(textConnection("foo"))
+[1] "foo"
+
+##com.oracle.truffle.r.test.library.base.TestConnections.testReadLines#
+#readLines(textConnection("foo\n"))
+[1] "foo" ""
+
+##com.oracle.truffle.r.test.library.base.TestConnections.testReadLines#
+#readLines(textConnection("foo\n\n\r"))
+[1] "foo" ""    ""
+
+##com.oracle.truffle.r.test.library.base.TestConnections.testReadLines#
+#readLines(textConnection("foo\n\n\rfoo"))
+[1] "foo" ""    ""    "foo"
+
+##com.oracle.truffle.r.test.library.base.TestConnections.testReadLines#
+#readLines(textConnection("foo\n\r"))
+[1] "foo" ""
+
+##com.oracle.truffle.r.test.library.base.TestConnections.testReadLines#
+#readLines(textConnection("foo\n\rfoo"))
+[1] "foo" ""    "foo"
+
+##com.oracle.truffle.r.test.library.base.TestConnections.testReadLines#
+#readLines(textConnection("foo\nfoo"))
+[1] "foo" "foo"
+
+##com.oracle.truffle.r.test.library.base.TestConnections.testReadLines#
+#readLines(textConnection("foo\r"))
+[1] "foo"
+
+##com.oracle.truffle.r.test.library.base.TestConnections.testReadLines#
+#readLines(textConnection("foo\r\n"))
+[1] "foo" ""
+
+##com.oracle.truffle.r.test.library.base.TestConnections.testReadLines#
+#readLines(textConnection("foo\r\nfoo"))
+[1] "foo" "foo"
+
+##com.oracle.truffle.r.test.library.base.TestConnections.testReadLines#
+#readLines(textConnection("foo\r\r\n"))
+[1] "foo" ""    ""    ""
+
+##com.oracle.truffle.r.test.library.base.TestConnections.testReadLines#
+#readLines(textConnection("foo\r\r\nfoo"))
+[1] "foo" ""    ""    "foo"
+
+##com.oracle.truffle.r.test.library.base.TestConnections.testReadLines#
+#readLines(textConnection("foo\rfoo"))
+[1] "foo" "foo"
+
+##com.oracle.truffle.r.test.library.base.TestConnections.testReadLines#
+#readLines(textConnection("foofoo"))
+[1] "foofoo"
+
 ##com.oracle.truffle.r.test.library.base.TestConnections.testReadLines#Output.MayIgnoreWarningContext#
 #{ zz <- file('',"w+b", blocking=F); writeBin(as.raw(c(97,98,99,100,0,101)), zz, useBytes=T); seek(zz, 0); res <- readLines(zz, 2, warn=F, skipNul=F); close(zz); res }
 [1] "abcd"
diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_ISOdatetime.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_ISOdatetime.java
index 93abc29148c9178e500664186779bd0fe853f52f..66bc30f4a8054aaeee925e1c2bf0867e54c7a018 100644
--- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_ISOdatetime.java
+++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_ISOdatetime.java
@@ -30,17 +30,13 @@ public class TestBuiltin_ISOdatetime extends TestBase {
 
     @Test
     public void testISOdatetime1() {
-        // FIXME FastR returns NA
-        assertEval(Ignored.ImplementationError,
-                        "argv <- structure(list(year = 1970, month = 1, day = 1, hour = 0,     min = 0, sec = 0, tz = 'GMT'), .Names = c('year', 'month',     'day', 'hour', 'min', 'sec', 'tz'));" +
-                                        "do.call('ISOdatetime', argv)");
+        assertEval("argv <- structure(list(year = 1970, month = 1, day = 1, hour = 0,     min = 0, sec = 0, tz = 'GMT'), .Names = c('year', 'month',     'day', 'hour', 'min', 'sec', 'tz'));" +
+                        "do.call('ISOdatetime', argv)");
     }
 
     @Test
     public void testISOdatetime2() {
-        // FIXME FastR returns NA
-        assertEval(Ignored.ImplementationError,
-                        "argv <- structure(list(year = 2002, month = 6, day = 24, hour = 0,     min = 0, sec = 10), .Names = c('year', 'month', 'day', 'hour',     'min', 'sec'));" +
-                                        "do.call('ISOdatetime', argv)");
+        assertEval("argv <- structure(list(year = 2002, month = 6, day = 24, hour = 0,     min = 0, sec = 10), .Names = c('year', 'month', 'day', 'hour',     'min', 'sec'));" +
+                        "do.call('ISOdatetime', argv)");
     }
 }
diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_asinteger.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_asinteger.java
index b4a10d805407ed648820074951978e381ca909b5..f601a4d29b9ce653d19fc104a8e5494dad869fe6 100644
--- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_asinteger.java
+++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_asinteger.java
@@ -34,16 +34,12 @@ public class TestBuiltin_asinteger extends TestBase {
 
     @Test
     public void testasinteger2() {
-        // FIXME according to docs a leading whitespace should be accepted
-        assertEval(Ignored.ImplementationError,
-                        "argv <- list(c('   33', '   34', '   35', '   36', '   37', '   38', '   18', '   19', '   20', '   21', '   22', '   23', '   36', '   37', '   38', '   39'));as.integer(argv[[1]]);");
+        assertEval("argv <- list(c('   33', '   34', '   35', '   36', '   37', '   38', '   18', '   19', '   20', '   21', '   22', '   23', '   36', '   37', '   38', '   39'));as.integer(argv[[1]]);");
     }
 
     @Test
     public void testasinteger3() {
-        // FIXME combination of Inf and a number causes AssertionError
-        assertEval(Ignored.ImplementationError,
-                        "argv <- list(c(-Inf, -8.5, -2.83333333333333, -1.41666666666667, -0.85, -0.566666666666666, -0.404761904761905, -0.303571428571428, -0.236111111111111, -0.188888888888889));as.integer(argv[[1]]);");
+        assertEval("argv <- list(c(-Inf, -8.5, -2.83333333333333, -1.41666666666667, -0.85, -0.566666666666666, -0.404761904761905, -0.303571428571428, -0.236111111111111, -0.188888888888889));as.integer(argv[[1]]);");
     }
 
     @Test
diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_operators.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_operators.java
index 3723255c2abe6ab33de28647d3fa6cf720b5b233..94996e3e0cd112ccc468241f5470daefa9c473a4 100644
--- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_operators.java
+++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_operators.java
@@ -602,9 +602,7 @@ public class TestBuiltin_operators extends TestBase {
 
     @Test
     public void testoperators113() {
-        // FIXME FastR output: Error in Ops.factor(c(2L, 2L, ...
-        assertEval(Ignored.ImplementationError,
-                        "argv <- list(structure(c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = c('fm2', 'original'), class = c('ordered', 'factor')), 'original');`!=`(argv[[1]],argv[[2]]);");
+        assertEval("argv <- list(structure(c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = c('fm2', 'original'), class = c('ordered', 'factor')), 'original');`!=`(argv[[1]],argv[[2]]);");
     }
 
     @Test
diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_psigamma.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_psigamma.java
index fd4a19fc23a0e26f1c3273406da1bebbdcad4b65..0b24f5a40e0f78295b39ba577d5938a0280a0a96 100644
--- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_psigamma.java
+++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_psigamma.java
@@ -29,18 +29,17 @@ public class TestBuiltin_psigamma extends TestBase {
 
     @Test
     public void testpsigamma1() {
-        assertEval(Ignored.Unimplemented,
-                        "argv <- list(c(-100, -3, -2, -1, 0, 1, 2, -99.9, -7.7, -3, -2.9, -2.8, -2.7, -2.6, -2.5, -2.4, -2.3, -2.2, -2.1, -2, -1.9, -1.8, -1.7, -1.6, -1.5, -1.4, -1.3, -1.2, -1.1, -1, -0.9, -0.8, -0.7, -0.6, -0.5, -0.4, -0.3, -0.2, -0.0999999999999996, 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3, 5.1, 77), 1); .Internal(psigamma(argv[[1]], argv[[2]]))");
+        assertEval("argv <- list(c(-100, -3, -2, -1, 0, 1, 2, -99.9, -7.7, -3, -2.9, -2.8, -2.7, -2.6, -2.5, -2.4, -2.3, -2.2, -2.1, -2, -1.9, -1.8, -1.7, -1.6, -1.5, -1.4, -1.3, -1.2, -1.1, -1, -0.9, -0.8, -0.7, -0.6, -0.5, -0.4, -0.3, -0.2, -0.0999999999999996, 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3, 5.1, 77), 1); .Internal(psigamma(argv[[1]], argv[[2]]))");
     }
 
     @Test
     public void testpsigamma2() {
-        assertEval(Ignored.Unimplemented, "argv <- list(c(1e+30, 1e+45, 1e+60, 1e+75, 1e+90), 2); .Internal(psigamma(argv[[1]], argv[[2]]))");
+        assertEval("argv <- list(c(1e+30, 1e+45, 1e+60, 1e+75, 1e+90), 2); .Internal(psigamma(argv[[1]], argv[[2]]))");
     }
 
     @Test
     public void testpsigamma3() {
-        assertEval(Ignored.Unimplemented, "argv <- list(c(1e+20, 1e+30, 1e+40, 1e+50, 1e+60), 5); .Internal(psigamma(argv[[1]], argv[[2]]))");
+        assertEval("argv <- list(c(1e+20, 1e+30, 1e+40, 1e+50, 1e+60), 5); .Internal(psigamma(argv[[1]], argv[[2]]))");
     }
 
     @Test
diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_quote.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_quote.java
index e2630a78c3bcfa02e7be3490700e8caa015c0bd0..437a4104ce3d5c63d9c41ccfb96c4d7d7fa0e399 100644
--- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_quote.java
+++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_quote.java
@@ -58,7 +58,7 @@ public class TestBuiltin_quote extends TestBase {
         assertEval("quote(expr=...)");
         assertEval("quote(...)");
 
-        assertEval(Ignored.ImplementationError, "typeof(quote(a[,2])[[3]])");
+        assertEval("typeof(quote(a[,2])[[3]])");
         assertEval(Ignored.ImplementationError, "{ res <- quote(a[,2])[[3]]; typeof(res) }");
     }
 
diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/base/TestConnections.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/base/TestConnections.java
index 55b38976abe9eac9efc4ba341b4e395149f4331f..6601a88357f7c6d637b6b1c8fd860db06438fa58 100644
--- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/base/TestConnections.java
+++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/base/TestConnections.java
@@ -208,6 +208,10 @@ public class TestConnections extends TestRBase {
         assertEval(Output.MayIgnoreWarningContext, TestBase.template(
                         "{ zz <- file('',\"w+b\", blocking=%0); writeBin(as.raw(%1), zz, useBytes=T); seek(zz, 0); res <- readLines(zz, 2, warn=%2, skipNul=%3); close(zz); res }",
                         LVAL, arr(lineWithNul, twoLinesOneNul, lineWithNulIncomp, twoLinesOneNulIncomp), LVAL, LVAL));
+
+        String[] endings = new String[]{"", "\\n", "\\r", "\\n\\r", "\\r\\n", "\\n\\n\\r", "\\r\\r\\n"};
+        String[] text = new String[]{"", "foo"};
+        assertEval(template("readLines(textConnection(\"foo%0%1\"))", endings, text));
     }
 
     @Test