},
}
+# Cache of pages' old titles, so we can tell whether they changed
+my %old_trail_titles;
+
sub needsbuild (@) {
my $needsbuild=shift;
+
foreach my $page (keys %pagestate) {
if (exists $pagestate{$page}{trail}) {
if (exists $pagesources{$page} &&
grep { $_ eq $pagesources{$page} } @$needsbuild) {
+ # Remember its title, so we can know whether
+ # it changed.
+ $old_trail_titles{$page} = title_of($page);
+
# Remove state, it will be re-added
# if the preprocessor directive is still
# there during the rebuild. {item} is the
}
}
}
+
return $needsbuild;
}
if (! exists $new->{$trail}) {
return 1;
}
+
+ if (exists $old_trail_titles{$trail} &&
+ title_of($trail) ne $old_trail_titles{$trail}) {
+ return 1;
+ }
+
my ($old_p, $old_n) = @{$old->{$trail}};
my ($new_p, $new_n) = @{$new->{$trail}};
$old_p = "" unless defined $old_p;
if ($old_p ne $new_p) {
return 1;
}
+
+ if (exists $old_trail_titles{$old_p} &&
+ title_of($old_p) ne $old_trail_titles{$old_p}) {
+ return 1;
+ }
+
if ($old_n ne $new_n) {
return 1;
}
+
+ if (exists $old_trail_titles{$old_n} &&
+ title_of($old_n) ne $old_trail_titles{$old_n}) {
+ return 1;
+ }
}
foreach my $trail (keys %$new) {
check_trail("limited/d.html", "n= p=limited/c");
# Also, b and d should pick up the change to c. This regressed with the
# change to using a presence dependency.
-TODO: {
-local $TODO = "trail members don't pick up other members' title changes";
$blob = readfile("t/tmp/out/limited/b.html");
ok($blob =~ /New C page >/m);
$blob = readfile("t/tmp/out/limited/d.html");
ok($blob =~ /< New C page/m);
-}
# Members of a retitled trail should pick up that change.
# This regressed with the change to using a presence dependency.
-TODO: {
-local $TODO = "trail members don't pick up the trail's title changes";
$blob = readfile("t/tmp/out/retitled/a.html");
ok($blob =~ /\^ the new title \^/m);
-}
# untrail is no longer a trail, so these are no longer in it.
check_no_trail("untrail/a.html");