editorconfig 0.15.1 → 0.15.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/package.json +59 -59
  3. package/{dist/src → src}/cli.d.ts +0 -0
  4. package/{dist/src → src}/cli.js +0 -0
  5. package/{dist/src → src}/index.d.ts +0 -0
  6. package/{dist/src → src}/index.js +0 -0
  7. package/{dist/src → src}/lib/ini.d.ts +0 -0
  8. package/{dist/src → src}/lib/ini.js +0 -0
  9. package/.editorconfig +0 -17
  10. package/.gitattributes +0 -2
  11. package/.gitmodules +0 -4
  12. package/.travis.yml +0 -15
  13. package/CMakeLists.txt +0 -16
  14. package/dist/package.json +0 -59
  15. package/src/cli.ts +0 -47
  16. package/src/index.ts +0 -279
  17. package/src/lib/ini.ts +0 -66
  18. package/tests/.editorconfig +0 -11
  19. package/tests/.git +0 -1
  20. package/tests/CMakeLists.txt +0 -66
  21. package/tests/README.md +0 -37
  22. package/tests/cli/CMakeLists.txt +0 -49
  23. package/tests/cli/cli.in +0 -7
  24. package/tests/filetree/CMakeLists.txt +0 -81
  25. package/tests/filetree/parent_directory/parent_directory.in +0 -17
  26. package/tests/filetree/parent_directory.in +0 -16
  27. package/tests/filetree/path_separator.in +0 -15
  28. package/tests/filetree/root_file/root_file.in +0 -1
  29. package/tests/filetree/root_file.in +0 -4
  30. package/tests/filetree/root_mixed/root_file.in +0 -4
  31. package/tests/glob/CMakeLists.txt +0 -242
  32. package/tests/glob/braces.in +0 -63
  33. package/tests/glob/brackets.in +0 -47
  34. package/tests/glob/question.in +0 -7
  35. package/tests/glob/star.in +0 -9
  36. package/tests/glob/star_star.in +0 -15
  37. package/tests/glob/utf8char.in +0 -6
  38. package/tests/parser/CMakeLists.txt +0 -154
  39. package/tests/parser/basic.in +0 -16
  40. package/tests/parser/bom.in +0 -6
  41. package/tests/parser/comments.in +0 -58
  42. package/tests/parser/crlf.in +0 -6
  43. package/tests/parser/whitespace.in +0 -68
  44. package/tests/properties/CMakeLists.txt +0 -71
  45. package/tests/properties/indent_size_default.in +0 -11
  46. package/tests/properties/lowercase_names.in +0 -6
  47. package/tests/properties/lowercase_values.in +0 -15
  48. package/tests/properties/tab_width_default.in +0 -9
  49. package/tsconfig.json +0 -28
  50. package/tslint.json +0 -118
