{
Promise<Unit> p;
auto f = p.getFuture();
+ // Calling setException() with an exception_ptr is deprecated,
+ // but don't complain about this in the test for this function.
+ FOLLY_PUSH_WARNING
+ FOLLY_GCC_DISABLE_WARNING("-Wdeprecated-declarations")
p.setException(std::make_exception_ptr(eggs));
+ FOLLY_POP_WARNING
EXPECT_THROW(f.value(), eggs_t);
}
{
EXPECT_EQ(command[2], "ls 'blah'\\''; rm -rf /'");
}
+// Tests for the deprecated shellify() function.
+// Don't warn about using this deprecated function in the test for it.
+FOLLY_PUSH_WARNING
+FOLLY_GCC_DISABLE_WARNING("-Wdeprecated-declarations")
TEST(Shell, Shellify_deprecated) {
auto command = shellify("rm -rf /");
EXPECT_EQ(command[0], "/bin/sh");
command = shellify("ls {}", "blah'; rm -rf /");
EXPECT_EQ(command[2], "ls 'blah'\\''; rm -rf /'");
}
+FOLLY_POP_WARNING