summaryrefslogtreecommitdiffstats
path: root/tests/units/test_log.rb
diff options
context:
space:
mode:
authorScott Chacon <schacon@gmail.com>2008-05-27 12:36:07 -0700
committerScott Chacon <schacon@gmail.com>2008-05-27 12:36:07 -0700
commitbceadeb7d377b6ba36de4f5de5a5f5034f89bee6 (patch)
tree05b4e3ccfd0e6c2f4b0cae8f118d12eca1f38f54 /tests/units/test_log.rb
parent743ac297402ce8713d1c58db42c8a0540cb026a8 (diff)
downloadthird_party-ruby-git-bceadeb7d377b6ba36de4f5de5a5f5034f89bee6.tar.gz
third_party-ruby-git-bceadeb7d377b6ba36de4f5de5a5f5034f89bee6.tar.xz
third_party-ruby-git-bceadeb7d377b6ba36de4f5de5a5f5034f89bee6.zip
added grep and author searching to logs
Diffstat (limited to 'tests/units/test_log.rb')
-rw-r--r--tests/units/test_log.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/units/test_log.rb b/tests/units/test_log.rb
index 7bcd83b..2d4b0d5 100644
--- a/tests/units/test_log.rb
+++ b/tests/units/test_log.rb
@@ -32,6 +32,18 @@ class TestLog < Test::Unit::TestCase
assert_equal(30, l.size)
end
+ def test_get_log_grep
+ l = @git.log.grep("search")
+ assert_equal(2, l.size)
+ end
+
+ def test_get_log_author
+ l = @git.log(5).author("chacon")
+ assert_equal(5, l.size)
+ l = @git.log(5).author("lazySusan")
+ assert_equal(0, l.size)
+ end
+
def test_get_log_since_file
l = @git.log.object('example.txt')
assert_equal(30, l.size)