Update ees test for fwv

This commit is contained in:
TeoV
2020-10-08 17:07:32 +03:00
committed by Dan Christian Bogos
parent c177974458
commit c3c39cadc7
2 changed files with 4 additions and 7 deletions

View File

@@ -139,8 +139,6 @@
{"tag": "Filler1", "path": "*hdr.Filler1", "type": "*filler", "width": 3},
{"tag": "DistributorCode", "path": "*hdr.DistributorCode",
"type": "*constant", "value": "VOI","width": 3},
{"tag": "FileSeqNr", "path": "*hdr.FileSeqNr", "type": "*variable",
"value": "~*dc.ExportID","width": 5,"strip": "*right","padding": "*zeroleft"},
{"tag": "FileCreationTime", "path": "*hdr.FileCreationTime",
"type": "*variable","value":"~*dc.TimeNow{*time_string:020106150400}",
"width": 12 },
@@ -189,8 +187,6 @@
{"tag": "Filler1", "path": "*trl.Filler1", "type": "*filler", "width": 3},
{"tag": "DistributorCode", "path": "*trl.DistributorCode",
"type": "*constant", "value": "VOI","width": 3},
{"tag": "FileSeqNr", "path": "*trl.FileSeqNr", "type": "*variable",
"value": "~*dc.ExportID","width": 5,"strip": "*right","padding": "*zeroleft"},
{"tag": "NumberOfRecords", "path": "*trl.NumberOfRecords",
"type": "*variable", "value": "~*dc.NumberOfEvents","width": 6,"padding": "*zeroleft"},
{"tag": "CdrsDuration", "path": "*trl.CdrsDuration", "type": "*variable",

View File

@@ -147,12 +147,13 @@ func testFwvVerifyExports(t *testing.T) {
if len(files) != 1 {
t.Errorf("Expected %+v, received: %+v", 1, len(files))
}
eHdr := "10 VOIFwvEx02062016520001 010101000000\n"
eCnt := "201001 1001 cli 1002 0211 071113084200100000 1op3dsafdsaf 002.345670\n"
eTrl := "90 VOIFwvEx0000010000010s071113084200 \n"
eHdr := "10 VOI02062016520001 \n"
eCnt := "201001 1001 cli 1002 0211 071113084200100000 1op3dsafdsaf 002.34567\n"
eTrl := "90 VOI0000010000010s071113084200 \n"
if outContent1, err := ioutil.ReadFile(files[0]); err != nil {
t.Error(err)
} else if len(eHdr+eTrl+eCnt) != len(outContent1) {
t.Errorf("Expecting: <%+v>, received: <%+v>", len(eHdr+eTrl+eCnt), len(outContent1))
t.Errorf("Expecting: \n <%+v> \n, received: \n<%+v>\n", eHdr+eTrl+eCnt, string(outContent1))
}
}