diff options
author | Anthon van der Neut <anthon@mnt.org> | 2016-04-14 15:52:40 +0200 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2016-04-14 15:52:40 +0200 |
commit | 879d6d4e99f31436e2a9a9aed84c96817e766431 (patch) | |
tree | f34316628998e6e5ee83908e7387ab5b896f42dc /_test/test_indentation.py | |
parent | 9fd5fa35ed5aae678af14f2dbeed8f1a06e775b0 (diff) | |
download | ruamel.yaml-879d6d4e99f31436e2a9a9aed84c96817e766431.tar.gz |
added top_level_colon_align/prefix_colon0.11.9
Diffstat (limited to '_test/test_indentation.py')
-rw-r--r-- | _test/test_indentation.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/_test/test_indentation.py b/_test/test_indentation.py index 41f7ae9..954f231 100644 --- a/_test/test_indentation.py +++ b/_test/test_indentation.py @@ -151,6 +151,26 @@ class TestIndent: """, indent=2, block_seq_indent=2) +class TestYpkgIndent: + def test_00(self): + round_trip(""" + name : nano + version : 2.3.2 + release : 1 + homepage : http://www.nano-editor.org + source : + - http://www.nano-editor.org/dist/v2.3/nano-2.3.2.tar.gz : ff309248071486445609ad4269b798262a1324d7503dc09dea289f5b60106be8 + license : GPL-2.0 + summary : GNU nano is an easy-to-use text editor + builddeps : + - ncurses-devel + description: | + GNU nano is an easy-to-use text editor originally designed + as a replacement for Pico, the ncurses-based editor from the non-free mailer + package Pine (itself now available under the Apache License as Alpine). + """, indent=4, block_seq_indent=2, top_level_colon_align=True, prefix_colon=' ') + + def guess(s): x, y, z = load_yaml_guess_indent(dedent(s)) return y, z |