PARAMETERS: номер и дата ответа НРД («50878767 от 29.09.2026»)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014FsEKyJrYF69Cj9ZXzFLRi
This commit is contained in:
zuevav
2026-09-29 15:58:25 +03:00
parent a62db0aa0e
commit 98e17a8cb7
2 changed files with 23 additions and 1 deletions
+10
View File
@@ -63,3 +63,13 @@ func TestOrderRespNo(t *testing.T) {
t.Fatalf("без MS010 — пусто: %q", got)
}
}
func TestNSDRespNoDate(t *testing.T) {
body := "<BizMsgIdr>50878767</BizMsgIdr><MsgDefIdr>sese.025.001.10</MsgDefIdr><BizSvc>MS010</BizSvc><CreDt>2026-09-29T12:43:28Z</CreDt>"
if got := nsdRespNoDate(body); got != "50878767 от 29.09.2026" {
t.Fatalf("%q", got)
}
if got := nsdRespNoDate("<CreDt>2026-09-29T21:30:00Z</CreDt><BizMsgIdr>1</BizMsgIdr>"); got != "1 от 30.09.2026" {
t.Fatalf("дата по МСК: %q", got)
}
}