Commits

Yuya Nishihara committed 19a0081

update path-related test cases compatible with Windows

Comments (0)

Files changed (2)

test/test_commander.rb

 
   def test_root
     open 'emptyrepo' do |hg|
-      assert_equal hg.client_path, hg.root
+      assert_equal File.expand_path(hg.client_path), File.expand_path(hg.root)
     end
   end
 

test/test_pipeclient.rb

   def test_open
     hg = PipeClient.open fixture_path('emptyrepo')
     begin
-      assert_equal "#{hg.path}\n", command_output(hg, 'root')
+      assert_equal "#{hg.path}\n", command_output(hg, 'root').gsub("\\", '/')
     ensure
       hg.close
     end
   def test_open_block
     hgobj = nil
     open_client 'emptyrepo' do |hg|
-      assert_equal "#{hg.path}\n", command_output(hg, 'root')
+      assert_equal "#{hg.path}\n", command_output(hg, 'root').gsub("\\", '/')
       hgobj = hg
     end
     assert hgobj.closed?
   def test_open_default_path
     Dir.chdir(fixture_path('emptyrepo')) do |path|
       PipeClient.open do |hg|
-        assert_equal "#{path}\n", command_output(hg, 'root')
+        assert_equal "#{path}\n", command_output(hg, 'root').gsub("\\", '/')
       end
     end
   end
         outputs << s
       end
       assert_equal 0, r
-      assert_equal "#{hg.path}\n", outputs.join
+      assert_equal "#{hg.path}\n", outputs.join.gsub("\\", '/')
     end
   end