Add test/filesystem

This commit is contained in:
Peter Dimov
2018-10-05 05:02:43 +03:00
parent 9a7ae09a22
commit 206ffeffe0
3 changed files with 49 additions and 4 deletions
+8 -4
View File
@@ -12,6 +12,10 @@ branches:
- develop
- /feature\/.*/
environment:
- LIB=system
- LIB=filesystem
install:
- set BOOST_BRANCH=feature/cmake-config
- cd ..
@@ -21,16 +25,16 @@ install:
- git submodule update --init libs/config
- git submodule update --init tools/boostdep
- xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% tools\cmake_config\
- git submodule update --init libs/system
- python tools/boostdep/depinst/depinst.py system
- git submodule update --init libs/%LIB%
- python tools/boostdep/depinst/depinst.py %LIB%
- cmd /c bootstrap
build: off
test_script:
- b2 --prefix=C:\projects\.local tools/cmake_config/build//install
- b2 --prefix=C:\projects\.local libs/system/build//install link=static,shared
- cd tools\cmake_config\test\system
- b2 --prefix=C:\projects\.local libs/%LIB%/build//install link=static,shared
- cd tools\cmake_config\test\%LIB%
- mkdir __build__ && cd __build__
- cmake -DCMAKE_INSTALL_PREFIX=C:\projects\.local ..
- cmake --build . --config Debug
+17
View File
@@ -0,0 +1,17 @@
# Copyright 2018 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
cmake_minimum_required(VERSION 3.5)
project(CmakeConfigFilesystemTest LANGUAGES CXX)
find_package(boost_filesystem 1.69.0 EXACT CONFIG)
add_executable(main quick.cpp)
target_link_libraries(main Boost::filesystem)
enable_testing()
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
add_test(main main)
+24
View File
@@ -0,0 +1,24 @@
// Copyright 2017 Peter Dimov.
//
// Distributed under the Boost Software License, Version 1.0.
//
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
// See library home page at http://www.boost.org/libs/system
#include <boost/filesystem.hpp>
#include <boost/core/lightweight_test.hpp>
namespace fs = boost::filesystem;
int main()
{
fs::path p1( "a" );
fs::path p2 = p1 / "b";
BOOST_TEST_EQ( p2, "a/b" );
return boost::report_errors();
}