diff --git a/test/testmemleak.cpp b/test/testmemleak.cpp index 837d41b08..3bb06feff 100644 --- a/test/testmemleak.cpp +++ b/test/testmemleak.cpp @@ -207,6 +207,7 @@ private: TEST_CASE(autoptr1); TEST_CASE(free_member_in_sub_func); TEST_CASE(if_with_and); + TEST_CASE(assign_pclose); } @@ -2110,6 +2111,16 @@ private: "}\n", true); ASSERT_EQUALS("", errout.str()); } + + void assign_pclose() + { + check("void f()\n" + "{\n" + " FILE *f = popen (\"test\", \"w\");\n" + " int a = pclose(f);\n" + "}\n"); + TODO_ASSERT_EQUALS(std::string(""), errout.str()); + } }; REGISTER_TEST(TestMemleak)