mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-17 22:14:53 +02:00
A new mappable action to show kitty docs in the browser
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user