Sha256: 31426a1f2865e0aaba492b5ca077aa4b4bff549d6c5b57c7cce30b8f094de928

Contents?: true

Size: 831 Bytes

Versions: 36

Compression:

Stored size: 831 Bytes

Contents

require_relative '../test_helper'

module OhlohScm::Adapters
	class SvnChainCatFileTest < OhlohScm::Test

		def test_cat_file_with_chaining
goodbye = <<-EXPECTED
#include <stdio.h>
main()
{
	printf("Goodbye, world!\\n");
}
EXPECTED
			with_svn_chain_repository('svn_with_branching', '/trunk') do |svn|
				# The first case asks for the file on the HEAD, so it should easily be found
				assert_equal goodbye, svn.cat_file(OhlohScm::Commit.new(:token => 8), OhlohScm::Diff.new(:path => "goodbyeworld.c"))

				# The next test asks for the file as it appeared before /branches/development was moved to /trunk,
				# so this request requires traversal up the chain to the parent SvnAdapter.
				assert_equal goodbye, svn.cat_file(OhlohScm::Commit.new(:token => 5), OhlohScm::Diff.new(:path => "goodbyeworld.c"))
			end
		end
	end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
ohloh_scm-2.5.1 test/unit/svn_chain_cat_file_test.rb
ohloh_scm-2.4.14 test/unit/svn_chain_cat_file_test.rb
ohloh_scm-2.4.13 test/unit/svn_chain_cat_file_test.rb
ohloh_scm-2.4.12 test/unit/svn_chain_cat_file_test.rb
ohloh_scm-2.4.11 test/unit/svn_chain_cat_file_test.rb
ohloh_scm-2.4.10 test/unit/svn_chain_cat_file_test.rb
ohloh_scm-2.4.9 test/unit/svn_chain_cat_file_test.rb
ohloh_scm-2.4.8 test/unit/svn_chain_cat_file_test.rb
ohloh_scm-2.4.7 test/unit/svn_chain_cat_file_test.rb
ohloh_scm-2.4.6 test/unit/svn_chain_cat_file_test.rb
ohloh_scm-2.4.5 test/unit/svn_chain_cat_file_test.rb
ohloh_scm-2.4.4 test/unit/svn_chain_cat_file_test.rb
ohloh_scm-2.4.3 test/unit/svn_chain_cat_file_test.rb
ohloh_scm-2.4.1 test/unit/svn_chain_cat_file_test.rb
ohloh_scm-2.4.0 test/unit/svn_chain_cat_file_test.rb
ohloh_scm-2.3.5 test/unit/svn_chain_cat_file_test.rb
ohloh_scm-2.3.4 test/unit/svn_chain_cat_file_test.rb
ohloh_scm-2.3.2 test/unit/svn_chain_cat_file_test.rb
ohloh_scm-2.3.1 test/unit/svn_chain_cat_file_test.rb
ohloh_scm-2.3.0 test/unit/svn_chain_cat_file_test.rb