[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/work/kdepim-3.5.5+/libkcal/tests
From:       Allen Winter <winter () kde ! org>
Date:       2007-02-06 0:47:29
Message-ID: 1170722849.538824.32583.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 630696 by winterz:

merge 627911, 627913 and 627914 by wstephens:

take skipped lines into account when reporting line number
Add testcases for iCalendar generated by Evolution



 AM            branches/work/kdepim-3.5.5+/libkcal/tests/data/Compat/Evolution_2.8.2_timezone_test.ics \
  A             branches/work/kdepim-3.5.5+/libkcal/tests/data/Compat/Evolution_2.8.2_timezone_test.ics.ical.ref \
  M  +4 -4      branches/work/kdepim-3.5.5+/libkcal/tests/readandwrite.cpp  
 M  +9 -5      branches/work/kdepim-3.5.5+/libkcal/tests/runtestcase.pl  


** branches/work/kdepim-3.5.5+/libkcal/tests/data/Compat/Evolution_2.8.2_timezone_test.ics \
#property svn:executable  + *
--- branches/work/kdepim-3.5.5+/libkcal/tests/readandwrite.cpp #630695:630696
@@ -67,10 +67,10 @@
   CalendarLocal cal( QString::fromLatin1("UTC") );
 
   if ( !cal.load( input ) ) return 1;
-	QString tz = cal.nonKDECustomProperty( "X-LibKCal-Testsuite-OutTZ" );
-	if ( !tz.isEmpty() ) {
-	  cal.setTimeZoneIdViewOnly( tz );
-	}
+  QString tz = cal.nonKDECustomProperty( "X-LibKCal-Testsuite-OutTZ" );
+  if ( !tz.isEmpty() ) {
+    cal.setTimeZoneIdViewOnly( tz );
+  }
   if ( !cal.save( output ) ) return 1;
 
   return 0;
--- branches/work/kdepim-3.5.5+/libkcal/tests/runtestcase.pl #630695:630696
@@ -23,14 +23,18 @@
 # This little script runs a test program on a given (calendar) file and 
 # compares the output to a reference file. All discrepancies are shown 
 # to the user. Usage:
-#      runtestcase.pl appname testfile.ics
+#      runtestcase.pl appname identifier testfile.ics
+# 'identifier' is used as a suffix to allow multiple tests on the same input 
+# file during a test run.
+#
 # The application/script appname is required to take two arguments:
 #      appname inputfile outputfile
-# where inputfile is the file to be used as input data, and the ouput of the
-# programm will go to outputfile (=testfile.ics.out if called through 
+# where inputfile is the file to be used as input data, and the output of the
+# program will go to outputfile (=testfile.ics.identifier.out if called through 
 # runtestcase.pl). That outputfile is then compared to the reference file
 # testfile.ics.ref.
 
+
 if ( @ARGV != 3 ) {
   print STDERR "Missing arg! Arguments: testapp identifier filename \n";
   exit 1;
@@ -85,11 +89,12 @@
 
   $error = 0;
   $i = 0;
-  $line = 1;
+  $line = 0;
   my $errorlines = 0;
   while( <READ> ) {
     $out = $_;
     $ref = @ref[$i++];
+    $line++;
 
     # DTSTAMP, LAST-MODIFIED and CREATED might be different to the reference...
     if ( $out =~ /^DTSTAMP:[0-9ZT]+\r?$/ && $ref =~ /^DTSTAMP:[0-9ZT]+\r?$/ ) {
@@ -118,7 +123,6 @@
       }
     }
     
-    $line++;
   }
 
   close READ;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic