diff options
Diffstat (limited to 'tests/units/test_raw_internals.rb')
-rw-r--r-- | tests/units/test_raw_internals.rb | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/tests/units/test_raw_internals.rb b/tests/units/test_raw_internals.rb index 1437845..03a7916 100644 --- a/tests/units/test_raw_internals.rb +++ b/tests/units/test_raw_internals.rb @@ -9,14 +9,16 @@ class TestRawInternals < Test::Unit::TestCase end def test_raw_log - g = Git.bare(@wbare) - t_log(g) + with_temp_bare do |g| + t_log(g) + end end def test_packed_log - g = Git.bare(@wbare) - g.repack - t_log(g) + with_temp_bare do |g| + g.repack + t_log(g) + end end def test_commit_object @@ -26,15 +28,27 @@ class TestRawInternals < Test::Unit::TestCase assert_equal('test', c.message) end + def test_lstree + g = Git.bare(@wbare) + c = g.object("v2.5").gtree + sha = c.sha + + repo = Git::Raw::Repository.new(@wbare) + puts repo.object(sha).inspect + end + def t_log(g) c = g.object("v2.5") sha = c.sha - repo = Git::Raw::Repository.new(@wbare) + repo = Git::Raw::Repository.new(g.repo.path) raw_out = repo.log(sha) assert_equal('commit 546bec6f8872efa41d5d97a369f669165ecda0de', raw_out.split("\n").first) assert_equal('546bec6f8872efa41d5d97a369f669165ecda0de', c.log(30).first.sha) end + + + end
\ No newline at end of file |