aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Richard Brown <rbrown@exherbo.org> 2007-12-15 23:17:37 +0000
committerAvatar Richard Brown <rbrown@exherbo.org> 2007-12-15 23:17:37 +0000
commit21e946d8d08519a2f7c40f0e7d9cf1fb2153d384 (patch)
treeb2ea2b6b463f6edcb074e56f5e4cc333dbc17690
parent693622cedcfea20d3775efe7e2ddf9b541c0af9f (diff)
downloadpaludis-21e946d8d08519a2f7c40f0e7d9cf1fb2153d384.tar.gz
paludis-21e946d8d08519a2f7c40f0e7d9cf1fb2153d384.tar.xz
More repository metadata work
-rw-r--r--ruby/repository.cc2
-rw-r--r--ruby/repository_TEST.rb8
2 files changed, 9 insertions, 1 deletions
diff --git a/ruby/repository.cc b/ruby/repository.cc
index f1a0fa0..4c9dc38 100644
--- a/ruby/repository.cc
+++ b/ruby/repository.cc
@@ -880,7 +880,7 @@ namespace
{
tr1::shared_ptr<Repository> * self_ptr;
Data_Get_Struct(self, tr1::shared_ptr<Repository>, self_ptr);
- return metadata_key_to_value(((**self_ptr).*m_)());
+ return (((**self_ptr).*m_)()) ? metadata_key_to_value(((**self_ptr).*m_)()) : Qnil;
}
};
diff --git a/ruby/repository_TEST.rb b/ruby/repository_TEST.rb
index 29012ca..ea0024e 100644
--- a/ruby/repository_TEST.rb
+++ b/ruby/repository_TEST.rb
@@ -586,5 +586,13 @@ module Paludis
assert_raise BadVersionSpecError do f.add_version('foo', 'bar', 'abc') end
end
end
+ class TestCase_Repository < Test::Unit::TestCase
+ include RepositoryTestCase
+
+ def format_key
+ assert_kind_of MetadataStringKey, repo.format_key
+ assert_equal 'ebuild', repo.format_key.value
+ end
+ end
end