A new mappable action to show kitty docs in the browser

This commit is contained in:
Kovid Goyal
2022-08-19 14:00:30 +05:30
parent 2bb42e67d7
commit 5350eb29c1
5 changed files with 42 additions and 3 deletions

View File

@@ -5,6 +5,7 @@
import os
import sys
import unittest
from functools import partial
from . import BaseTest
@@ -74,6 +75,13 @@ class TestBuild(BaseTest):
import pygments
del pygments
def test_docs_url(self):
from kitty.utils import docs_url
p = partial(docs_url, local_docs_root='/docs')
self.ae(p(), 'file:///docs/index.html')
self.ae(p('conf'), 'file:///docs/conf.html')
self.ae(p('kittens/ssh#frag'), 'file:///docs/kittens/ssh.html#frag')
def main() -> None:
tests = unittest.defaultTestLoader.loadTestsFromTestCase(TestBuild)