Move NeoMutt integration guides and client contract into CLI releases
This commit is contained in:
1 parent
e3f1be2f6f
commit
7fa71eceb1
8 files changed
+219
-5
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import contextlib
|
||||
import io
|
||||
import os
|
||||
import re
|
||||
from pathlib import Path
|
||||
import runpy
|
||||
import tempfile
|
||||
@@ -10,6 +11,17 @@ import urllib.request
|
||||
from tools.publish import SameOriginRedirect, main
|
||||
|
||||
class DistributionTests(unittest.TestCase):
|
||||
def test_documentation_links_and_neomutt_example(self):
|
||||
root=Path(__file__).resolve().parent
|
||||
for document in [root/'README.md',root/'DISTRIBUTION.md',*sorted((root/'docs').glob('*.md'))]:
|
||||
for target in re.findall(r'\]\(([^)]+)\)',document.read_text()):
|
||||
if '://' in target or target.startswith('#'):continue
|
||||
self.assertTrue((document.parent/target.split('#',1)[0]).is_file(),(document.name,target))
|
||||
example=(root/'examples/neomuttrc').read_text()
|
||||
self.assertIn('pages task from-mail<enter>',example)
|
||||
self.assertIn('pages contacts query --neomutt -- %s',example)
|
||||
self.assertNotIn('--include-body',example)
|
||||
|
||||
def test_version_matches(self):
|
||||
module=runpy.run_path(str(Path(__file__).with_name('pages')))
|
||||
self.assertEqual(module['VERSION'],Path('VERSION').read_text().strip())
|
||||
|
||||
Reference in new issue
Block a user