From cc94673a3faa7a25e6448b26da878470ae3f0407 Mon Sep 17 00:00:00 2001 From: Ryan Downing <26515643+r-downing@users.noreply.github.com> Date: Tue, 31 Oct 2023 00:48:43 -0400 Subject: [PATCH] add example failing sort_simple_yaml test with comment with leading space --- tests/sort_simple_yaml_test.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tests/sort_simple_yaml_test.py b/tests/sort_simple_yaml_test.py index 6cbda85..d83774b 100644 --- a/tests/sort_simple_yaml_test.py +++ b/tests/sort_simple_yaml_test.py @@ -36,6 +36,32 @@ TEST_SORTS = [ ['# i am', '# a header'], RETVAL_GOOD, ), + + ( + [ + '# top of file', + '# header', + '', + 'b: 42', + '', + ' # a comment with leading space', + 'e: 1', + '', + 'c: true', + ], + [ + '# top of file', + '# header', + '', + 'b: 42', + '', + 'c: true', + '', + ' # a comment with leading space', + 'e: 1', + ], + RETVAL_BAD, + ), ]