Changeset 768


Ignore:
Timestamp:
Jan 31, 2009, 10:30:37 PM (12 years ago)
Author:
Peter Johansson
Message:

Merged patch release 0.6.7 to trunk. Delta 0.6.7 - 0.6.6

Location:
trunk
Files:
47 edited

Legend:

Unmodified
Added
Removed
  • trunk/AUTHORS

    r693 r768  
    22
    33Copyright (C) 2005, 2006, 2008 Jari Häkkinen
     4Copyright (C) 2007, 2008 Peter Johansson
    45
    56Files are copyright by their respective authors. The contributions to
  • trunk/ChangeLog

    r693 r768  
    44Copyright (C) 2005, 2006 Jari Häkkinen
    55Copyright (C) 2007 Jari Häkkinen, Peter Johansson
    6 Copyright (C) 2008 Peter Johansson
     6Copyright (C) 2008, 2009 Peter Johansson
    77
    88This file is part of svndigest, http://dev.thep.lu.se/svndigest
     
    2929  - http://dev.thep.lu.se/svndigest/log/trunk?rev=HEAD&stop_rev=418
    3030  - http://dev.thep.lu.se/svndigest/query?milestone=0.7&order=id
     31
     32version 0.6.7:
     33  - http://dev.thep.lu.se/svndigest/log/branches/0.6-stable?rev=765&stop_rev=687
     34  - http://dev.thep.lu.se/svndigest/query?milestone=svndigest+0.6.7&order=id
    3135
    3236version 0.6.6:
  • trunk/Makefile.am

    r724 r768  
    44
    55# Copyright (C) 2005, 2006 Jari Häkkinen
    6 # Copyright (C) 2007 2008 Peter Johansson
     6# Copyright (C) 2007, 2008 Peter Johansson
    77#
    88# This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/NEWS

    r693 r768  
    1212  http://dev.thep.lu.se/svndigest/query?status=closed&milestone=0.7
    1313
     14version 0.6.7 (released 1 February 2009)
     15  - Improved TracLinks (issue #353)
     16  - Daylight saving time is now handled correctly (issue #353)
     17
     18  A complete list of closed tickets can be found here [[br]]
     19  http://dev.thep.lu.se/svndigest/query?status=closed&milestone=svndigest+0.6.7
     20
    1421version 0.6.6 (released 4 August 2008)
    1522  - Improved removal of sub-directory in --target dir (ticket:242 ticket:243)
     
    1724
    1825  A complete list of closed tickets can be found here [[br]]
    19   http://dev.thep.lu.se/svndigest/query?status=closed&milestone=0.6.6
     26  http://dev.thep.lu.se/svndigest/query?status=closed&milestone=svndigest+0.6.6
    2027
    2128version 0.6.5 (released 18 March 2008)
     
    2431
    2532  A complete list of closed tickets can be found here [[br]]
    26   http://dev.thep.lu.se/svndigest/query?status=closed&milestone=0.6.5
     33  http://dev.thep.lu.se/svndigest/query?status=closed&milestone=svndigest+0.6.5
    2734
    2835version 0.6.4 (released 14 October 2007)
     
    95102Copyright (C) 2005, 2006 Jari Häkkinen
    96103Copyright (C) 2007 Jari Häkkinen, Peter Johansson
    97 Copyright (C) 2008 Peter Johansson
     104Copyright (C) 2008, 2009 Peter Johansson
    98105
    99106This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/README

    r694 r768  
    116116{{{
    117117Copyright (C) 2005, 2006 Jari Häkkinen
    118 Copyright (C) 2007 2008 Jari Häkkinen, Peter Johansson
     118Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
    119119
    120120This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/bin/Makefile.am

    r721 r768  
    55# Copyright (C) 2005 Jari Häkkinen
    66# Copyright (C) 2006 Jari Häkkinen, Peter Johansson
    7 # Copyright (C) 2007 Peter Johansson
     7# Copyright (C) 2007, 2008 Peter Johansson
    88# Copyright (C) 2008 Jari Häkkinen, Peter Johansson
    99#
  • trunk/bin/Parameter.h

    r705 r768  
    66/*
    77  Copyright (C) 2006 Jari Häkkinen, Peter Johansson
    8   Copyright (C) 2007 Peter Johansson
     8  Copyright (C) 2007, 2008 Peter Johansson
    99
    1010  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/bootstrap

    r693 r768  
    88
    99# Copyright (C) 2005, 2006 Jari Häkkinen
    10 # Copyright (C) 2007 Peter Johansson
     10# Copyright (C) 2007, 2008 Peter Johansson
    1111#
    1212# This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/doc/readme.txt

    r711 r768  
    168168Copyright (C) 2005 Jari Häkkinen
    169169Copyright (C) 2006 Jari Häkkinen, Peter Johansson
    170 Copyright (C) 2007 2008 Peter Johansson
     170Copyright (C) 2007, 2008 Peter Johansson
    171171
    172172This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/Alias.cc

    r693 r768  
    22
    33/*
    4   Copyright (C) 2007 Peter Johansson
     4  Copyright (C) 2007, 2008 Peter Johansson
    55
    66  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/Alias.h

    r693 r768  
    55
    66/*
    7   Copyright (C) 2007 Peter Johansson
     7  Copyright (C) 2007, 2008 Peter Johansson
    88
    99  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/ColumnStream.cc

    r693 r768  
    22
    33/*
    4   Copyright (C) 2007 Peter Johansson
     4  Copyright (C) 2007, 2008 Peter Johansson
    55
    66  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/ColumnStream.h

    r693 r768  
    55
    66/*
    7   Copyright (C) 2007 Peter Johansson
     7  Copyright (C) 2007, 2008 Peter Johansson
    88  Copyright (C) 2008 Jari Häkkinen
    99
  • trunk/lib/Commitment.cc

    r693 r768  
    22
    33/*
    4   Copyright (C) 2007 Peter Johansson
     4  Copyright (C) 2007, 2008 Peter Johansson
    55
    66  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/Commitment.h

    r756 r768  
    55
    66/*
    7   Copyright (C) 2007 Peter Johansson
     7  Copyright (C) 2007, 2008 Peter Johansson
    88
    99  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/Configuration.cc

    r745 r768  
    22
    33/*
    4   Copyright (C) 2007 Peter Johansson
     4  Copyright (C) 2007, 2008 Peter Johansson
    55  Copyright (C) 2008 Jari Häkkinen
    66
  • trunk/lib/Configuration.h

    r693 r768  
    55
    66/*
    7   Copyright (C) 2007 Peter Johansson
     7  Copyright (C) 2007, 2008 Peter Johansson
    88
    99  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/Date.cc

    r754 r768  
    33/*
    44  Copyright (C) 2007 Peter Johansson
    5   Copyright (C) 2008 Jari Häkkinen
     5  Copyright (C) 2008 Jari Häkkinen, Peter Johansson
    66  Copyright (C) 2009 Peter Johansson
    77
  • trunk/lib/Date.h

    r693 r768  
    55
    66/*
    7   Copyright (C) 2007 Peter Johansson
     7  Copyright (C) 2007, 2008 Peter Johansson
    88
    99  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/Gnuplot.h

    r693 r768  
    66/*
    77  Copyright (C) 2006 Jari Häkkinen, Peter Johansson
     8  Copyright (C) 2007, 2008 Peter Johansson
    89
    910  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/GnuplotFE.cc

    r693 r768  
    44  Copyright (C) 2006 Jari Häkkinen
    55  Copyright (C) 2007 Peter Johansson
    6   Copyright (C) 2008 Jari Häkkinen
     6  Copyright (C) 2008 Jari Häkkinen, Peter Johansson
    77
    88  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/GnuplotFE.h

    r693 r768  
    77  Copyright (C) 2006 Jari Häkkinen, Peter Johansson
    88  Copyright (C) 2007 Peter Johansson
    9   Copyright (C) 2008 Jari Häkkinen
     9  Copyright (C) 2008 Jari Häkkinen, Peter Johansson
    1010
    1111  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/HtmlStream.cc

    r693 r768  
    33/*
    44  Copyright (C) 2007 Jari Häkkinen, Peter Johansson
     5  Copyright (C) 2008 Peter Johansson
    56
    67  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/HtmlStream.h

    r693 r768  
    55
    66/*
    7   Copyright (C) 2007 Peter Johansson
     7  Copyright (C) 2007, 2008 Peter Johansson
    88
    99  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/Makefile.am

    r746 r768  
    55# Copyright (C) 2005 Jari Häkkinen
    66# Copyright (C) 2006 Jari Häkkinen, Peter Johansson
    7 # Copyright (C) 2007 Peter Johansson
     7# Copyright (C) 2007, 2008 Peter Johansson
    88# Copyright (C) 2008 Jari Häkkinen, Peter Johansson
    99# Copyright (C) 2009 Peter Johansson
  • trunk/lib/SVNblame.cc

    r693 r768  
    44  Copyright (C) 2006 Jari Häkkinen
    55  Copyright (C) 2007 Jari Häkkinen, Peter Johansson
     6  Copyright (C) 2008 Peter Johansson
    67
    78  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/SVNblame.h

    r693 r768  
    77  Copyright (C) 2006 Jari Häkkinen
    88  Copyright (C) 2007 Jari Häkkinen, Peter Johansson
     9  Copyright (C) 2008 Peter Johansson
    910
    1011  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/SVNinfo.cc

    r693 r768  
    44  Copyright (C) 2006 Jari Häkkinen
    55  Copyright (C) 2007 Jari Häkkinen, Peter Johansson
     6  Copyright (C) 2008 Peter Johansson
    67
    78  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/SVNinfo.h

    r693 r768  
    77  Copyright (C) 2006 Jari Häkkinen
    88  Copyright (C) 2007 Jari Häkkinen, Peter Johansson
     9  Copyright (C) 2008 Peter Johansson
    910
    1011  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/SVNlog.cc

    r759 r768  
    22
    33/*
    4   Copyright (C) 2007 Jari Häkkinen, Peter Johansson
     4  Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
    55
    66  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/SVNlog.h

    r759 r768  
    66/*
    77  Copyright (C) 2007 Jari Häkkinen, Peter Johansson
     8  Copyright (C) 2008 Peter Johansson
    89
    910  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/SVNproperty.cc

    r693 r768  
    33/*
    44  Copyright (C) 2006 Jari Häkkinen
     5  Copyright (C) 2007, 2008 Peter Johansson
    56
    67  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/SVNproperty.h

    r693 r768  
    66/*
    77  Copyright (C) 2006 Jari Häkkinen
     8  Copyright (C) 2007, 2008 Peter Johansson
    89
    910  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/Stats.cc

    r704 r768  
    44  Copyright (C) 2005 Peter Johansson
    55  Copyright (C) 2006, 2007 Jari Häkkinen, Peter Johansson
     6  Copyright (C) 2008 Peter Johansson
    67
    78  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/Stats.h

    r704 r768  
    77  Copyright (C) 2005 Peter Johansson
    88  Copyright (C) 2006 Jari Häkkinen, Peter Johansson
    9   Copyright (C) 2007 Peter Johansson
     9  Copyright (C) 2007, 2008 Peter Johansson
    1010
    1111  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/Trac.cc

    r693 r768  
    33/*
    44  Copyright (C) 2007 Jari Häkkinen, Peter Johansson
     5  Copyright (C) 2008, 2009 Peter Johansson
    56
    67  This file is part of svndigest, http://dev.thep.lu.se/svndigest
     
    4849
    4950
    50   bool Trac::changeset(std::string::const_iterator& first,
     51  bool Trac::changeset(const std::string::const_iterator& first,
     52                       std::string::const_iterator& iter,
    5153                       const std::string::const_iterator& last,
    5254                       const std::string::const_iterator& last_trunc)
    5355  {
    54     if (changeset1(first, last, last_trunc))
    55       return true;
    56     if (changeset2(first, last, last_trunc))
    57       return true;
    58     if (changeset3(first, last, last_trunc))
     56    if (changeset1(first, iter, last, last_trunc))
     57      return true;
     58    if (changeset2(iter, last, last_trunc))
     59      return true;
     60    if (changeset3(iter, last, last_trunc))
    5961      return true;
    6062    return false;
     
    6264
    6365
    64   bool Trac::changeset1(std::string::const_iterator& first,
     66  bool Trac::changeset1(const std::string::const_iterator& first,
     67                        std::string::const_iterator& iter,
    6568                        const std::string::const_iterator& last,
    6669                        const std::string::const_iterator& last_trunc)
    6770  {
    68     if (first==last)
    69       return false;
    70     if (*first != 'r')
    71       return false;
    72     const std::string::const_iterator first_orig(first);
    73     ++first;
    74     std::string rev = match(first, last, Digit());
    75     if (rev.empty()){
    76       first = first_orig;
     71    if (iter==last)
     72      return false;
     73    if (*iter != 'r')
     74      return false;
     75    if (iter!=first && isalnum(*(iter-1)))
     76      return false;
     77    const std::string::const_iterator iter_orig(iter);
     78    ++iter;
     79    std::string rev = match(iter, last, Digit());
     80    if (rev.empty() || (iter!=last && (std::isalnum(*iter) || *iter==':')) ){
     81      iter = iter_orig;
    7782      return false;
    7883    }
    7984    std::string href(Configuration::instance().trac_root()+"changeset/"+rev);
    80     hs_.stream() << anchor(href, anchor_text(first_orig, first, last_trunc));
     85    hs_.stream() << anchor(href, anchor_text(iter_orig, iter, last_trunc));
    8186    return true;
    8287  }
     
    288293
    289294
    290   bool Trac::log(std::string::const_iterator& first,
     295  bool Trac::log(const std::string::const_iterator& first,
     296                 std::string::const_iterator& iter,
    291297                 const std::string::const_iterator& last,
    292298                 const std::string::const_iterator& last_trunc)
    293299  {
    294     if (log1(first, last, last_trunc))
    295       return true;
    296     if (log2(first, last, last_trunc))
    297       return true;
    298     if (log3(first, last, last_trunc))
     300    if (log1(first, iter, last, last_trunc))
     301      return true;
     302    if (log2(iter, last, last_trunc))
     303      return true;
     304    if (log3(iter, last, last_trunc))
    299305      return true;
    300306    return false;
     
    302308
    303309
    304   bool Trac::log1(std::string::const_iterator& first,
     310  bool Trac::log1(const std::string::const_iterator& first,
     311                  std::string::const_iterator& iter,
    305312                  const std::string::const_iterator& last,
    306313                  const std::string::const_iterator& last_trunc)
    307314  {
    308     if (first==last)
    309       return false;
    310 
    311     const std::string::const_iterator first_orig(first);
    312     if (*first != 'r')
    313       return false;
    314     ++first;
    315 
    316     std::string stop_rev = match(first, last, AlNum());
    317     if (stop_rev.empty() || first == last || *first != ':') {
    318       first = first_orig;
    319       return false;
    320     }
    321     ++first;
    322     std::string rev = match(first, last, AlNum());
    323     if (rev.empty() ) {
    324       first = first_orig;
     315    if (iter==last)
     316      return false;
     317
     318    const std::string::const_iterator iter_orig(iter);
     319    if (*iter != 'r')
     320      return false;
     321    if (iter!=first && isalnum(*(iter-1)))
     322      return false;
     323    ++iter;
     324
     325    std::string stop_rev = match(iter, last, Digit());
     326    if (stop_rev.empty() || iter == last || *iter != ':') {
     327      iter = iter_orig;
     328      return false;
     329    }
     330    ++iter;
     331    std::string rev = match(iter, last, Digit());
     332    if (rev.empty() || (iter!=last && std::isalnum(*iter) ) ){
     333      iter = iter_orig;
    325334      return false;
    326335    }
    327336    std::string href(Configuration::instance().trac_root()+"log/?rev="+
    328337                     rev+"&amp;stop_rev="+stop_rev);
    329     hs_.stream() << anchor(href, anchor_text(first_orig,first, last_trunc));
     338    hs_.stream() << anchor(href, anchor_text(iter_orig,iter, last_trunc));
    330339    return true;
    331340  }
     
    445454      last_trunc = first+width;
    446455    while (first<last_trunc) {
    447       if (log(first, str.end(), last_trunc))
     456      if (log(str.begin(), first, str.end(), last_trunc))
    448457        continue;
    449458      if (comment(first, str.end(), last_trunc))
     
    451460      if (ticket(first, str.end(), last_trunc))
    452461        continue;
    453       if (changeset(first, str.end(), last_trunc))
     462      if (changeset(str.begin(), first, str.end(), last_trunc))
    454463        continue;
    455464      if (diff(first, str.end(), last_trunc))
  • trunk/lib/Trac.h

    r693 r768  
    55
    66/*
    7   Copyright (C) 2007 Peter Johansson
     7  Copyright (C) 2007, 2008, 2009 Peter Johansson
    88
    99  This file is part of svndigest, http://dev.thep.lu.se/svndigest
     
    5858    /// @return true if any of changesetX returns true
    5959    ///
    60     bool changeset(std::string::const_iterator& first,
     60    bool changeset(const std::string::const_iterator& first,
     61                   std::string::const_iterator& iter,
    6162                   const std::string::const_iterator& last,
    6263                   const std::string::const_iterator& last_trunc);
     
    6667    ///
    6768    /// Search in range [\a first, \a last) for expression
    68     /// /r(\d+)/. If expression is found an anchor to
    69     /// trac-root/changeset/123, displaying expression, and first is
    70     /// pointing to character after expression.
    71     ///
    72     /// @return true if expression is found
    73     ///
    74     bool changeset1(std::string::const_iterator& first,
     69    /// /r(\d+)/. In addition character before cannot be
     70    /// alpha-numeric, and character after expression cannot be
     71    /// alpha-numeric or ':' (beginning/end of string is allowed). If
     72    /// expression is found an anchor to trac-root/changeset/123,
     73    /// displaying expression, and first is pointing to character
     74    /// after expression.
     75    ///
     76    /// @return true if expression is found
     77    ///
     78    bool changeset1(const std::string::const_iterator& first,
     79                    std::string::const_iterator& iter,
    7580                    const std::string::const_iterator& last,
    7681                    const std::string::const_iterator& last_trunc);
     
    187192    /// @return true if any of logX returns true
    188193    ///
    189     bool log(std::string::const_iterator& first,
     194    bool log(const std::string::const_iterator& first,
     195             std::string::const_iterator& iter,
    190196             const std::string::const_iterator& last,
    191197             const std::string::const_iterator& last_trunc);
     
    195201    ///
    196202    /// Search in range [\a first, \a last) for expression
    197     /// /r(\w+):(\w+)/. If expression is found an
    198     /// anchor is created, displaying the expression, and first is
    199     /// pointing to character after expression.
     203    /// /r(\d+):(\d+)/. In addition character before and after
     204    /// expression cannot be alpha-numeric (beginning/end of string is
     205    /// allowed). If expression is found an anchor is created,
     206    /// displaying the expression, and iter is pointing to character
     207    /// after expression.
    200208    ///
    201209    /// The created anchor goes to trac-root/log/?rev=236&stop_rev=123
     
    203211    /// @return true if expression is found
    204212    ///
    205     bool log1(std::string::const_iterator& first,
     213    bool log1(const std::string::const_iterator& first,
     214              std::string::const_iterator& iter,
    206215              const std::string::const_iterator& last,
    207216              const std::string::const_iterator& last_trunc);
  • trunk/lib/css.h

    r693 r768  
    55
    66/*
    7   Copyright (C) 2006, 2007 Peter Johansson
     7  Copyright (C) 2006, 2007, 2008 Peter Johansson
    88
    99  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/first_page.h

    r693 r768  
    55
    66/*
    7   Copyright (C) 2006, 2007 Peter Johansson
     7  Copyright (C) 2006, 2007, 2008 Peter Johansson
    88
    99  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/html_utility.h

    r750 r768  
    66/*
    77  Copyright (C) 2006 Peter Johansson
    8   Copyright (C) 2007 Jari Häkkinen, Peter Johansson
    9   Copyright (C) 2008 Jari Häkkinen
     8  Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
    109  Copyright (C) 2008 Peter Johansson
    1110
  • trunk/lib/rmdirhier.cc

    r693 r768  
    22
    33/*
    4   Copyright (C) 2006 Jari Häkkinen, Peter Johansson
    5   Copyright (C) 2008 Peter Johansson
     4  Copyright (C) 2006 Jari Häkkinen
     5  Copyright (C) 2007, 2008 Peter Johansson
    66
    77  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/rmdirhier.h

    r693 r768  
    55
    66/*
    7   Copyright (C) 2006 Jari Häkkinen, Peter Johansson
    8   Copyright (C) 2007 Peter Johansson
     7  Copyright (C) 2006 Jari Häkkinen
     8  Copyright (C) 2007, 2008 Peter Johansson
    99
    1010  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/utility.cc

    r755 r768  
    33/*
    44  Copyright (C) 2006, 2007, 2009 Jari Häkkinen, Peter Johansson
     5  Copyright (C) 2008 Peter Johansson
    56
    67  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/utility.h

    r727 r768  
    55
    66/*
    7   Copyright (C) 2005, 2006, 2007 Jari Häkkinen, Peter Johansson
    8   Copyright (C) 2008 Jari Häkkinen
     7  Copyright (C) 2005 Peter Johansson
     8  Copyright (C) 2006, 2007, 2008 Jari Häkkinen, Peter Johansson
    99
    1010  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/test/Makefile.am

    r744 r768  
    55# Copyright (C) 2005, 2006, 2007, 2008 Jari Häkkinen, Peter Johansson
    66# Copyright (C) 2009 Peter Johansson
     7# Copyright (C) 2008 Peter Johansson
    78#
    89# This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/test/trac_test.cc

    r693 r768  
    22
    33/*
    4   Copyright (C) 2007 Peter Johansson
     4  Copyright (C) 2007, 2008, 2009 Peter Johansson
    55
    66  This file is part of svndigest, http://dev.thep.lu.se/svndigest
     
    3131
    3232bool test(std::string mess, std::string href, std::ostream&);
     33bool test_no_anchor(std::string str, std::ostream&);
    3334
    3435int main(const int argc,const char* argv[])
     
    7879  ok &= test("#65", conf.trac_root()+"ticket/65", my_out);
    7980  ok &= test("ticket:65", conf.trac_root()+"ticket/65", my_out);
     81  ok &= test_no_anchor("Container2D", my_out);
     82  ok &= test_no_anchor("r2b", my_out);
     83  ok &= test_no_anchor("ar2", my_out);
     84  ok &= test_no_anchor("2r2", my_out);
     85  ok &= test_no_anchor("r2r3", my_out);
     86  ok &= test_no_anchor("ar2:3", my_out);
     87  ok &= test_no_anchor("r2:3a", my_out);
    8088
    8189  if (ok)
     
    100108}
    101109
     110bool test_no_anchor(std::string str, std::ostream& os)
     111{
     112  using namespace theplu::svndigest;
     113  std::stringstream ss;
     114  HtmlStream html(ss);
     115  Trac trac(html);
     116  trac.print(str,80);
     117  if (ss.str()!=str) {
     118    os << "error:\n";
     119    os << "  message: " << str << std::endl;
     120    os << "  trac generates output:\n     " << ss.str() << std::endl;
     121    os << "  expected:\n     " << str << std::endl;
     122    return false;
     123  }
     124  return true;
     125}
  • trunk/test/utility_test.cc

    r693 r768  
    33/*
    44  Copyright (C) 2007 Peter Johansson
    5   Copyright (C) 2008 Jari Häkkinen
     5  Copyright (C) 2008 Jari Häkkinen, Peter Johansson
    66
    77  This file is part of svndigest, http://dev.thep.lu.se/svndigest
Note: See TracChangeset for help on using the changeset viewer.