mirror of
https://github.com/aclist/dztui.git
synced 2026-10-25 12:12:31 +01:00
fix: less brittle meta parsing
This commit is contained in:
1 parent
450d54d7fd
commit
5a8d85ac92
9 files changed
+67
-31
No files matched your search
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
protocol = 1;
|
||||
publishedid = 1234567890;
|
||||
name = "ModName";
|
||||
timestamp = 638278452000000000;
|
||||
hash = "a1b2c3d4e5f6g7h8i9j0";
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
protocol = 1
|
||||
publishedid = 1234567890
|
||||
name = "ModName"
|
||||
timestamp = 638278452000000000
|
||||
hash = "a1b2c3d4e5f6g7h8i9j0"
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
protocol=1
|
||||
publishedid=1234567890
|
||||
name="ModName"
|
||||
timestamp=638278452000000000
|
||||
hash="a1b2c3d4e5f6g7h8i9j0"
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
protocol=1
|
||||
publishedid=1234567890
|
||||
name=ModName
|
||||
timestamp=638278452000000000
|
||||
hash=a1b2c3d4e5f6g7h8i9j0
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
protocol=1;
|
||||
publishedid=1234567890;
|
||||
name=ModName;
|
||||
timestamp=638278452000000000;
|
||||
hash=a1b2c3d4e5f6g7h8i9j0;
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
protocol=1
|
||||
publishedid=1234567890;
|
||||
name="ModName";
|
||||
timestamp=638278452000000000;
|
||||
hash= a1b2c3d4e5f6g7h8i9j0;
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
from dzgui.api.mods import tokenize
|
||||
|
||||
print(tokenize("meta4.cpp"))
|
||||
@@ -0,0 +1,17 @@
|
||||
import pytest
|
||||
from dzgui.api.mods import tokenize
|
||||
from tests.fixtures import fixture_path
|
||||
|
||||
@pytest.mark.mods
|
||||
@pytest.mark.parametrize("fixture", [
|
||||
fixture_path("cpp/meta1.cpp"),
|
||||
fixture_path("cpp/meta2.cpp"),
|
||||
fixture_path("cpp/meta3.cpp"),
|
||||
fixture_path("cpp/meta4.cpp"),
|
||||
fixture_path("cpp/meta5.cpp"),
|
||||
fixture_path("cpp/meta6.cpp"),
|
||||
]
|
||||
)
|
||||
def test_modmeta(fixture: str) -> None:
|
||||
meta = tokenize(fixture)
|
||||
assert meta["name"] == "ModName"
|
||||
Reference in new issue
Block a user