Sha256: ac9d28e2cf38f0e70ad7072c7899db06ff7a474e829e7430f7d2c2a5965cf3fd

Contents?: true

Size: 1.09 KB

Versions: 36

Compression:

Stored size: 1.09 KB

Contents

require_relative '../test_helper'

module OhlohScm::Parsers
	class SvnXmlParserTest < OhlohScm::Test

		def test_basic
			assert_convert(SvnXmlParser, DATA_DIR + '/simple.svn_xml_log', DATA_DIR + '/simple.ohlog')
		end

		def test_empty_array
			assert_equal([], SvnXmlParser.parse(''))
		end

		def test_empty_xml
			assert_equal("<?xml version=\"1.0\"?>\n<ohloh_log scm=\"svn\">\n</ohloh_log>\n", SvnXmlParser.parse('', :writer => XmlWriter.new))
		end

		def test_copy_from
			xml = <<-XML
<?xml version="1.0"?>
<log>
<logentry
   revision="8">
<author>robin</author>
<date>2009-02-05T13:40:46.386190Z</date>
<paths>
<path
   copyfrom-path="/branches/development"
   copyfrom-rev="7"
   action="A">/trunk</path>
</paths>
<msg>the branch becomes the new trunk</msg>
</logentry>
</log>
			XML
			commits = SvnXmlParser.parse(xml)
			assert_equal 1, commits.size
			assert_equal 1, commits.first.diffs.size
			assert_equal "/trunk", commits.first.diffs.first.path
			assert_equal "/branches/development", commits.first.diffs.first.from_path
			assert_equal 7, commits.first.diffs.first.from_revision
		end

	end
end

Version data entries

36 entries across 36 versions & 1 rubygems

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