@@ -1543,13 +1543,29 @@ foreach my $set_of_tables (\%Unicode::UCD::stricter_to_file_of, \%Unicode::UCD::
1543
1543
chomp $official ;
1544
1544
$/ = $input_record_separator ;
1545
1545
1546
- # If we are to test against an inverted file, it is easier to invert
1547
- # our array than the file.
1548
1546
if ($invert ) {
1549
- if (@tested && $tested [0] == 0) {
1550
- shift @tested ;
1551
- } else {
1552
- unshift @tested , 0;
1547
+
1548
+ # Special case an inverted empty file
1549
+ if (@tested == 0) {
1550
+ if ($official ne ' V0' ) {
1551
+ fail_with_diff($mod_table , $official , ' V0' ,
1552
+ " prop_invlist" );
1553
+ }
1554
+ else {
1555
+ pass(" prop_invlist('$mod_table ')" );
1556
+ }
1557
+
1558
+ next ;
1559
+ }
1560
+ else {
1561
+
1562
+ # If we are to test against an inverted file, it is easier to
1563
+ # invert our array than the file.
1564
+ if ($tested [0] == 0) {
1565
+ shift @tested ;
1566
+ } else {
1567
+ unshift @tested , 0;
1568
+ }
1553
1569
}
1554
1570
}
1555
1571
@@ -2079,9 +2095,18 @@ foreach my $prop (sort(keys %props)) {
2079
2095
# it's an error
2080
2096
my %specials = %$specials_ref if $specials_ref ;
2081
2097
2098
+ # Special case an expected and gotten empty return
2099
+ if ( @$invlist_ref - $upper_limit_subtract == 1
2100
+ && $official =~ / ^ ( V0 | !Unicode::UCD::All ) \z /x)
2101
+ {
2102
+ pass("prop_invmap('$display_prop ')");
2103
+ next PROPERTY;
2104
+ }
2105
+
2082
2106
# The extra -$upper_limit_subtract is because the final element may
2083
2107
# have been tested above to be for anything above Unicode, in which
2084
- # case the file may not go that high.
2108
+ # case the file may not go that high. The upper bound may be changed
2109
+ # in the loop, so can't pre-calculate it.
2085
2110
for (my $i = 0; $i < @$invlist_ref - $upper_limit_subtract ; $i ++) {
2086
2111
2087
2112
# If the map element is a reference, have to stringify it (but
0 commit comments