+ $message = "remove the UTF-8 and binary files we just added";
+ IkiWiki::rcs_remove($_) for ($file1, $file2);
+ IkiWiki::rcs_commit_staged(message => $message);
+ ok(-d "$config{srcdir}/test8", q{empty dir not pruned (1)});
+ @changes = IkiWiki::rcs_recentchanges(11);
+ ok(-d "$config{srcdir}/test8", q{empty dir not pruned (2)});
+ is_total_number_of_changes(\@changes, 5);
+ # XXX test for both files in the commit, and no other files
+ is_most_recent_change(\@changes, $file2, $message);
+
+ $message = "re-add UTF-8 and binary files with names swapped";
+ writefile($file2, $config{srcdir}, readfile('t/test2.mdwn'));
+ writefile($file1, $config{srcdir}, $bindata_in, 1);
+ IkiWiki::rcs_add($_) for ($file1, $file2);
+ IkiWiki::rcs_commit_staged(message => $message);
+ isnt_newly_added($_) for ($file1, $file2);
+ is_in_keyword_substitution_mode($file2, q{-kkv});
+ is_in_keyword_substitution_mode($file1, q{-kb});
+ @changes = IkiWiki::rcs_recentchanges(11);
+ is_total_number_of_changes(\@changes, 6);
+ # XXX test for both files in the commit, and no other files
+ is_most_recent_change(\@changes, $file2, $message);
+