fix(shipping-notice): 收紧邮件补充匹配并归一预约号
This commit is contained in:
1 parent
b4c793145e
commit
f77f267091
11 files changed
+282
-31
No files matched your search
@@ -71,6 +71,18 @@ def test_validated_reservation_id_strips_optional_parenthesized_note():
|
||||
assert validated_reservation_id("30001129345") == ""
|
||||
|
||||
|
||||
def test_validated_reservation_id_strips_short_numeric_line_suffix():
|
||||
"""QUANTA IR# 等:合法 5/10 位本体 + 一段短数字后缀归一为本体;多段/非法左侧拒绝。"""
|
||||
assert validated_reservation_id("35354-1") == "35354"
|
||||
assert validated_reservation_id("3000112934-2") == "3000112934"
|
||||
assert validated_reservation_id("35354-1") == "35354"
|
||||
assert validated_reservation_id("35354_1") == "35354"
|
||||
assert validated_reservation_id("1234-1") == ""
|
||||
assert validated_reservation_id("35354-1-2") == ""
|
||||
assert validated_reservation_id("35354-a") == ""
|
||||
assert validated_reservation_id("35354123456-1") == ""
|
||||
|
||||
|
||||
def test_validated_reservation_id_rejects_amount_text_as_numeric_token():
|
||||
"""金额行中的五位整数片段不能被当成 Reservation ID。"""
|
||||
assert validated_reservation_id("941.76 28,252.80") == ""
|
||||
|
||||
Reference in new issue
Block a user