Add failing test case.
Chris Pressey
2 years ago
41 | 41 | ) |
42 | 42 | os.unlink('feed.xml') |
43 | 43 | |
44 | def test_rewrite_markdown(self): | |
44 | def test_rewrite_markdown_input_refdex(self): | |
45 | 45 | with open('foo.md', 'w') as f: |
46 | 46 | f.write("""# Document |
47 | 47 | |
53 | 53 | """) |
54 | 54 | main(["foo.md", "--input-refdex={}/eg/refdex.json".format(self.prevdir), '--rewrite-markdown']) |
55 | 55 | 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') | |
56 | 70 | os.unlink('foo.md') |
57 | 71 | |
58 | 72 |