git @ Cat's Eye Technologies Feedmark / 567268a
Add failing test case. Chris Pressey 2 years ago
1 changed file(s) with 15 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
4141 )
4242 os.unlink('feed.xml')
4343
44 def test_rewrite_markdown(self):
44 def test_rewrite_markdown_input_refdex(self):
4545 with open('foo.md', 'w') as f:
4646 f.write("""# Document
4747
5353 """)
5454 main(["foo.md", "--input-refdex={}/eg/refdex.json".format(self.prevdir), '--rewrite-markdown'])
5555 self.assert_file_contains('foo.md', '[2 Llamas Spotted Near Mall]: eg/Recent%20Llama%20Sightings.md#2-llamas-spotted-near-mall')
56 os.unlink('foo.md')
57
58 def test_rewrite_markdown_internal(self):
59 with open('foo.md', 'w') as f:
60 f.write("""# Document
61
62 ### Bubble & Squeak
63
64 Have you heard, [Bubble & Squeak]()?
65
66 [Bubble & Squeak]: TK
67 """)
68 main(["foo.md", '--output-refdex', '--rewrite-markdown'])
69 self.assert_file_contains('foo.md', '[Bubble & Squeak]: foo.md#bubble--squeak')
5670 os.unlink('foo.md')
5771
5872