yamllint/tests
Brad Solomon 512fe17047
Fix bug with CRLF in new-lines and require-starting-space
Pound-signs followed by a lone CRLF should not
raise if require-starting-space is specified.

If require-starting-space is true, *and* either:
- new-lines: disbale, or
- newlines: type: dos
is specified, a line with `#\r` or `#\r\n` should
not raise a false positive.

This commit also uses a Set for O(1) membership testing
and uses the correct escape sequence for the nul byte.

If we find a CRLF when looking for Unix newlines, yamllint
should always raise, regardless of logic with
require-starting-space.

Closes: Issue #171.
2020-04-30 16:38:19 +02:00
..
rules Fix bug with CRLF in new-lines and require-starting-space 2020-04-30 16:38:19 +02:00
yaml-1.2-spec-examples Tests: Remove ghost character from YAML spec example 2016-02-01 23:27:49 +01:00
__init__.py Tests: Run with LC_ALL=C for uniform tests 2016-06-28 11:04:50 +02:00
common.py Drop support for EOL Python 2.6 2018-11-26 19:09:47 +01:00
test_cli.py Specify config with environment variable YAMLLINT_CONFIG_FILE 2020-04-28 11:13:32 +02:00
test_config.py feat: Lint .yamllint by default 2019-08-26 10:01:40 +02:00
test_linter.py Drop support for EOL Python 2.6 2018-11-26 19:09:47 +01:00
test_module.py Drop support for EOL Python 2.6 2018-11-26 19:09:47 +01:00
test_parser.py Upgrade unit tests to use more useful asserts 2018-11-26 19:09:47 +01:00
test_spec_examples.py Remove redundant parentheses 2018-11-26 19:09:47 +01:00
test_syntax_errors.py Rules: indentation: Handle sets 2016-02-01 17:52:46 +01:00
test_yamllint_directives.py Allow disabling all checks for a file 2019-11-19 11:26:31 +01:00