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 c0f95126e0139d6cd4fb898a526af5cd0cac8ab6..18096289c1c54fcdcbb1c194ed79055bc2c28a38 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
@@ -8361,6 +8361,22 @@ In Ops.factor(x, c("a", "b")) : > not meaningful for factors
 #{ x<-factor(c("a", "b", "a", "c")); x == c("a", "b") }
 [1]  TRUE  TRUE  TRUE FALSE
 
+##com.oracle.truffle.r.test.simple.TestSimpleBuiltins.testFactor
+#{ x<-factor(c("c", "b", "a", "c")); y<-c(1); y[1]<-x; y }
+[1] 3
+Warning message:
+In y[1] <- x :
+  number of items to replace is not a multiple of replacement length
+
+##com.oracle.truffle.r.test.simple.TestSimpleBuiltins.testFactor
+#{ x<-factor(c("c", "b", "a", "c")); y<-list(1); y[1]<-x; y }
+[[1]]
+[1] 3
+
+Warning message:
+In y[1] <- x :
+  number of items to replace is not a multiple of replacement length
+
 ##com.oracle.truffle.r.test.simple.TestSimpleBuiltins.testFactor
 #{data = c(1,2,2,3,1,2,3,3,1,2,3,3,1);fdata<-factor(data);levels(fdata) = c('I','II','III');print(fdata);}
  [1] I   II  II  III I   II  III III I   II  III III I
diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/all/AllTests.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/all/AllTests.java
index 8eebba212e98ac3df12947a53297b0a65497ed91..411642464f85eb4f715674488248d287d0565c33 100644
--- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/all/AllTests.java
+++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/all/AllTests.java
@@ -8153,6 +8153,16 @@ public class AllTests extends TestBase {
         assertEvalWarning("{ x<-factor(c(\"a\", \"b\", \"a\")); x == c(\"a\", \"b\") }");
     }
 
+    @Test
+    public void TestSimpleBuiltins_testFactor_9b48b1721b63ffee900121993a15bb82() {
+        assertEvalWarning("{ x<-factor(c(\"c\", \"b\", \"a\", \"c\")); y<-list(1); y[1]<-x; y }");
+    }
+
+    @Test
+    public void TestSimpleBuiltins_testFactor_ea50b4927f7021c815fba8b2628b3939() {
+        assertEvalWarning("{ x<-factor(c(\"c\", \"b\", \"a\", \"c\")); y<-c(1); y[1]<-x; y }");
+    }
+
     @Test
     public void TestSimpleBuiltins_testFileListing_9646bfd3fb553824f1f54cc5d04b8219() {
         assertEval("{ list.files(\"test/r/simple/data/tree1\") }");