]> source.dussan.org Git - redmine.git/commitdiff
scm: mercurial: skip failing unit lib tests on below Mercurial 1.5 (#9465)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 24 Oct 2011 09:32:38 +0000 (09:32 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 24 Oct 2011 09:32:38 +0000 (09:32 +0000)
Tests of non ASCII nor alphabetic nor numeric *named branch* fails on below Mercurial 1.5.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7642 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb

index 420097555beef7537b69cffcb42f3dc1a1c8311d..4c946ba22c17efae4283b848e1770297ad1b3b3d 100644 (file)
@@ -314,17 +314,21 @@ begin
           assert_equal 1, nib1.size
           case bra
             when 'branch (1)[2]&,%.-3_4'
-              assert_equal 3, nib0.size
-              assert_equal nib0[0], 'afc61e85bde7'
-              nib2 = @adapter.nodes_in_branch(bra, :limit => 2)
-              assert_equal 2, nib2.size
-              assert_equal nib2[1], '933ca60293d7'
+              if @adapter.class.client_version_above?([1, 6])
+                assert_equal 3, nib0.size
+                assert_equal nib0[0], 'afc61e85bde7'
+                nib2 = @adapter.nodes_in_branch(bra, :limit => 2)
+                assert_equal 2, nib2.size
+                assert_equal nib2[1], '933ca60293d7'
+              end
             when @branch_char_1
-              assert_equal 2, nib0.size
-              assert_equal nib0[1], '08ff3227303e'
-              nib2 = @adapter.nodes_in_branch(bra, :limit => 1)
-              assert_equal 1, nib2.size
-              assert_equal nib2[0], '7bbf4c738e71'
+              if @adapter.class.client_version_above?([1, 6])
+                assert_equal 2, nib0.size
+                assert_equal nib0[1], '08ff3227303e'
+                nib2 = @adapter.nodes_in_branch(bra, :limit => 1)
+                assert_equal 1, nib2.size
+                assert_equal nib2[0], '7bbf4c738e71'
+              end
           end
         end
       end