Add (failing) test
This commit is contained in:
parent
e4821f02cd
commit
9d87d533f4
22
tests/12-headlines-with-skip-levels.org
Normal file
22
tests/12-headlines-with-skip-levels.org
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#+TITLE: 12-Headlines with skip levels
|
||||||
|
#+DESCRIPTION: Simple org file to test Headlines with skip levels
|
||||||
|
#+TODO: TODO(t) PAUSED(p) | DONE(d)
|
||||||
|
|
||||||
|
* Level 1
|
||||||
|
:PROPERTIES:
|
||||||
|
:ID: 12-headlines-with-skip-levels
|
||||||
|
:CREATED: [2020-01-01 Wed 01:01]
|
||||||
|
:END:
|
||||||
|
|
||||||
|
*** Level 3
|
||||||
|
|
||||||
|
*** Level 3-2
|
||||||
|
|
||||||
|
* Level 1-2
|
||||||
|
|
||||||
|
** Level 2
|
||||||
|
|
||||||
|
**** Level 4
|
||||||
|
|
||||||
|
*** Level3
|
||||||
|
|
@ -757,6 +757,13 @@ class TestSerde(unittest.TestCase):
|
|||||||
self.assertEqual(children[3].children[0].content, ['2.1'])
|
self.assertEqual(children[3].children[0].content, ['2.1'])
|
||||||
self.assertEqual(children[3].children[1].content, ['2.2'])
|
self.assertEqual(children[3].children[1].content, ['2.2'])
|
||||||
|
|
||||||
|
def test_mimic_write_file_12(self):
|
||||||
|
with open(os.path.join(DIR, "12-headlines-with-skip-levels.org")) as f:
|
||||||
|
orig = f.read()
|
||||||
|
doc = loads(orig)
|
||||||
|
|
||||||
|
self.assertEqual(dumps(doc), orig)
|
||||||
|
|
||||||
|
|
||||||
def print_tree(tree, indentation=0, headline=None):
|
def print_tree(tree, indentation=0, headline=None):
|
||||||
for element in tree:
|
for element in tree:
|
||||||
|
Loading…
Reference in New Issue
Block a user