From 2e11e703824ea49725ce571d3317acacfd4e9209 Mon Sep 17 00:00:00 2001 From: Benjamin Kellermann Date: Thu, 27 May 2010 13:21:58 +0200 Subject: fix unittests --- vcs_test.rb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'vcs_test.rb') diff --git a/vcs_test.rb b/vcs_test.rb index 9881fb5..91b6609 100644 --- a/vcs_test.rb +++ b/vcs_test.rb @@ -20,6 +20,10 @@ if __FILE__ == $0 require "test/unit" require "pp" +unless ARGV[0] + puts "Usage: ruby #{$0} (git|bzr)" + exit +end require ARGV[0] require "benchmark" @@ -41,8 +45,9 @@ class VCS_test < Test::Unit::TestCase @t = "" end def teardown - Dir.chdir("/") - `rm -rf #{@repo}` + puts @repo +# Dir.chdir("/") +# `rm -rf #{@repo}` puts "#{@t}: #{@b}" end def test_cat @@ -68,6 +73,8 @@ class VCS_test < Test::Unit::TestCase @b += Benchmark.measure{ l = VCS.history }.total + pp l + exit assert_equal(@data.size,l.size) @history.each_with_index{|h,revminusone| assert_equal(h,l[revminusone+1].comment) -- cgit v1.2.3