### ----------------------------------------------------
### -- Text::CSV
### -- Licenses: Artistic-2.0
### -- Authors: H.Merijn Brand (Tux)
### -- File: NLPW-2015/080-errors.txt
### ----------------------------------------------------
perl5

ok (!$csv->parse ('"abc'),           "Missing closing \"");

is (0  + $csv->error_diag,  2027,    "diag numeric");
is ("" . $csv->error_diag,  "EIQ - Quoted field not terminated", "diag string");
my @ed = $csv->error_diag;
is ($ed[2],                 4,       "diag pos");
is ($ed[3],                 5,       "diag record");
is ($ed[4],                '"abc',   "diag buffer");
is ($csv->error_diag[0],    2027,    "diag error  positional");
is ($csv->error_diag[3],    5,       "diag record positional");

perl6

ok (!$csv.parse ('"abc'),            "Missing closing \"");

is (0  + $csv.error_diag,   2027,    "diag numeric");
is ("" ~ $csv.error_diag,   "EIQ - Quoted field not terminated", "diag string");
my @ed = $csv.error_diag;
is (@ed[2],                 4,       "diag pos");
is (@ed[3],                 5,       "diag record");
is (@ed[4],                 '"abc',  "diag buffer");
is ($csv.error_diag[0],     2027,    "diag error  positional");
is ($csv.error_diag[3],     5,       "diag record positional");
is ($csv.error_diag.error,  2027,    "diag OO error");
is ($csv.error_diag.record, 5,       "diag OO record");


