diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-05-19 13:06:35 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-05-19 13:06:35 -0400 |
commit | 53b1c6f559c1d09fbdbc28c8e4d5090dd455cd26 (patch) | |
tree | d379bb0acd2dd3e9370c37b27f03989398694977 /t | |
parent | 18695056917a2f34a36e5e89df7f01deff9ab640 (diff) | |
parent | 4558457402a4ab6bc795589a2e400fa66144f76e (diff) |
Merge commit 'intrigeri/po' into po
Diffstat (limited to 't')
-rwxr-xr-x | t/git.t | 19 |
1 files changed, 8 insertions, 11 deletions
@@ -3,19 +3,17 @@ use warnings; use strict; my $dir; -my $gitrepo; BEGIN { $dir="/tmp/ikiwiki-test-git.$$"; - $gitrepo="$dir/repo"; my $git=`which git`; chomp $git; - if (! -x $git || ! mkdir($dir) || ! mkdir($gitrepo)) { + if (! -x $git || ! mkdir($dir)) { eval q{ - use Test::More skip_all => "git not available or could not make test dirs" + use Test::More skip_all => "git not available or could not make test dir" } } } -use Test::More tests => 16; +use Test::More tests => 18; BEGIN { use_ok("IkiWiki"); } @@ -25,17 +23,16 @@ $config{srcdir} = "$dir/src"; IkiWiki::loadplugins(); IkiWiki::checkconfig(); -system "cd $gitrepo && git init >/dev/null 2>&1"; -system "cd $gitrepo && echo dummy > dummy; git add . >/dev/null 2>&1"; -system "cd $gitrepo && git commit -m Initial >/dev/null 2>&1"; -system "git clone -l -s $gitrepo $config{srcdir} >/dev/null 2>&1"; +ok (mkdir($config{srcdir})); +is (system("./ikiwiki-makerepo git $config{srcdir} $dir/repo"), 0); my @changes; @changes = IkiWiki::rcs_recentchanges(3); is($#changes, 0); # counts for dummy commit during repo creation -is($changes[0]{message}[0]{"line"}, "Initial"); -is($changes[0]{pages}[0]{"page"}, "dummy"); +# ikiwiki-makerepo's first commit is setting up the .gitignore +is($changes[0]{message}[0]{"line"}, "initial commit"); +is($changes[0]{pages}[0]{"page"}, ".gitignore"); # Web commit my $test1 = readfile("t/test1.mdwn"); |