Skip to content

Commit

Permalink
change to flat-layout
Browse files Browse the repository at this point in the history
  • Loading branch information
QZLin committed Sep 8, 2024
1 parent fb2727a commit 6502d01
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "RootReadme"
version = "0.1"
version = "0.2"
readme = "readme.md"
classifiers = ["License :: OSI Approved :: MIT License"]

Expand All @@ -13,4 +13,4 @@ Repository = "https://github.com/QZLin/RootReadme.git"
Issues = "https://github.com/QZLin/RootReadme/issues"

[project.entry-points."mkdocs.plugins"]
RootReadme = "RootReadme.plugin:RootReadme"
RootReadme = "RootReadme:RootReadme"
26 changes: 26 additions & 0 deletions tests/replace_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import unittest

positive_cases = [
'[Getting Started with Sandboxie](docs/Content/GettingStarted.md)',
'[General Usage Tips]( docs/Content/UsageTips.md )'
]
negative_cases = [
'docs',
'docs/',
'/docs/',
'/docs/',
'example.com/docs/url'
]


class MyTestCase(unittest.TestCase):
def test_replace(self):
from plugin import _replacer
for x in positive_cases:
self.assertNotEqual(x, _replacer(x))
for x in negative_cases:
self.assertEqual(x, _replacer(x))


if __name__ == '__main__':
unittest.main()

0 comments on commit 6502d01

Please sign in to comment.