| 1 |
This project is a series of testing for [EditorConfig Core][editorconfig]. Please have |
| 2 |
[cmake][] installed before using this project. |
| 3 |
|
| 4 |
### Use editorconfig-core-test independently |
| 5 |
|
| 6 |
After installing cmake, switch to the root dir of this project, and execute: |
| 7 |
|
| 8 |
cmake -DEDITORCONFIG_CMD=the_editorconfig_core_cmd_you_want_to_test . |
| 9 |
|
| 10 |
After that, if testing files are generated successfully, execute `ctest .` to |
| 11 |
start testings. |
| 12 |
|
| 13 |
### Use editorconfig-core-test in your project as a git submodule |
| 14 |
|
| 15 |
If you are using [git][] and cmake to manage your project, this method should |
| 16 |
be suitable for you. |
| 17 |
|
| 18 |
Suppose that you will add editorconfig-core-test repo as a |
| 19 |
submodule in your root directory. First add editorconfig-core-test as a |
| 20 |
gitsubmodule in your repo by execute: |
| 21 |
|
| 22 |
git submodule add git://github.com/editorconfig/editorconfig-core-test.git tests |
| 23 |
|
| 24 |
Then add the following lines to your project root `CMakeLists.txt`: |
| 25 |
|
| 26 |
```cmake |
| 27 |
enable_testing() |
| 28 |
set(EDITORCONFIG_CMD the_editorconfig_core_path) |
| 29 |
add_subdirectory(tests) |
| 30 |
``` |
| 31 |
|
| 32 |
Now after executing `cmake .` in you project root dir, you should be able to |
| 33 |
run the testings by executing `ctest .`. |
| 34 |
|
| 35 |
[cmake]: http://www.cmake.org |
| 36 |
[editorconfig]: http://editorconfig.org |
| 37 |
[git]: http://git-scm.com |