Sha256: 2ea7d672e87b3008494618cbf8e585c9948059cc93e3a58aeed7e01a185d3d56

Contents?: true

Size: 1.14 KB

Versions: 1

Compression:

Stored size: 1.14 KB

Contents

module OhlohScm::Parsers
	class CommandLineTest < Scm::Test
		def test_cvs_from_file
			result = `#{File.dirname(__FILE__) + '/../../bin/ohlog'} --xml --cvs #{DATA_DIR + '/basic.rlog'}`
			assert_equal 0, $?
			assert_buffers_equal File.read(DATA_DIR + '/basic.ohlog'), result
		end

		def test_cvs_from_pipe
			result = `cat #{DATA_DIR + '/basic.rlog'} | #{File.dirname(__FILE__) + '/../../bin/ohlog'} --xml --cvs`
			assert_equal 0, $?
			assert_buffers_equal File.read(DATA_DIR + '/basic.ohlog'), result
		end

		def test_svn_from_file
			result = `#{File.dirname(__FILE__) + '/../../bin/ohlog'} --xml --svn #{DATA_DIR + '/simple.svn_log'}`
			assert_equal 0, $?
			assert_buffers_equal File.read(DATA_DIR + '/simple.ohlog'), result
		end

		def test_svn_xml_from_file
			result = `#{File.dirname(__FILE__) + '/../../bin/ohlog'} --xml --svn-xml #{DATA_DIR + '/simple.svn_xml_log'}`
			assert_equal 0, $?
			assert_buffers_equal File.read(DATA_DIR + '/simple.ohlog'), result
		end

		def test_hg_from_file
		end

		def test_help
			result = `#{File.dirname(__FILE__) + '/../../bin/ohlog'} -?`
			assert_equal 0, $?
			assert result =~ /Examples:/
		end
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ohloh_scm-2.0.0 test/unit/ohlog_command_line_test.rb