Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68877 - in branches/quickbook-filenames/tools/quickbook: src test/doc-info
From: dnljms_at_[hidden]
Date: 2011-02-14 19:15:57


Author: danieljames
Date: 2011-02-14 19:15:55 EST (Mon, 14 Feb 2011)
New Revision: 68877
URL: http://svn.boost.org/trac/boost/changeset/68877

Log:
Fix empty category.
Added:
   branches/quickbook-filenames/tools/quickbook/test/doc-info/
   branches/quickbook-filenames/tools/quickbook/test/doc-info/Jamfile.v2 (contents, props changed)
   branches/quickbook-filenames/tools/quickbook/test/doc-info/empty-attributes.gold (contents, props changed)
   branches/quickbook-filenames/tools/quickbook/test/doc-info/empty-attributes.quickbook (contents, props changed)
Text files modified:
   branches/quickbook-filenames/tools/quickbook/src/doc_info_actions.cpp | 13 ++++++++-----
   1 files changed, 8 insertions(+), 5 deletions(-)

Modified: branches/quickbook-filenames/tools/quickbook/src/doc_info_actions.cpp
==============================================================================
--- branches/quickbook-filenames/tools/quickbook/src/doc_info_actions.cpp (original)
+++ branches/quickbook-filenames/tools/quickbook/src/doc_info_actions.cpp 2011-02-14 19:15:55 EST (Mon, 14 Feb 2011)
@@ -281,11 +281,14 @@
                 end = actions.doc_categories.end();
                 it != end; ++it)
             {
- tmp << " <" << actions.doc_type << "category name=\"category:"
- << it->get(106)
- << "\"></" << actions.doc_type << "category>\n"
- << "\n"
- ;
+ if (!it->empty())
+ {
+ tmp << " <" << actions.doc_type << "category name=\"category:"
+ << it->get(106)
+ << "\"></" << actions.doc_type << "category>\n"
+ << "\n"
+ ;
+ }
             }
         }
 

Added: branches/quickbook-filenames/tools/quickbook/test/doc-info/Jamfile.v2
==============================================================================
--- (empty file)
+++ branches/quickbook-filenames/tools/quickbook/test/doc-info/Jamfile.v2 2011-02-14 19:15:55 EST (Mon, 14 Feb 2011)
@@ -0,0 +1,15 @@
+#
+# Copyright (c) 2005 João Abecasis
+#
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+#
+
+project quickook/tests/doc-info ;
+
+import quickbook-testing : quickbook-test quickbook-fail-test ;
+
+test-suite quickbook.test :
+ [ quickbook-test empty-attributes ]
+ ;

Added: branches/quickbook-filenames/tools/quickbook/test/doc-info/empty-attributes.gold
==============================================================================
--- (empty file)
+++ branches/quickbook-filenames/tools/quickbook/test/doc-info/empty-attributes.gold 2011-02-14 19:15:55 EST (Mon, 14 Feb 2011)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<library id="empty_attributes" name="Empty Attributes" dirname="empty_attributes"
+last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <libraryinfo>
+ <authorgroup>
+ <author>
+ <firstname></firstname> <surname></surname>
+ </author>
+ </authorgroup>
+ <copyright>
+ <year>2011</year> <holder></holder>
+ </copyright>
+ </libraryinfo>
+ <title>Empty Attributes</title>
+ <para>
+ <literal>biblioid</literal> and <literal>source-mode</literal> can't be empty.
+ </para>
+</library>

Added: branches/quickbook-filenames/tools/quickbook/test/doc-info/empty-attributes.quickbook
==============================================================================
--- (empty file)
+++ branches/quickbook-filenames/tools/quickbook/test/doc-info/empty-attributes.quickbook 2011-02-14 19:15:55 EST (Mon, 14 Feb 2011)
@@ -0,0 +1,14 @@
+[library Empty Attributes
+[version]
+[id]
+[dirname]
+[copyright 2011]
+[purpose]
+[category]
+[authors [,]]
+[license]
+[last-revision]
+[lang]
+]
+
+=biblioid= and =source-mode= can't be empty.


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk