From: <jh...@us...> - 2009-02-06 17:22:41
|
Revision: 64 http://etch.svn.sourceforge.net/etch/?rev=64&view=rev Author: jheiss Date: 2009-02-06 17:22:39 +0000 (Fri, 06 Feb 2009) Log Message: ----------- Add test for multiple attributes. Modified Paths: -------------- trunk/test/attributes.rb Modified: trunk/test/attributes.rb =================================================================== --- trunk/test/attributes.rb 2009-02-06 17:22:19 UTC (rev 63) +++ trunk/test/attributes.rb 2009-02-06 17:22:39 UTC (rev 64) @@ -583,6 +583,37 @@ # Verify that the file was created properly assert_equal(sourcecontents, get_file_contents(@targetfile), testname) + # + # Multiple fact comparison + # + testname = 'multiple fact comparison' + + FileUtils.mkdir_p("#{@repodir}/source/#{@targetfile}") + File.open("#{@repodir}/source/#{@targetfile}/config.xml", 'w') do |file| + file.puts <<-EOF + <config> + <file> + <warning_file/> + <source> + <plain operatingsystem="#{os}" operatingsystemrelease="#{osrel}">source</plain> + </source> + </file> + </config> + EOF + end + + sourcecontents = "Test #{testname}\n" + File.open("#{@repodir}/source/#{@targetfile}/source", 'w') do |file| + file.write(sourcecontents) + end + + # Run etch + #puts "Running '#{testname}' test" + run_etch(@port, @testbase) + + # Verify that the file was created properly + assert_equal(sourcecontents, get_file_contents(@targetfile), testname) + end def teardown This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |