Sha256: 0005372863881bb857d96973a7a02da7838f174c890a41ec014fddc8a96c9a93

Contents?: true

Size: 1.07 KB

Versions: 20

Compression:

Stored size: 1.07 KB

Contents

$:.unshift File.join(File.dirname(__FILE__),"..","lib")
$:.unshift File.join(File.dirname(__FILE__))

require 'minitest/autorun'
require 'fileutils'
require 'test_helper'
require 'rim/git'

class GitTest < MiniTest::Test

include FileUtils
include TestHelper

def setup
  logger = Logger.new($stdout)
  logger.level = Logger::ERROR unless ARGV.include? "debug"
  RIM::GitSession.logger = logger
end

def test_export_rev_long_cmdline
  d = empty_test_dir("git_test")

  long_name100 = "a" * 100
  num_files = 100

  RIM.git_session(d) do |s|
    s.execute "git init"
    (1..num_files).each do |i|
      write_file "#{d}/#{i}/#{long_name100}", i.to_s
    end
    s.execute "git add ."
    s.execute "git commit -m \"test files\""

    mkdir "#{d}/out"
    s.export_rev("master", "#{d}/out", (1..num_files).collect{|i| "#{i}/#{long_name100}"})

    (1..num_files).each do |i|
      assert File.read("#{d}/out/#{i}/#{long_name100}") == i.to_s
    end
  end
end

def teardown
  # clean up test dirs created during last test
  remove_test_dirs
end

end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
esr-rim-1.4.8 test/git_test.rb
esr-rim-1.4.7 test/git_test.rb
esr-rim-1.4.4 test/git_test.rb
esr-rim-1.4.3 test/git_test.rb
esr-rim-1.4.2 test/git_test.rb
esr-rim-1.4.0 test/git_test.rb
esr-rim-1.3.9 test/git_test.rb
esr-rim-1.3.8 test/git_test.rb
esr-rim-1.3.7 test/git_test.rb
esr-rim-1.3.6 test/git_test.rb
esr-rim-1.3.5 test/git_test.rb
esr-rim-1.3.4 test/git_test.rb
esr-rim-1.3.3 test/git_test.rb
esr-rim-1.3.2 test/git_test.rb
esr-rim-1.3.1 test/git_test.rb
esr-rim-1.3.0 test/git_test.rb
esr-rim-1.2.2 test/git_test.rb
esr-rim-1.2.1 test/git_test.rb
esr-rim-1.2.0 test/git_test.rb
esr-rim-1.1.5 test/git_test.rb