Skip to content

Commit

Permalink
Update tests submodule
Browse files Browse the repository at this point in the history
Apply changes in response to editorconfig/editorconfig-core-test#28
  • Loading branch information
cxw42 committed Oct 20, 2019
1 parent 7e94861 commit 80d6d1b
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,8 @@ CTestTestfile.cmake

# Eclipse
.project

# Editor backup/temporary files
~*
*~
*.swp
3 changes: 2 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -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
17 changes: 14 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# CMakeLists.txt for core testing in
# editorconfig-core-c.
#
# Copyright (c) 2011-2019 EditorConfig Team
# All rights reserved.
Expand Down Expand Up @@ -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}-")
2 changes: 1 addition & 1 deletion tests

0 comments on commit 80d6d1b

Please sign in to comment.