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..028efdc 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,21 @@ 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") + # "=" means use the given CMake target, here, "editorconfig_bin". + # Used by tests/CMakeLists.txt, variable "is_target". 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..05653f1 160000 --- a/tests +++ b/tests @@ -1 +1 @@ -Subproject commit 2b983f50beb8fc3f8a09f12a0c16a2abb770390f +Subproject commit 05653f1e10d7508d24c9df9b0f2bb6b6f605d347