aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tests/examples/ndice
diff options
context:
space:
mode:
author简律纯 <i@jyunko.cn>2024-03-11 09:40:52 +0800
committer简律纯 <i@jyunko.cn>2024-03-11 09:40:52 +0800
commit67cf02ba9bf39116126ef8360cedff5410a20694 (patch)
tree9194042a727bd7535f036283152afe450876b133 /tests/examples/ndice
parent9425a632d234229ee87178c69f572384e9713fae (diff)
downloadinfini-67cf02ba9bf39116126ef8360cedff5410a20694.tar.gz
infini-67cf02ba9bf39116126ef8360cedff5410a20694.zip
chore(tests): regist -> register
Diffstat (limited to 'tests/examples/ndice')
-rw-r--r--tests/examples/ndice/src/ndice.py12
-rw-r--r--tests/examples/ndice/tests.py2
2 files changed, 7 insertions, 7 deletions
diff --git a/tests/examples/ndice/src/ndice.py b/tests/examples/ndice/src/ndice.py
index a0b88f5e..082de9f8 100644
--- a/tests/examples/ndice/src/ndice.py
+++ b/tests/examples/ndice/src/ndice.py
@@ -10,7 +10,7 @@ from .dicer import Dicer
import re
register = Register()
-register.regist_textevent(
+register.register_textevent(
"ndice.roll",
"[{{ username }}]掷骰: "
"{% if descs|length == 1 %}"
@@ -23,16 +23,16 @@ register.regist_textevent(
"{% endfor %}"
"{% endif %}",
)
-register.regist_textevent(
+register.register_textevent(
"ndice.error.bad_roll_string", "[{{ username }}]掷骰时出现异常, 疑似掷骰表达式错误."
)
-register.regist_textevent("ndice.error.too_much_round", "[{{ username }}]给入的掷骰轮数超出预期.")
-register.regist_textevent(
+register.register_textevent("ndice.error.too_much_round", "[{{ username }}]给入的掷骰轮数超出预期.")
+register.register_textevent(
"ndice.error.unknown",
"未知错误: {{ error }}, 可能是掷骰语法异常.\nBUG提交: https://gitee.com/unvisitor/issues",
)
-register.regist_textevent("ndice.error.bad_round", "多轮检定的轮数应当是整型数.")
-register.regist_textevent("ndice.error.too_much_round", "多轮检定的轮数超出预期.")
+register.register_textevent("ndice.error.bad_round", "多轮检定的轮数应当是整型数.")
+register.register_textevent("ndice.error.too_much_round", "多轮检定的轮数超出预期.")
def translate_punctuation(string: str) -> str:
diff --git a/tests/examples/ndice/tests.py b/tests/examples/ndice/tests.py
index c2e9b9d3..2a56409b 100644
--- a/tests/examples/ndice/tests.py
+++ b/tests/examples/ndice/tests.py
@@ -13,5 +13,5 @@ loader.load("ndice")
loader.close()
core = loader.into_core()
-for output in core.input(Input(".r20#d6")):
+for output in core.input(Input(".r3d6", {'nickname':'简律纯'})):
print(output)