From 80d6d1b864a301702c75c91950825359f6dd1dd0 Mon Sep 17 00:00:00 2001 From: Chris White Date: Sun, 14 Jul 2019 21:49:14 -0400 Subject: [PATCH] Update tests submodule Apply changes in response to editorconfig/editorconfig-core-test#28 --- .editorconfig | 6 ++++++ .gitignore | 5 +++++ .gitmodules | 3 ++- CMakeLists.txt | 17 ++++++++++++++--- tests | 2 +- 5 files changed, 28 insertions(+), 5 deletions(-) diff --git a/.editorconfig b/.editorconfig index 3cba8d9..036d2ba 100644 --- a/.editorconfig +++ b/.editorconfig @@ -17,3 +17,9 @@ max_line_length = 80 [*.sh] indent_style = space indent_size = 2 +[*.yml] +indent_style = space +indent_size = 2 +[*.ps1] +indent_style = space +indent_size = 4 diff --git a/.gitignore b/.gitignore index 2078e8c..32cae37 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,8 @@ CTestTestfile.cmake # Eclipse .project + +# Editor backup/temporary files +~* +*~ +*.swp diff --git a/.gitmodules b/.gitmodules index a456cb1..f59400b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,4 @@ [submodule "tests"] path = tests - url = git://github.com/editorconfig/editorconfig-core-test.git + url = https://github.com/cxw42/editorconfig-core-test.git + branch = cxwtest diff --git a/CMakeLists.txt b/CMakeLists.txt index 690c8da..08cf369 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,5 @@ +# CMakeLists.txt for core testing in +# editorconfig-core-c. # # Copyright (c) 2011-2019 EditorConfig Team # All rights reserved. @@ -98,14 +100,23 @@ add_subdirectory(src) add_subdirectory(doc) add_subdirectory(include) -# Testing. Type "make test" to run tests. Only if the test submodule is -# checkouted should we do this +# Testing. Type "make test" to run tests. Only do this if the test submodule is +# checked out. if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/tests/CMakeLists.txt) enable_testing() - set(EDITORCONFIG_CMD "${PROJECT_BINARY_DIR}/bin/editorconfig") + set(EDITORCONFIG_CMD "editorconfig_bin") + set(EDITORCONFIG_CMD_IS_TARGET TRUE) + # TRUE => use the given CMake target, here, "editorconfig_bin", + # rather than an executable file named "editorconfig_bin". + # Used by tests/CMakeLists.txt. add_subdirectory(tests) + message(STATUS "Tests enabled") else() message(WARNING " Testing files are not found. Testing will not be available. If you obtained the source tree through git, please run `git submodule update --init` to update the tests submodule.") endif() +# This is a way to find the EXE name for debugging. However, it issues a +# CMake warning under policy CMP0026. +#get_target_property(out_name editorconfig_bin LOCATION) +#message(STATUS "main: Editorconfig binary will be in -${out_name}-") diff --git a/tests b/tests index 2b983f5..5a8d0fb 160000 --- a/tests +++ b/tests @@ -1 +1 @@ -Subproject commit 2b983f50beb8fc3f8a09f12a0c16a2abb770390f +Subproject commit 5a8d0fb80006469ec00a5a90f3e61a8d6addc84d