You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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.
5 years ago
..
rules Fix bug with CRLF in new-lines and require-starting-space 5 years ago
yaml-1.2-spec-examples Tests: Remove ghost character from YAML spec example 9 years ago
__init__.py Tests: Run with LC_ALL=C for uniform tests 9 years ago
common.py Drop support for EOL Python 2.6 6 years ago
test_cli.py Specify config with environment variable YAMLLINT_CONFIG_FILE 5 years ago
test_config.py feat: Lint .yamllint by default 5 years ago
test_linter.py Drop support for EOL Python 2.6 6 years ago
test_module.py Drop support for EOL Python 2.6 6 years ago
test_parser.py Upgrade unit tests to use more useful asserts 6 years ago
test_spec_examples.py Remove redundant parentheses 6 years ago
test_syntax_errors.py Rules: indentation: Handle sets 9 years ago
test_yamllint_directives.py Allow disabling all checks for a file 5 years ago