70-71-copy.cpp 519 B

1234567891011121314151617181920
  1. // Copyright 2018 Peter Dimov.
  2. //
  3. // Distributed under the Boost Software License, Version 1.0.
  4. //
  5. // See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt
  7. // See library home page at http://www.boost.org/libs/filesystem
  8. #include <boost/filesystem.hpp>
  9. #include <boost/core/lightweight_test.hpp>
  10. namespace fs = boost::filesystem;
  11. int main()
  12. {
  13. BOOST_TEST_THROWS( fs::copy( "/tmp/non-existent-a", "/tmp/non-existent-b" ), std::exception );
  14. return boost::report_errors();
  15. }