From 14c99da2bb2134d22868dce9360236ce03cc51c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Verg=C3=A9?= Date: Sun, 31 Jan 2016 22:09:18 +0100 Subject: [PATCH] Tests: Add test cases for empty flows --- tests/rules/test_syntax_error.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/rules/test_syntax_error.py b/tests/rules/test_syntax_error.py index 94faf0b..3796e6d 100644 --- a/tests/rules/test_syntax_error.py +++ b/tests/rules/test_syntax_error.py @@ -36,6 +36,16 @@ class YamlLintTestCase(RuleTestCase): 'doc: ument\n' '...\n', None, problem=(3, 1)) + def test_empty_flows(self): + self.check('---\n' + '- []\n' + '- {}\n' + '- [\n' + ']\n' + '- {\n' + '}\n' + '...\n', None) + def test_explicit_mapping(self): self.check('---\n' '? key\n'