Changeset 595 for trunk


Ignore:
Timestamp:
Apr 14, 2008, 2:10:42 PM (13 years ago)
Author:
Peter Johansson
Message:

working on copyright test. As now the test fails and is therefore tagged under XFAIL_TESTS.

Location:
trunk/test
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/Makefile.am

    r593 r595  
    3636endif
    3737
     38# tests not yes passing are listed here
     39XFAIL_TESTS = copyright
     40
     41
    3842LDADD = $(STATICFLAG) @top_builddir@/lib/libsvndigest.la
    3943
  • trunk/test/copyright.cc

    r594 r595  
    5555
    5656  is.open(filename.c_str());
    57   std::vector<std::string> copyrights=copyright_lines(is);
     57  std::vector<std::string> copyrights_old=copyright_lines(is);
    5858  is.close();
    5959  is.clear(std::ios::goodbit);
    6060
    61   if (copyrights.size()!=1) {
     61  if (copyrights_old.size()!=1) {
    6262    if (verbose){
    63       std::cout << copyrights.size() << " Copyright lines\n";
    64       for (size_t i=0; i<copyrights.size(); ++i)
    65         std::cout << copyrights[i] << "\n";
     63      std::cout << copyrights_old.size() << " Copyright lines\n";
     64      for (size_t i=0; i<copyrights_old.size(); ++i)
     65        std::cout << copyrights_old[i] << "\n";
    6666    }
    6767    ok = false;
     
    9393  file.print_copyright(alias, verbose);
    9494
     95  is.open(filename.c_str());
     96  std::vector<std::string> copyrights=copyright_lines(is);
     97  is.close();
     98  is.clear(std::ios::goodbit);
     99
     100  if (copyrights.size()!=2) {
     101    ok = false;
     102    if (verbose)
     103      std::cout << "ERROR: expected two lines of Copyright (C)\n";
     104  }
     105  if (verbose) {
     106    std::cout << copyrights.size() << " Copyright lines\n";
     107    for (size_t i=0; i<copyrights.size(); ++i)
     108      std::cout << copyrights[i] << "\n";
     109  }
     110
    95111  // Restoring file
    96112  std::ofstream os(filename.c_str());
Note: See TracChangeset for help on using the changeset viewer.