diff --git a/tests/system/resources/catkin_pkgs/products_unicode/CMakeLists.txt b/tests/system/resources/catkin_pkgs/products_unicode/CMakeLists.txt new file mode 100644 index 00000000..bc420ea5 --- /dev/null +++ b/tests/system/resources/catkin_pkgs/products_unicode/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 2.8.3) +project(products_unicode) +find_package(catkin REQUIRED) + +catkin_package( + INCLUDE_DIRS include + LIBRARIES ${PROJECT_NAME}_lib + CFG_EXTRAS extras.cmake) + +include_directories(include) + +add_library(${PROJECT_NAME}_lib lib.cpp) +set_target_properties(${PROJECT_NAME}_lib PROPERTIES OUTPUT_NAME "${PROJECT_NAME}_lïb") +target_link_libraries(${PROJECT_NAME}_lib ${catkin_LIBRARIES}) + +add_executable(main main.cpp) +set_target_properties(main PROPERTIES OUTPUT_NAME "maïn") +target_link_libraries(main ${PROJECT_NAME}_lib ${catkin_LIBRARIES}) + +install(TARGETS ${PROJECT_NAME}_lib main + ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} + LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} + RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} + ) diff --git a/tests/system/resources/catkin_pkgs/products_unicode/cmake/extras.cmake.develspace.in b/tests/system/resources/catkin_pkgs/products_unicode/cmake/extras.cmake.develspace.in new file mode 100644 index 00000000..21ac7ca2 --- /dev/null +++ b/tests/system/resources/catkin_pkgs/products_unicode/cmake/extras.cmake.develspace.in @@ -0,0 +1 @@ +set($ENV{PRODUCTS_UNICODE} "devel") diff --git a/tests/system/resources/catkin_pkgs/products_unicode/cmake/extras.cmake.installspace.in b/tests/system/resources/catkin_pkgs/products_unicode/cmake/extras.cmake.installspace.in new file mode 100644 index 00000000..23cfeae6 --- /dev/null +++ b/tests/system/resources/catkin_pkgs/products_unicode/cmake/extras.cmake.installspace.in @@ -0,0 +1 @@ +set($ENV{PRODUCTS_UNICODE} "install") diff --git a/tests/system/resources/catkin_pkgs/products_unicode/include/make_products_0/fun.h b/tests/system/resources/catkin_pkgs/products_unicode/include/make_products_0/fun.h new file mode 100644 index 00000000..dd5dcb94 --- /dev/null +++ b/tests/system/resources/catkin_pkgs/products_unicode/include/make_products_0/fun.h @@ -0,0 +1,3 @@ +namespace make_products_0 { + int fun(); +} diff --git a/tests/system/resources/catkin_pkgs/products_unicode/lib.cpp b/tests/system/resources/catkin_pkgs/products_unicode/lib.cpp new file mode 100644 index 00000000..6911b46c --- /dev/null +++ b/tests/system/resources/catkin_pkgs/products_unicode/lib.cpp @@ -0,0 +1,4 @@ +#include +int make_products_0::fun() { + return 0; +} diff --git a/tests/system/resources/catkin_pkgs/products_unicode/main.cpp b/tests/system/resources/catkin_pkgs/products_unicode/main.cpp new file mode 100644 index 00000000..e9345a36 --- /dev/null +++ b/tests/system/resources/catkin_pkgs/products_unicode/main.cpp @@ -0,0 +1,6 @@ + +#include + +int main(int argc, char** argv) { + return make_products_0::fun(); +} diff --git a/tests/system/resources/catkin_pkgs/products_unicode/package.xml b/tests/system/resources/catkin_pkgs/products_unicode/package.xml new file mode 100644 index 00000000..078566e3 --- /dev/null +++ b/tests/system/resources/catkin_pkgs/products_unicode/package.xml @@ -0,0 +1,9 @@ + + + products_unicode + 0.1.0 + This package generates products in the make stage. + todo + BSD + catkin + diff --git a/tests/system/verbs/catkin_build/test_build.py b/tests/system/verbs/catkin_build/test_build.py index d9caa3a0..638105fd 100644 --- a/tests/system/verbs/catkin_build/test_build.py +++ b/tests/system/verbs/catkin_build/test_build.py @@ -301,3 +301,17 @@ def test_install_catkin_destdir(): setup_dir_correct = True break assert setup_dir_correct is True + + +def test_pkg_with_unicode_names(): + """Test building a package with unicode file names.""" + with redirected_stdio() as (out, err): + with workspace_factory() as wf: + print(os.getcwd) + wf.build() + shutil.copytree( + os.path.join(RESOURCES_DIR, 'catkin_pkgs', 'products_unicode'), + os.path.join('src/cmake_pkgs')) + + assert catkin_success(['config', '--link-devel']) + assert catkin_success(BUILD)