@@ -1,66 +0,0 @@
1
- #
2
- # Copyright (c) 2011-2012 EditorConfig Team
3
- # All rights reserved.
4
- #
5
- # Redistribution and use in source and binary forms, with or without
6
- # modification, are permitted provided that the following conditions are met:
7
- #
8
- # 1. Redistributions of source code must retain the above copyright notice,
9
- # this list of conditions and the following disclaimer.
10
- # 2. Redistributions in binary form must reproduce the above copyright notice,
11
- # this list of conditions and the following disclaimer in the documentation
12
- # and/or other materials provided with the distribution.
13
- #
14
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15
- # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
- # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
- # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
18
- # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19
- # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20
- # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21
- # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22
- # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23
- # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24
- # POSSIBILITY OF SUCH DAMAGE.
25
- #
26
-
27
-
28
- # Don't check any language compiler. This project is for EditorConfig Core
29
- # testing only.
30
- project(editorconfig-core-test NONE)
31
-
32
- # Only when we are using editorconfig-core-test independently should we check
33
- # cmake version, set EDITORCONFIG_CMD as cache string, and enable_testing()
34
- # here.
35
- if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
36
- cmake_minimum_required(VERSION 2.6)
37
- set(EDITORCONFIG_CMD "editorconfig" CACHE STRING "editorconfig command.")
38
- enable_testing()
39
- endif()
40
-
41
- # The most common test function
42
- function(new_ec_test name ec_file src_file regex)
43
- add_test(${name} ${EDITORCONFIG_CMD} -f ${ec_file}
44
- "${CMAKE_CURRENT_SOURCE_DIR}/${src_file}")
45
- set_tests_properties(${name} PROPERTIES PASS_REGULAR_EXPRESSION "${regex}")
46
- endfunction()
47
-
48
- # The tests that requires version specified
49
- function(new_ec_test_version name ec_file src_file regex version)
50
- add_test(${name} ${EDITORCONFIG_CMD} -b ${version} -f ${ec_file}
51
- "${CMAKE_CURRENT_SOURCE_DIR}/${src_file}")
52
- set_tests_properties(${name} PROPERTIES PASS_REGULAR_EXPRESSION "${regex}")
53
- endfunction()
54
-
55
- # The tests that requires the full path EditorConfig files
56
- function(new_ec_test_full_ec_file_path name ec_file src_file regex)
57
- add_test(${name} ${EDITORCONFIG_CMD} -f ${ec_file} "${src_file}")
58
- set_tests_properties(${name} PROPERTIES PASS_REGULAR_EXPRESSION "${regex}")
59
- endfunction()
60
-
61
- add_subdirectory(glob)
62
- add_subdirectory(properties)
63
- add_subdirectory(parser)
64
- add_subdirectory(filetree)
65
- add_subdirectory(cli)
66
-
package/tests/README.md DELETED
@@ -1,37 +0,0 @@
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
@@ -1,49 +0,0 @@
1
- #
2
- # Copyright (c) 2011-2012 EditorConfig Team
3
- # All rights reserved.
4
- #
5
- # Redistribution and use in source and binary forms, with or without
6
- # modification, are permitted provided that the following conditions are met:
7
- #
8
- # 1. Redistributions of source code must retain the above copyright notice,
9
- # this list of conditions and the following disclaimer.
10
- # 2. Redistributions in binary form must reproduce the above copyright notice,
11
- # this list of conditions and the following disclaimer in the documentation
12
- # and/or other materials provided with the distribution.
13
- #
14
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15
- # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
- # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
- # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
18
- # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19
- # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20
- # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21
- # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22
- # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23
- # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24
- # POSSIBILITY OF SUCH DAMAGE.
25
- #
26
-
27
- # Tests for version switches
28
-
29
- # test --version option returns version information
30
- add_test(test_long_version_switch ${EDITORCONFIG_CMD} --version)
31
- set_tests_properties(test_long_version_switch PROPERTIES
32
- PASS_REGULAR_EXPRESSION
33
- "^EditorConfig.* Version [0-9]+\\.[0-9]+\\.[0-9]+(-[a-z]+)?[ \t\n\r]$")
34
-
35
- # test -v option returns version information
36
- add_test(test_short_version_switch ${EDITORCONFIG_CMD} -v)
37
- set_tests_properties(test_short_version_switch PROPERTIES
38
- PASS_REGULAR_EXPRESSION
39
- "^EditorConfig.* Version [0-9]+\\.[0-9]+\\.[0-9]+(-[a-z]+)?[ \t\n\r]$")
40
-
41
- # Test for multiple input files
42
-
43
- # when files are specified on command line
44
- add_test(multiple_files_on_command_line ${EDITORCONFIG_CMD} -f cli.in
45
- "${CMAKE_CURRENT_SOURCE_DIR}/file1.c"
46
- "${CMAKE_CURRENT_SOURCE_DIR}/file2.cpp")
47
- set_tests_properties(multiple_files_on_command_line PROPERTIES
48
- PASS_REGULAR_EXPRESSION
49
- "^\\[${CMAKE_CURRENT_SOURCE_DIR}/file1.c\\][ \t]*[\n\r]+key1=value1[ \t]*[\n\r]+\\[${CMAKE_CURRENT_SOURCE_DIR}/file2.cpp\\][ \t]*[\n\r]+key2=value2[ \t\n\r]*$")
package/tests/cli/cli.in DELETED
@@ -1,7 +0,0 @@
1
- root = true
2
-
3
- [*.c]
4
- key1 = value1
5
-
6
- [*.cpp]
7
- key2 = value2
@@ -1,81 +0,0 @@
1
- #
2
- # Copyright (c) 2011-2012 EditorConfig Team
3
- # All rights reserved.
4
- #
5
- # Redistribution and use in source and binary forms, with or without
6
- # modification, are permitted provided that the following conditions are met:
7
- #
8
- # 1. Redistributions of source code must retain the above copyright notice,
9
- # this list of conditions and the following disclaimer.
10
- # 2. Redistributions in binary form must reproduce the above copyright notice,
11
- # this list of conditions and the following disclaimer in the documentation
12
- # and/or other materials provided with the distribution.
13
- #
14
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15
- # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
- # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
- # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
18
- # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19
- # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20
- # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21
- # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22
- # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23
- # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24
- # POSSIBILITY OF SUCH DAMAGE.
25
- #
26
-
27
-
28
- # Test for EditorConfig file in parent directory
29
- new_ec_test(parent_directory parent_directory.in parent_directory/test.a "^key=value[ \t\n\r]*$")
30
-
31
- # Test for EditorConfig file in parent directory and current directory
32
- new_ec_test(parent_and_current_dir parent_directory.in parent_directory/test.b "^key1=value1[ \t]*[\n\r]+key2=value2[ \t\n\r]*$")
33
-
34
- # Test for file in parent directory and overloaded by file in current directory
35
- new_ec_test(parent_dir_overload parent_directory.in parent_directory/test.c "^key=valueB[ \t\n\r]*$")
36
-
37
- # Test for file in parent directory and overloaded by file in current directory and repeated in current directory
38
- new_ec_test(parent_dir_overload_repeat parent_directory.in parent_directory/test.d "^key=value_c[ \t\n\r]*$")
39
-
40
- # Test for file in parent directory and overloaded by file in current directory and repeated in current directory, with different patterns
41
- new_ec_test(parent_dir_overload_repeat2 parent_directory.in parent_directory/test.e "^key=value_g[ \t\n\r]*$")
42
-
43
- # Test that search stops at root EditorConfig file
44
- new_ec_test(root_file root_file.in root_file/test.a "^[ \t\n\r]*$")
45
-
46
- # Test that search stops at root EditorConfig file
47
- new_ec_test(root_file_mixed_case root_file.in root_mixed/test.a "^child=true[ \t\n\r]*$")
48
-
49
- # Tests path separator match
50
- new_ec_test(path_separator path_separator.in path/separator "^key=value[ \t\n\r]*$")
51
-
52
- # Windows style path separator in the command line should work on Windows, but
53
- # should not work on other systems
54
- if(WIN32)
55
- set(path_separator_backslash_in_cmd_line_regex "^key=value[ \t\n\r]*$")
56
- else(WIN32)
57
- set(path_separator_backslash_in_cmd_line_regex "^[ \t\n\r]*$")
58
- endif(WIN32)
59
- new_ec_test_full_ec_file_path(path_separator_backslash_in_cmd_line
60
- path_separator.in "${CMAKE_CURRENT_SOURCE_DIR}\\\\path\\\\separator"
61
- ${path_separator_backslash_in_cmd_line_regex})
62
-
63
- # Tests path separator match below top of path
64
- new_ec_test(nested_path_separator path_separator.in nested/path/separator "^[ \t\n\r]*$")
65
-
66
- # Tests path separator match top of path only
67
- new_ec_test(top_level_path_separator path_separator.in top/of/path "^key=value[ \t\n\r]*$")
68
-
69
- # Tests path separator match top of path only
70
- new_ec_test(top_level_path_separator_neg path_separator.in not/top/of/path "^[ \t\n\r]*$")
71
-
72
- # Test Windows-style path separator (backslash) does not work
73
- new_ec_test(windows_separator path_separator.in windows/separator "^[ \t\n\r]*$")
74
-
75
- # Test again that Windows-style path separator (backslash) does not work
76
- new_ec_test(windows_separator2 path_separator.in windows/separator2 "^[ \t\n\r]*$")
77
-
78
- # Globs with backslash in it but should be considered as file name on Non-Windows system
79
- if(NOT WIN32)
80
- new_ec_test(backslash_not_on_windows path_separator.in "windows\\\\separator2" "^key=value[ \t\n\r]*$")
81
- endif()
@@ -1,17 +0,0 @@
1
- [test.b]
2
- key2=value2
3
-
4
- [test.c]
5
- key=valueB
6
-
7
- [test.d]
8
- key=value_b
9
-
10
- [test.d]
11
- key=value_c
12
-
13
- [test.e]
14
- key=value_f
15
-
16
- [*.e]
17
- key=value_g
@@ -1,16 +0,0 @@
1
- root = true
2
-
3
- [test.a]
4
- key=value
5
-
6
- [test.b]
7
- key1=value1
8
-
9
- [test.c]
10
- key=valueA
11
-
12
- [test.d]
13
- key=value_a
14
-
15
- [test.e]
16
- key=value_e
@@ -1,15 +0,0 @@
1
- ; test for path separator
2
-
3
- root=true
4
-
5
- [path/separator]
6
- key=value
7
-
8
- [/top/of/path]
9
- key=value
10
-
11
- [windows\separator]
12
- key=value
13
-
14
- [windows\\separator2]
15
- key=value
@@ -1 +0,0 @@
1
- root = true
@@ -1,4 +0,0 @@
1
- root = true
2
-
3
- [test.a]
4
- key=value
@@ -1,4 +0,0 @@
1
- root = TrUe
2
-
3
- [*.a]
4
- child=true
@@ -1,242 +0,0 @@
1
- #
2
- # Copyright (c) 2011-2014 EditorConfig Team
3
- # All rights reserved.
4
- #
5
- # Redistribution and use in source and binary forms, with or without
6
- # modification, are permitted provided that the following conditions are met:
7
- #
8
- # 1. Redistributions of source code must retain the above copyright notice,
9
- # this list of conditions and the following disclaimer.
10
- # 2. Redistributions in binary form must reproduce the above copyright notice,
11
- # this list of conditions and the following disclaimer in the documentation
12
- # and/or other materials provided with the distribution.
13
- #
14
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15
- # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
- # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
- # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
18
- # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19
- # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20
- # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21
- # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22
- # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23
- # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24
- # POSSIBILITY OF SUCH DAMAGE.
25
- #
26
-
27
-
28
- # Tests for *
29
-
30
- # matches a single characters
31
- new_ec_test(star_single star.in ace.c "^key=value[ \t\n\r]*$")
32
-
33
- # matches zero characters
34
- new_ec_test(star_zero star.in ae.c "^key=value[ \t\n\r]*$")
35
-
36
- # matches multiple characters
37
- new_ec_test(star_multiple star.in abcde.c "^key=value[ \t\n\r]*$")
38
-
39
- # does not match path separator
40
- new_ec_test(star_over_slash star.in a/e.c "^[ \t\n\r]*$")
41
-
42
- # star after a slash
43
- new_ec_test(star_after_slash star.in Bar/foo.txt "^keyb=valueb[ \t\n\r]*$")
44
-
45
- # Tests for ?
46
-
47
- # matches a single character
48
- new_ec_test(question_single question.in some.c "^key=value[ \t\n\r]*$")
49
-
50
- # does not match zero characters
51
- new_ec_test(question_zero question.in som.c "^[ \t\n\r]*$")
52
-
53
- # does not match multiple characters
54
- new_ec_test(question_multiple question.in something.c "^[ \t\n\r]*$")
55
-
56
-
57
- # Tests for [ and ]
58
-
59
- # close bracket inside
60
- new_ec_test(brackets_close_inside brackets.in ].g "^close_inside=true[ \t\n\r]*$")
61
-
62
- # close bracket outside
63
- new_ec_test(brackets_close_outside brackets.in b].g "^close_outside=true[ \t\n\r]*$")
64
-
65
- # negative close bracket inside
66
- new_ec_test(brackets_nclose_inside brackets.in c.g "^close_inside=false[ \t\n\r]*$")
67
-
68
- # negative close bracket outside
69
- new_ec_test(brackets_nclose_outside brackets.in c].g "^close_outside=false[ \t\n\r]*$")
70
-
71
- # character choice
72
- new_ec_test(brackets_choice brackets.in a.a "^choice=true[ \t\n\r]*$")
73
-
74
- # character choice 2
75
- new_ec_test(brackets_choice2 brackets.in c.a "^[ \t\n\r]*$")
76
-
77
- # negative character choice
78
- new_ec_test(brackets_nchoice brackets.in c.b "^choice=false[ \t\n\r]*$")
79
-
80
- # negative character choice 2
81
- new_ec_test(brackets_nchoice2 brackets.in a.b "^[ \t\n\r]*$")
82
-
83
- # character range
84
- new_ec_test(brackets_range brackets.in f.c "^range=true[ \t\n\r]*$")
85
-
86
- # character range 2
87
- new_ec_test(brackets_range2 brackets.in h.c "^[ \t\n\r]*$")
88
-
89
- # negative character range
90
- new_ec_test(brackets_nrange brackets.in h.d "^range=false[ \t\n\r]*$")
91
-
92
- # negative character range 2
93
- new_ec_test(brackets_nrange2 brackets.in f.d "^[ \t\n\r]*$")
94
-
95
- # range and choice
96
- new_ec_test(brackets_range_and_choice brackets.in e.e
97
- "^range_and_choice=true[ \t\n\r]*$")
98
-
99
- # character choice with a dash
100
- new_ec_test(brackets_choice_with_dash brackets.in -.f
101
- "^choice_with_dash=true[ \t\n\r]*$")
102
-
103
- # slash inside brackets
104
- new_ec_test(brackets_slash_inside1 brackets.in ab/cd.i
105
- "^[ \t\n\r]*$")
106
- new_ec_test(brackets_slash_inside2 brackets.in abecd.i
107
- "^[ \t\n\r]*$")
108
- new_ec_test(brackets_slash_inside3 brackets.in ab[e/]cd.i
109
- "^slash_inside=true[ \t\n\r]*$")
110
-
111
- # Tests for { and }
112
-
113
- # word choice
114
- new_ec_test(braces_word_choice1 braces.in test.py "^choice=true[ \t\n\r]*$")
115
- new_ec_test(braces_word_choice2 braces.in test.js "^choice=true[ \t\n\r]*$")
116
- new_ec_test(braces_word_choice3 braces.in test.html "^choice=true[ \t\n\r]*$")
117
- new_ec_test(braces_word_choice4 braces.in test.pyc "^[ \t\n\r]*$")
118
-
119
- # single choice
120
- new_ec_test(braces_single_choice braces.in {single}.b "^choice=single[ \t\n\r]*$")
121
- new_ec_test(braces_single_choice_negative braces.in .b "^[ \t\n\r]*$")
122
-
123
- # empty choice
124
- new_ec_test(braces_empty_choice braces.in {}.c "^empty=all[ \t\n\r]*$")
125
- new_ec_test(braces_empty_choice_negative braces.in .c "^[ \t\n\r]*$")
126
-
127
- # choice with empty word
128
- new_ec_test(braces_empty_word1 braces.in a.d "^empty=word[ \t\n\r]*$")
129
- new_ec_test(braces_empty_word2 braces.in ab.d "^empty=word[ \t\n\r]*$")
130
- new_ec_test(braces_empty_word3 braces.in ac.d "^empty=word[ \t\n\r]*$")
131
- new_ec_test(braces_empty_word4 braces.in a,.d "^[ \t\n\r]*$")
132
-
133
- # choice with empty words
134
- new_ec_test(braces_empty_words1 braces.in a.e "^empty=words[ \t\n\r]*$")
135
- new_ec_test(braces_empty_words2 braces.in ab.e "^empty=words[ \t\n\r]*$")
136
- new_ec_test(braces_empty_words3 braces.in ac.e "^empty=words[ \t\n\r]*$")
137
- new_ec_test(braces_empty_words4 braces.in a,.e "^[ \t\n\r]*$")
138
-
139
- # no closing brace
140
- new_ec_test(braces_no_closing braces.in {.f "^closing=false[ \t\n\r]*$")
141
- new_ec_test(braces_no_closing_negative braces.in .f "^[ \t\n\r]*$")
142
-
143
- # nested braces
144
- new_ec_test(braces_nested1 braces.in word,this}.g "^[ \t\n\r]*$")
145
- new_ec_test(braces_nested2 braces.in {also,this}.g "^[ \t\n\r]*$")
146
- new_ec_test(braces_nested3 braces.in word.g "^nested=true[ \t\n\r]*$")
147
- new_ec_test(braces_nested4 braces.in {also}.g "^nested=true[ \t\n\r]*$")
148
- new_ec_test(braces_nested5 braces.in this.g "^nested=true[ \t\n\r]*$")
149
-
150
- # closing inside beginning
151
- new_ec_test(braces_closing_in_beginning braces.in {},b}.h "^closing=inside[ \t\n\r]*$")
152
-
153
- # missing closing braces
154
- new_ec_test(braces_unmatched1 braces.in {{,b,c{d}.i "^unmatched=true[ \t\n\r]*$")
155
- new_ec_test(braces_unmatched2 braces.in {.i "^[ \t\n\r]*$")
156
- new_ec_test(braces_unmatched3 braces.in b.i "^[ \t\n\r]*$")
157
- new_ec_test(braces_unmatched4 braces.in c{d.i "^[ \t\n\r]*$")
158
- new_ec_test(braces_unmatched5 braces.in .i "^[ \t\n\r]*$")
159
-
160
- # escaped comma
161
- new_ec_test(braces_escaped_comma1 braces.in a,b.txt "^comma=yes[ \t\n\r]*$")
162
- new_ec_test(braces_escaped_comma2 braces.in a.txt "^[ \t\n\r]*$")
163
- new_ec_test(braces_escaped_comma3 braces.in cd.txt "^comma=yes[ \t\n\r]*$")
164
-
165
- # escaped closing brace
166
- new_ec_test(braces_escaped_brace1 braces.in e.txt "^closing=yes[ \t\n\r]*$")
167
- new_ec_test(braces_escaped_brace2 braces.in }.txt "^closing=yes[ \t\n\r]*$")
168
- new_ec_test(braces_escaped_brace3 braces.in f.txt "^closing=yes[ \t\n\r]*$")
169
-
170
- # escaped backslash
171
- new_ec_test(braces_escaped_backslash1 braces.in g.txt "^backslash=yes[ \t\n\r]*$")
172
- if(NOT WIN32) # this case is impossible on Windows.
173
- new_ec_test(braces_escaped_backslash2 braces.in \\\\.txt "^backslash=yes[ \t\n\r]*$")
174
- endif()
175
- new_ec_test(braces_escaped_backslash3 braces.in i.txt "^backslash=yes[ \t\n\r]*$")
176
-
177
- # patterns nested in braces
178
- new_ec_test(braces_patterns_nested1 braces.in some.j "^patterns=nested[ \t\n\r]*$")
179
- new_ec_test(braces_patterns_nested2 braces.in abe.j "^patterns=nested[ \t\n\r]*$")
180
- new_ec_test(braces_patterns_nested3 braces.in abf.j "^patterns=nested[ \t\n\r]*$")
181
- new_ec_test(braces_patterns_nested4 braces.in abg.j "^[ \t\n\r]*$")
182
- new_ec_test(braces_patterns_nested5 braces.in ace.j "^patterns=nested[ \t\n\r]*$")
183
- new_ec_test(braces_patterns_nested6 braces.in acf.j "^patterns=nested[ \t\n\r]*$")
184
- new_ec_test(braces_patterns_nested7 braces.in acg.j "^[ \t\n\r]*$")
185
- new_ec_test(braces_patterns_nested8 braces.in abce.j "^patterns=nested[ \t\n\r]*$")
186
- new_ec_test(braces_patterns_nested9 braces.in abcf.j "^patterns=nested[ \t\n\r]*$")
187
- new_ec_test(braces_patterns_nested10 braces.in abcg.j "^[ \t\n\r]*$")
188
- new_ec_test(braces_patterns_nested11 braces.in ae.j "^[ \t\n\r]*$")
189
- new_ec_test(braces_patterns_nested12 braces.in .j "^[ \t\n\r]*$")
190
-
191
- # numeric brace range
192
- new_ec_test(braces_numeric_range1 braces.in 1 "^[ \t\n\r]*$")
193
- new_ec_test(braces_numeric_range2 braces.in 3 "^number=true[ \t\n\r]*$")
194
- new_ec_test(braces_numeric_range3 braces.in 15 "^number=true[ \t\n\r]*$")
195
- new_ec_test(braces_numeric_range4 braces.in 60 "^number=true[ \t\n\r]*$")
196
- new_ec_test(braces_numeric_range5 braces.in 5a "^[ \t\n\r]*$")
197
- new_ec_test(braces_numeric_range6 braces.in 120 "^number=true[ \t\n\r]*$")
198
- new_ec_test(braces_numeric_range7 braces.in 121 "^[ \t\n\r]*$")
199
- new_ec_test(braces_numeric_range8 braces.in 060 "^[ \t\n\r]*$")
200
-
201
- # alphabetical brace range
202
- new_ec_test(braces_alpha_range1 braces.in {ardvark..antimater} "^words=a[ \t\n\r]*$")
203
- new_ec_test(braces_alpha_range1 braces.in a "^[ \t\n\r]*$")
204
- new_ec_test(braces_alpha_range3 braces.in aardvark "^[ \t\n\r]*$")
205
- new_ec_test(braces_alpha_range6 braces.in agreement "^[ \t\n\r]*$")
206
- new_ec_test(braces_alpha_range8 braces.in antelope "^[ \t\n\r]*$")
207
- new_ec_test(braces_alpha_range9 braces.in antimatter "^[ \t\n\r]*$")
208
-
209
-
210
- # Tests for **
211
-
212
- # test EditorConfig files with UTF-8 characters larger than 127
213
- new_ec_test(utf_8_char utf8char.in "中文.txt" "^key=value[ \t\n\r]*$")
214
-
215
- # matches over path separator
216
- new_ec_test(star_star_over_separator1 star_star.in a/z.c "^key1=value1[ \t\n\r]*$")
217
- new_ec_test(star_star_over_separator2 star_star.in amnz.c "^key1=value1[ \t\n\r]*$")
218
- new_ec_test(star_star_over_separator3 star_star.in am/nz.c "^key1=value1[ \t\n\r]*$")
219
- new_ec_test(star_star_over_separator4 star_star.in a/mnz.c "^key1=value1[ \t\n\r]*$")
220
- new_ec_test(star_star_over_separator5 star_star.in amn/z.c "^key1=value1[ \t\n\r]*$")
221
- new_ec_test(star_star_over_separator6 star_star.in a/mn/z.c "^key1=value1[ \t\n\r]*$")
222
-
223
- new_ec_test(star_star_over_separator7 star_star.in b/z.c "^key2=value2[ \t\n\r]*$")
224
- new_ec_test(star_star_over_separator8 star_star.in b/mnz.c "^key2=value2[ \t\n\r]*$")
225
- new_ec_test(star_star_over_separator9 star_star.in b/mn/z.c "^key2=value2[ \t\n\r]*$")
226
- new_ec_test(star_star_over_separator10 star_star.in bmnz.c "^[ \t\n\r]*$")
227
- new_ec_test(star_star_over_separator11 star_star.in bm/nz.c "^[ \t\n\r]*$")
228
- new_ec_test(star_star_over_separator12 star_star.in bmn/z.c "^[ \t\n\r]*$")
229
-
230
- new_ec_test(star_star_over_separator13 star_star.in c/z.c "^key3=value3[ \t\n\r]*$")
231
- new_ec_test(star_star_over_separator14 star_star.in cmn/z.c "^key3=value3[ \t\n\r]*$")
232
- new_ec_test(star_star_over_separator15 star_star.in c/mn/z.c "^key3=value3[ \t\n\r]*$")
233
- new_ec_test(star_star_over_separator16 star_star.in cmnz.c "^[ \t\n\r]*$")
234
- new_ec_test(star_star_over_separator17 star_star.in cm/nz.c "^[ \t\n\r]*$")
235
- new_ec_test(star_star_over_separator18 star_star.in c/mnz.c "^[ \t\n\r]*$")
236
-
237
- new_ec_test(star_star_over_separator19 star_star.in d/z.c "^key4=value4[ \t\n\r]*$")
238
- new_ec_test(star_star_over_separator20 star_star.in d/mn/z.c "^key4=value4[ \t\n\r]*$")
239
- new_ec_test(star_star_over_separator21 star_star.in dmnz.c "^[ \t\n\r]*$")
240
- new_ec_test(star_star_over_separator22 star_star.in dm/nz.c "^[ \t\n\r]*$")
241
- new_ec_test(star_star_over_separator23 star_star.in d/mnz.c "^[ \t\n\r]*$")
242
- new_ec_test(star_star_over_separator24 star_star.in dmn/z.c "^[ \t\n\r]*$")
@@ -1,63 +0,0 @@
1
- ; test { and }
2
-
3
- root=true
4
-
5
- ; word choice
6
- [*.{py,js,html}]
7
- choice=true
8
-
9
- ; single choice
10
- [{single}.b]
11
- choice=single
12
-
13
- ; empty choice
14
- [{}.c]
15
- empty=all
16
-
17
- ; choice with empty word
18
- [a{b,c,}.d]
19
- empty=word
20
-
21
- ; choice with empty words
22
- [a{,b,,c,}.e]
23
- empty=words
24
-
25
- ; no closing brace
26
- [{.f]
27
- closing=false
28
-
29
- ; nested braces
30
- [{word,{also},this}.g]
31
- nested=true
32
-
33
- ; closing inside beginning
34
- [{},b}.h]
35
- closing=inside
36
-
37
- ; opening inside beginning
38
- [{{,b,c{d}.i]
39
- unmatched=true
40
-
41
- ; escaped comma
42
- [{a\,b,cd}.txt]
43
- comma=yes
44
-
45
- ; escaped closing brace
46
- [{e,\},f}.txt]
47
- closing=yes
48
-
49
- ; escaped backslash
50
- [{g,\\,i}.txt]
51
- backslash=yes
52
-
53
- ; patterns nested in braces
54
- [{some,a{*c,b}[ef]}.j]
55
- patterns=nested
56
-
57
- ; numeric braces
58
- [{3..120}]
59
- number=true
60
-
61
- ; alphabetical
62
- [{aardvark..antelope}]
63
- words=a
@@ -1,47 +0,0 @@
1
- ; test [ and ]
2
-
3
- root=true
4
-
5
- ; Character choice
6
- [[ab].a]
7
- choice=true
8
-
9
- ; Negative character choice
10
- [[!ab].b]
11
- choice=false
12
-
13
- ; Character range
14
- [[d-g].c]
15
- range=true
16
-
17
- ; Negative character range
18
- [[!d-g].d]
19
- range=false
20
-
21
- ; Range and choice
22
- [[abd-g].e]
23
- range_and_choice=true
24
-
25
- ; Choice with dash
26
- [[-ab].f]
27
- choice_with_dash=true
28
-
29
- ; Close bracket inside
30
- [[\]ab].g]
31
- close_inside=true
32
-
33
- ; Close bracket outside
34
- [[ab]].g]
35
- close_outside=true
36
-
37
- ; Negative close bracket inside
38
- [[!\]ab].g]
39
- close_inside=false
40
-
41
- ; Negative¬close bracket outside
42
- [[!ab]].g]
43
- close_outside=false
44
-
45
- ; Slash inside brackets
46
- [ab[e/]cd.i]
47
- slash_inside=true
@@ -1,7 +0,0 @@
1
- ; test ?
2
-
3
- root=true
4
-
5
- [som?.c]
6
- key=value
7
-
@@ -1,9 +0,0 @@
1
- ; test *
2
-
3
- root=true
4
-
5
- [a*e.c]
6
- key=value
7
-
8
- [Bar/*]
9
- keyb=valueb