From: Gerd von Egidy Date: Tue, 12 May 2015 08:20:16 +0000 (+0200) Subject: add test to make sure tmpofstream handles file creation errors gracefully X-Git-Tag: v2.8~27 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=a3a62b4050180f4337a84698c6e6e97c93b12996;p=libi2ncommon add test to make sure tmpofstream handles file creation errors gracefully --- diff --git a/test/test_tmpfstream.cpp b/test/test_tmpfstream.cpp index e7df227..36a6710 100644 --- a/test/test_tmpfstream.cpp +++ b/test/test_tmpfstream.cpp @@ -373,5 +373,11 @@ BOOST_AUTO_TEST_CASE(TmpfcopystreamChmod) unlink(".foobar"); } +BOOST_AUTO_TEST_CASE(CreateError) +{ + tmpofstream tmpf("/this/dir/really/does/not/exist/tmp.XXXXXX"); + + BOOST_CHECK_EQUAL( false, tmpf.is_open() ); +} BOOST_AUTO_TEST_SUITE_END()