unit_test_example_13.cpp 621 B

1234567891011121314151617181920
  1. // (C) Copyright Gennadiy Rozental 2001-2014.
  2. // Distributed under the Boost Software License, Version 1.0.
  3. // (See accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. // See http://www.boost.org/libs/test for the library home page.
  6. //
  7. // ***************************************************************************
  8. #define BOOST_TEST_MODULE system call test example
  9. #include <boost/test/included/unit_test.hpp>
  10. BOOST_AUTO_TEST_CASE( broken_test )
  11. {
  12. #if defined(WIN32)
  13. BOOST_CHECK_EQUAL( ::system("cmd.exe /c dir"), 0 );
  14. #else
  15. BOOST_CHECK_EQUAL( ::system("ls"), 0 );
  16. #endif
  17. }