Slight improvement to the deserialize regex and its test output.

This commit is contained in:
Brian Fraser
2011-12-28 20:08:30 -03:00
parent 4197b09f53
commit 85817a795c
2 changed files with 2 additions and 2 deletions

View File

@@ -172,7 +172,7 @@ sub deserialize_list {
[^\\,]* # Same as above. [^\\,]* # Same as above.
)* # Repeat zero of more times. )* # Repeat zero of more times.
) )
(?:,|\z) # Comma dividing elements or absolute end of the string. ,? # Comma dividing elements or absolute end of the string.
/sxg; /sxg;
# Last element will always be empty. Flaw in the regex. # Last element will always be empty. Flaw in the regex.

View File

@@ -155,7 +155,7 @@ SKIP: {
$sth->execute($test_index, $ser); $sth->execute($test_index, $ser);
$selsth->execute($test_index); $selsth->execute($test_index);
my $flat_string = "@{$serialize_tests[$test_index]}"; my $flat_string = "[" . join("][", @{$serialize_tests[$test_index]}) . "]";
$flat_string =~ s/\n/\\n/g; $flat_string =~ s/\n/\\n/g;
is_deeply( is_deeply(