Skip to content

Commit eb1d34a

Browse files
committed
[+]: add one more test for ":" && "?:"
1 parent 15f61d0 commit eb1d34a

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

tests/EDITest/ParserTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,12 @@ public function testFileOk()
7070
for ($i = 0; $i < 100; $i++) { // keep for simple performance tests
7171
$errors = (new Parser($string))->errors();
7272
}
73-
7473
$this->assertSame([], $errors);
74+
75+
$data = json_encode((new Parser($string))->get());
76+
$this->assertContains('Sup 1:10', $data);
77+
$this->assertNotContains('Konzentrat:o', $data);
78+
$this->assertContains('"Rindfleischsuppe Konzentrat","o', $data);
7579
}
7680

7781
public function testFileError()

tests/files/example_order_ok.edi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,11 +358,11 @@ IMD+F++:::Apfelmus gezuckert 5/1 Dose:FM 4350g Adrian'
358358
QTY+21:34:STK'
359359
LIN+87++7288:SA'
360360
PIA+5+6007288:IN::92'
361-
IMD+F++:::H�hnersuppe Konzentrat ohne:Einlage f Sup 1:10 und So� 1:6'
361+
IMD+F++:::H�hnersuppe Konzentrat ohne:Einlage f Sup 1?:10 und So� 1?:6'
362362
QTY+21:7:STK'
363363
LIN+88++7289:SA'
364364
PIA+5+6007289:IN::92'
365-
IMD+F++:::Rindfleischsuppe Konzentrat:o Einlage f�r Suppen 1:10'
365+
IMD+F++:::Rindfleischsuppe Konzentrat:o Einlage f�r Suppen 1?:10'
366366
QTY+21:8:STK'
367367
LIN+89++7295:SA'
368368
PIA+5+6007295:IN::92'

0 commit comments

Comments
 (0)