From acf94414e3526686701cc93dabcec1519149678a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 25 Jul 2008 12:16:09 -0400 Subject: expose a bug in bzr renameing code --- t/bazaar.t | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 't') diff --git a/t/bazaar.t b/t/bazaar.t index 019f05ff3..675a143b5 100755 --- a/t/bazaar.t +++ b/t/bazaar.t @@ -12,7 +12,7 @@ BEGIN { } } } -use Test::More tests => 13; +use Test::More tests => 16; BEGIN { use_ok("IkiWiki"); } @@ -69,7 +69,16 @@ IkiWiki::rcs_commit_staged("Added the 4th page", "moo", "Joe User"); is($#changes, 2); is($changes[0]{pages}[0]{"page"}, "test4.mdwn"); -IkiWiki::rcs_remove("test4.mdwn"); -IkiWiki::rcs_commit_staged("Remove the 4th page", "moo", "Joe User"); +ok(mkdir($config{srcdir}."/newdir")); +IkiWiki::rcs_rename("test4.mdwn", "newdir/test5.mdwn"); +IkiWiki::rcs_commit_staged("Added the 5th page", "moo", "Joe User"); + +@changes = IkiWiki::rcs_recentchanges(4); + +is($#changes, 3); +is($changes[0]{pages}[0]{"page"}, "newdir/test5.mdwn"); + +IkiWiki::rcs_remove("newdir/test5.mdwn"); +IkiWiki::rcs_commit_staged("Remove the 5th page", "moo", "Joe User"); system "rm -rf $dir"; -- cgit v1.2.3