Skip to content

Commit

Permalink
Item8640: Update unit test to verify files Checked In vs. Installed
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk@6849 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
GeorgeClark authored and GeorgeClark committed Mar 22, 2010
1 parent 9deb196 commit 61c93b1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions UnitTestContrib/test/unit/ConfigureTests.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1006,6 +1006,13 @@ sub test_Package {
my $result = '';
($result, $err) = $pkg->install($tempdir);

my $expresult = "Installed: data/Sandbox/TestTopic1.txt
Checked in: data/Sandbox/TestTopic43.txt as Sandbox.TestTopic43
Installed: pub/Sandbox/TestTopic1/file.att
Installed: MyPlugin_installer
";
$this->assert_str_equals( $expresult, $result, 'Verify Checked in vs. Installed');

my @mfiles = $pkg->files();
my @ifiles = $pkg->files('1');

Expand Down
6 changes: 3 additions & 3 deletions core/lib/Foswiki/Configure/Package.pm
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ sub install {
close $fh;

if ($contents) {
$results .= "Checked in: $file as $tweb.$ttopic \n";
$results .= "Checked in: $file as $tweb.$ttopic\n";
my $meta = Foswiki::Meta->new( $session, $tweb, $ttopic, $contents );
_installAttachments($this, $dir, "$tweb/$ttopic", $meta, $manifest, $results );
$meta->saveAs ( $tweb, $ttopic, %opts );
Expand All @@ -213,13 +213,13 @@ sub install {
# Everything else
my $msg .= _moveFile ("$dir/$file", "$target", $perms);
$err .= $msg if ($msg);
$results .= "Installed: $file \n";
$results .= "Installed: $file\n";
next;
}
}
my $pkgstore = "$Foswiki::cfg{WorkingDir}/configure/pkgdata";
my $msg = _moveFile ("$dir/$this->{_pkgname}_installer", "$pkgstore/$this->{_pkgname}_installer");
$results .= "Installed: $pkgstore/$this->{_pkgname}_installer \n";
$results .= "Installed: $this->{_pkgname}_installer\n";

$err .= $msg if ($msg);
return ($results, $err);
Expand Down

0 comments on commit 61c93b1

Please sign in to comment.