From 743ac7ffc260509a6f4480f06f590ec6129cbeb4 Mon Sep 17 00:00:00 2001
From: Lukas Stadler <lukas.stadler@oracle.com>
Date: Mon, 4 Jan 2016 16:45:19 +0100
Subject: [PATCH] disable substitute tests with faulty GNUR output

---
 .../src/com/oracle/truffle/r/test/TestBase.java             | 1 +
 .../truffle/r/test/builtins/TestBuiltin_substitute.java     | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/TestBase.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/TestBase.java
index 113bf5793e..cb7e4e6c3e 100644
--- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/TestBase.java
+++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/TestBase.java
@@ -57,6 +57,7 @@ public class TestBase {
         WrongCaller("tests that fail because the caller source is wrong in an error or warning"),
         ParserError("tests that fail because of bugs in the parser"),
         ImplementationError("tests that fail because of bugs in other parts of the runtime"),
+        ReferenceError("tests that fail because of faulty behavior in the reference implementation that we don't want to emulate"),
         SideEffects("tests that are ignored because they would interfere with other tests"),
         MissingWarning("tests that fail because of missing warnings"),
         MissingBuiltin("tests that fail because of missing builtins"),
diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_substitute.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_substitute.java
index 3c9a53344a..93df387765 100644
--- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_substitute.java
+++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_substitute.java
@@ -4,7 +4,7 @@
  * http://www.gnu.org/licenses/gpl-2.0.html
  *
  * Copyright (c) 2012-2014, Purdue University
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates
  *
  * All rights reserved.
  */
@@ -59,13 +59,13 @@ public class TestBuiltin_substitute extends TestBase {
         assertEval("{ env <- new.env() ; z <- 0 ; delayedAssign(\"var\", z+2, assign.env=env) ; substitute(var, env=env) }");
         assertEval("{ env <- new.env() ; z <- 0 ; delayedAssign(\"var\", z+2, assign.env=env) ; z <- 10 ; substitute(var, env=env) }");
 
-        assertEval("{ substitute(if(a) { x } else { x * a }, list(a = quote(x + y), x = 1)) }");
+        assertEval(Ignored.ReferenceError, "{ substitute(if(a) { x } else { x * a }, list(a = quote(x + y), x = 1)) }");
         assertEval("{ f <- function() { substitute(x(1:10), list(x=quote(sum))) } ; f() }");
         assertEval("{ substitute(x + y, list(x=1)) }");
         assertEval("{ f <- function(expra, exprb) { substitute(expra + exprb) } ; f(a * b, a + b) }");
 
         assertEval("{ f <- function(z) { g <- function(y) { substitute(y)  } ; g(z) } ; f(a + d) }");
-        assertEval("{ substitute(a[x], list(a = quote(x + y), x = 1)) }");
+        assertEval(Ignored.ReferenceError, "{ substitute(a[x], list(a = quote(x + y), x = 1)) }");
         assertEval("{ substitute(x <- x + 1, list(x = 1) }");
 
         assertEval(Ignored.Unknown, "{ f <- function(y) { substitute(y) } ; f() }");
-- 
GitLab