From 1e51de46ec10fe06598ae0dd5fa3be9fa715e3e8 Mon Sep 17 00:00:00 2001 From: lnu Date: Thu, 15 Sep 2005 07:58:14 +0000 Subject: tests for unescaped html git-svn-id: svn+ssh://svn.gna.org/svn/feed2imap/trunk/feed2imap@60 f70e237a-67f3-0310-a06c-d2b8a7116972 --- test/tc_parser.rb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'test/tc_parser.rb') diff --git a/test/tc_parser.rb b/test/tc_parser.rb index 89339f0..d95304c 100755 --- a/test/tc_parser.rb +++ b/test/tc_parser.rb @@ -9,6 +9,7 @@ class ParserTest < Test::Unit::TestCase DATADIR = 'test/parserdata' def test_parser return if not File::exist?(DATADIR) + allok = true Dir.foreach(DATADIR) do |f| next if f !~ /.xml$/ str = File::read(DATADIR + '/' + f) @@ -18,15 +19,20 @@ class ParserTest < Test::Unit::TestCase chanstr = chanstr.unpack('U*').pack('C*') if File::exist?(DATADIR + '/' + f.gsub(/.xml$/, '.output')) output = File::read(DATADIR + '/' + f.gsub(/.xml$/, '.output')) - File::open(DATADIR + '/' + f.gsub(/.xml$/, '.output.new'), "w") do |f| - f.print(chanstr) + File::open(DATADIR + '/' + f.gsub(/.xml$/, '.output.new'), "w") do |fd| + fd.print(chanstr) + end + if output != chanstr + puts "Test failed for #{f}. Try diff -u #{DATADIR + '/' + f.gsub(/.xml$/, '.output')}{,.new}" + allok = false end - assert_equal(output, chanstr) else + puts "Missing #{DATADIR + '/' + f.gsub(/.xml$/, '.output')}." File::open(DATADIR + '/' + f.gsub(/.xml$/, '.output.new'), "w") do |f| f.print(chanstr) end end + assert(allok) end end end -- cgit v1.2.3-54-g00ecf h'>
path: root/ui-clone.h (unfollow)
Commit message (Expand)AuthorFilesLines
2013-04-08Always #include corresponding .h in .c filesJohn Keeping22-8/+20
2013-04-08cgit.mk: fix dependency handlingJohn Keeping1-0/+8
2013-04-08Makefile: re-include cgit.conf in cgit.mkJohn Keeping1-0/+2
2013-04-08Do not unnecessarily strdup() environment variablesLukas Fleischer1-15/+10
2013-04-08Maŕk cgit_environment members constLukas Fleischer2-12/+12
2013-04-08Return const char * in cgit_{httpscheme, hosturl, rooturl}()Lukas Fleischer3-9/+9
2013-04-08Update git to v1.8.2.1John Keeping4-5/+6
2013-04-07ui-blob: don't segfault when no path is givenJohn Keeping1-1/+1
2013-03-20Convert pager navigation into a unordered listLukas Fleischer3-9/+20
2013-03-20Makefile: remove CGIT-CFLAGS files in clean stageJason A. Donenfeld1-1/+1
2013-03-20ui-summary.c: Move urls variable into print_urls()Lukas Fleischer1-6/+14
2013-03-20Fix colspan valuesLukas Fleischer3-14/+28
2013-03-20html: check return value of writeJason A. Donenfeld1-2/+3
2013-03-20ui-shared: squelch compiler warning.Jason A. Donenfeld1-0/+1
2013-03-20cgit.mk: Use SHELL_PATH_SQ to run gen-version.shJohn Keeping1-1/+1
2013-03-20cgit.mk: don't rebuild everything if CGIT_VERSION changesJohn Keeping1-1/+8
2013-03-20ui-patch: use cgit_version not CGIT_VERSIONJohn Keeping1-1/+1
2013-03-20Makefile: re-use Git's Makefile where possibleJohn Keeping3-119/+80