v3.19.0 (docs/engine): test-script guide audit; sms da accepts a leading +
An audit of docs/test-scripts.md against the engine (testscript.py, events.py, the runner) found a handful of doc-level gaps, now fixed: - the scp80 param defaults (tar = the preset's ISD role TAR, spi1 = that TAR's MSL, spi2 = 01, kvn = the first keyset); - the counter rule as implemented: the run advances/persists the counter after every answered scp80 step when SPI1 requests a counter check (refused packets move the local value forward too - it only moves up); - respond is optional (an omitted object answers ok/0x00); - the run-log section: the exact READ BINARY/READ RECORD/UPDATE BINARY, SCP80 WRAPPED=/SP= and 'TEST-RUN step N failed:' lines; - Known limitations: an expanded-format 61xx has no in-packet GET RESPONSE (TS 102 226 5.2.1.1) - send the GET RESPONSE as a follow-up scp80 step; - sms check da: a leading + and whitespace are ignored. The engine now drops the + (the TPDU carries the international flag in the dialling type, so '+79...' could otherwise never match the parsed digits); docs/api.md and the local AGENTS note it. Tests: 821 frontend + 726 Python.
This commit is contained in:
@@ -467,7 +467,11 @@ def _normalise_content_check(c, default_level):
|
||||
da = c.get('da')
|
||||
if da is not None and str(da).strip():
|
||||
d = re.sub(r'\s', '', str(da))
|
||||
if not re.fullmatch(r'[0-9*#+]{1,20}', d):
|
||||
# The international flag lives in the TPDU's type-of-number, not
|
||||
# in the digits: a leading '+' is accepted and dropped.
|
||||
if d.startswith('+'):
|
||||
d = d[1:]
|
||||
if not re.fullmatch(r'[0-9*#]{1,20}', d):
|
||||
raise ScriptError('sms check: da must be up to 20 digits')
|
||||
out['da'] = d
|
||||
for key in ('pid', 'dcs'):
|
||||
|
||||
Reference in New Issue
Block a user