Quickbook: Rename and rearrange some tests.

- More consistent names.
- Not using `.` in basename.
- Run the quickbook manual test last (as when there's an error, the more
  specific tests are more informative).
- Combine some of the code tests.

[SVN r75235]
This commit is contained in:
Daniel James
2011-11-01 19:20:46 +00:00
parent 347e0b817d
commit 152fe4fa5d
135 changed files with 216 additions and 250 deletions

View File

@@ -20,78 +20,77 @@ build-project "include" ;
import quickbook-testing : quickbook-test quickbook-error-test ;
test-suite quickbook.test :
[ quickbook-test quickbook-manual ]
[ quickbook-test code-block ]
[ quickbook-test code-block-1 ]
[ quickbook-test code-block-2 ]
[ quickbook-test code-block-3 ]
[ quickbook-test code-block-teletype ]
[ quickbook-test code-block-cpp ]
[ quickbook-test code-block-python ]
[ quickbook-test code-snippet ]
[ quickbook-test preformatted ]
[ quickbook-test link ]
[ quickbook-test escape ]
[ quickbook-test templates ]
[ quickbook-test templates_1_4 ]
[ quickbook-test templates_1_5 ]
[ quickbook-test template-section ]
[ quickbook-test mismatched-brackets-1 ]
[ quickbook-test mismatched-brackets-2 ]
[ quickbook-error-test mismatched-brackets-3 ]
[ quickbook-test xinclude : : : <quickbook-xinclude-base>../src ]
[ quickbook-test include_1_5 ]
[ quickbook-test include_1_6 ]
[ quickbook-test include_1_6-2 ]
[ quickbook-test section_1_4 ]
[ quickbook-test section_1_5 ]
[ quickbook-test section_1_5-unclosed ]
[ quickbook-test heading_1_1 ]
[ quickbook-test heading_1_3 ]
[ quickbook-test heading_1_5 ]
[ quickbook-test heading_1_6 ]
[ quickbook-test identifier_1_5 ]
[ quickbook-test identifier_1_6 ]
[ quickbook-test para-test ]
[ quickbook-test variablelist ]
[ quickbook-test table_1_3 ]
[ quickbook-test table_1_5 ]
[ quickbook-test image_1_5 ]
[ quickbook-test list_test ]
[ quickbook-test cond_phrase ]
[ quickbook-test macro-1.5 ]
[ quickbook-test macro-1.6 ]
[ quickbook-test callouts ]
[ quickbook-test simple_markup ]
[ quickbook-test xml-escape_1_2 ]
[ quickbook-test xml-escape_1_5 ]
[ quickbook-test blocks ]
[ quickbook-test elements_1_5 ]
[ quickbook-test elements_1_6 ]
[ quickbook-test newline ]
[ quickbook-test anchor ]
[ quickbook-test command_line_macro : : : <quickbook-test-define>__macro__=*bold* ]
[ quickbook-error-test fail-include ]
[ quickbook-error-test fail-import ]
[ quickbook-error-test fail-template-arguments1 ]
[ quickbook-error-test fail-template-arguments2 ]
[ quickbook-error-test fail-template-arguments3 ]
[ quickbook-error-test fail-cpp-mismatched-escape ]
[ quickbook-error-test fail-python-mismatched-escape ]
[ quickbook-error-test fail-post-process ]
[ quickbook-error-test fail-parse-error1 ]
[ quickbook-error-test fail-parse-error2 ]
[ quickbook-error-test fail-template-lookup1 ]
[ quickbook-error-test fail-template-section-1 ]
[ quickbook-error-test fail-template-section-2 ]
[ quickbook-error-test fail-template-section-3 ]
[ quickbook-error-test fail-unknown-quickbook-1 ]
[ quickbook-error-test fail-unknown-quickbook-2 ]
[ quickbook-error-test fail-unknown-quickbook-3 ]
[ quickbook-error-test fail-mismatched-boostbook-escape ]
[ quickbook-test utf-8 ]
[ quickbook-test utf-8-bom ]
[ quickbook-test unicode-escape ]
[ quickbook-error-test utf-16be-bom ]
[ quickbook-error-test utf-16le-bom ]
[ quickbook-test anchor-1_1 ]
[ quickbook-test blocks-1_5 ]
[ quickbook-test callouts-1_5 ]
[ quickbook-test code-1_1 ]
[ quickbook-test code-1_5 ]
[ quickbook-test code_cpp-1_5 ]
[ quickbook-error-test code_cpp_mismatched_escape-1_4-fail ]
[ quickbook-test code_python-1_5 ]
[ quickbook-error-test code_python_mismatched_escape-1_4-fail ]
[ quickbook-test code_snippet-1_1 ]
[ quickbook-test code_teletype-1_5 ]
[ quickbook-test command_line_macro-1_1 : : : <quickbook-test-define>__macro__=*bold* ]
[ quickbook-test cond_phrase-1_5 ]
[ quickbook-test elements-1_5 ]
[ quickbook-test elements-1_6 ]
[ quickbook-test escape-1_1 ]
[ quickbook-error-test escape-mismatched-1_5-fail ]
[ quickbook-test heading-1_1 ]
[ quickbook-test heading-1_3 ]
[ quickbook-test heading-1_5 ]
[ quickbook-test heading-1_6 ]
[ quickbook-error-test heading_unclosed-1_4-fail ]
[ quickbook-test identifier-1_5 ]
[ quickbook-test identifier-1_6 ]
[ quickbook-test image-1_5 ]
[ quickbook-error-test import-1_1-fail ]
[ quickbook-error-test include-1_1-fail ]
[ quickbook-test include-1_5 ]
[ quickbook-test include-1_6 ]
[ quickbook-test include2-1_6 ]
[ quickbook-test link-1_1 ]
[ quickbook-test list_test-1_5 ]
[ quickbook-test macro-1_5 ]
[ quickbook-test macro-1_6 ]
[ quickbook-error-test mismatched_brackets-1_1-fail ]
[ quickbook-test mismatched_brackets1-1_1 ]
[ quickbook-test mismatched_brackets2-1_1 ]
[ quickbook-test newline-1_1 ]
[ quickbook-test para_test-1_5 ]
[ quickbook-error-test post_process-fail ]
[ quickbook-test preformatted-1_1 ]
[ quickbook-test section-1_4 ]
[ quickbook-test section-1_5-unclosed ]
[ quickbook-test section-1_5 ]
[ quickbook-test simple_markup-1_5 ]
[ quickbook-test table-1_3 ]
[ quickbook-test table-1_5 ]
[ quickbook-error-test template_arguments1-1_1-fail ]
[ quickbook-error-test template_arguments2-1_1-fail ]
[ quickbook-error-test template_arguments3-1_1-fail ]
[ quickbook-error-test template_lookup1-1_5-fail ]
[ quickbook-test template_section-1_5 ]
[ quickbook-error-test template_section1-1_5-fail ]
[ quickbook-error-test template_section2-1_5-fail ]
[ quickbook-error-test template_section3-1_5-fail ]
[ quickbook-test templates-1_3 ]
[ quickbook-test templates-1_4 ]
[ quickbook-test templates-1_5 ]
[ quickbook-test unicode_escape-1_5 ]
[ quickbook-error-test utf16be_bom-1_5-fail ]
[ quickbook-error-test utf16le_bom-1_5-fail ]
[ quickbook-test utf8-1_5 ]
[ quickbook-test utf8_bom-1_5 ]
[ quickbook-error-test variablelist-1_5-fail ]
[ quickbook-test variablelist-1_5 ]
[ quickbook-error-test version-0_1-fail ]
[ quickbook-error-test version-1_7-fail ]
[ quickbook-error-test version-2_0-fail ]
[ quickbook-test xinclude-1_1 : : : <quickbook-xinclude-base>../src ]
[ quickbook-test xml_escape-1_2 ]
[ quickbook-test xml_escape-1_5 ]
[ quickbook-test quickbook_manual-1_4 ]
;

View File

@@ -1,5 +1,4 @@
[article Anchor Test
]
[article Anchor Test]
[section Anchors]

52
test/code-1_1.gold Normal file
View File

@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
<article id="code_block" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>Code Block</title>
<section id="code_block.test_1">
<title>Test 1</title>
<para>
A code block with proper indentation ;-)
</para>
<programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">iostream</phrase><phrase role="special">&gt;</phrase>
<phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
<phrase role="special">{</phrase>
<phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;Hello, World!&quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
<phrase role="keyword">return</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
<phrase role="special">}</phrase>
</programlisting>
</section>
<section id="code_block.test_2">
<title>Test 2</title>
<para>
A code block with proper indentation ;-)
</para>
<para>
<programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">iostream</phrase><phrase role="special">&gt;</phrase>
<phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
<phrase role="special">{</phrase>
<phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;Hello, World!&quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
<phrase role="keyword">return</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
<phrase role="special">}</phrase>
</programlisting>
</para>
</section>
<section id="code_block.test_3">
<title>Test 3</title>
<para>
<programlisting><phrase role="keyword">print</phrase> <phrase role="string">&quot;\xfabln\xeck&quot;</phrase>
</programlisting>
</para>
</section>
<section id="code_block.test_4">
<title>Test 4</title>
<para>
This isn't valid C++ but I think we should accept it;
</para>
<para>
<programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase><phrase role="special">&lt;&lt;</phrase><phrase role="string">&quot;\xfabln\xeck&quot;</phrase><phrase role="special">&lt;&lt;</phrase><phrase role="string">&quot;\n&quot;</phrase><phrase role="special">;</phrase>
</programlisting>
</para>
</section>
</article>

51
test/code-1_1.quickbook Normal file
View File

@@ -0,0 +1,51 @@
[article Code Block]
[section Test 1]
A code block with proper indentation ;-)
#include <iostream>
int main()
{
std::cout << "Hello, World!" << std::endl;
return 0;
}
[endsect]
[section Test 2]
A code block with proper indentation ;-)
``
#include <iostream>
int main()
{
std::cout << "Hello, World!" << std::endl;
return 0;
}
``
[endsect]
[section Test 3]
[python]
``
print "\xfabln\xeck"
``
[endsect]
[section Test 4]
This isn't valid C++ but I think we should accept it;
[c++]
``
std::cout<<"\xfabln\xeck"<<"\n";
``
[endsect]

View File

@@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
<article id="code_block_1" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
xmlns:xi="http://www.w3.org/2001/XInclude">
<title>Code Block 1</title>
<section id="code_block_1.a_code_block">
<title>A code block</title>
<para>
A code block with proper indentation ;-)
</para>
<programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">iostream</phrase><phrase role="special">&gt;</phrase>
<phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
<phrase role="special">{</phrase>
<phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;Hello, World!&quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
<phrase role="keyword">return</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
<phrase role="special">}</phrase>
</programlisting>
</section>
</article>

View File

@@ -1,16 +0,0 @@
[article Code Block 1
]
[section A code block]
A code block with proper indentation ;-)
#include <iostream>
int main()
{
std::cout << "Hello, World!" << std::endl;
return 0;
}
[endsect]

View File

@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
<article id="code_block_2" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
xmlns:xi="http://www.w3.org/2001/XInclude">
<title>Code Block 2</title>
<section id="code_block_2.a_code_block">
<title>A code block</title>
<para>
A code block with proper indentation ;-)
</para>
<para>
<programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">iostream</phrase><phrase role="special">&gt;</phrase>
<phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
<phrase role="special">{</phrase>
<phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;Hello, World!&quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
<phrase role="keyword">return</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
<phrase role="special">}</phrase>
</programlisting>
</para>
</section>
</article>

View File

@@ -1,18 +0,0 @@
[article Code Block 2
]
[section A code block]
A code block with proper indentation ;-)
``
#include <iostream>
int main()
{
std::cout << "Hello, World!" << std::endl;
return 0;
}
``
[endsect]

View File

@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
<article id="code_block_3" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
xmlns:xi="http://www.w3.org/2001/XInclude">
<title>Code Block 3</title>
<section id="code_block_3.python_code_block">
<title>Python code block</title>
<para>
<programlisting><phrase role="keyword">print</phrase> <phrase role="string">&quot;\xfabln\xeck&quot;</phrase>
</programlisting>
</para>
</section>
<section id="code_block_3.c___code_block">
<title>C++ code block</title>
<para>
This isn't valid C++ but I think we should accept it;
</para>
<para>
<programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase><phrase role="special">&lt;&lt;</phrase><phrase role="string">&quot;\xfabln\xeck&quot;</phrase><phrase role="special">&lt;&lt;</phrase><phrase role="string">&quot;\n&quot;</phrase><phrase role="special">;</phrase>
</programlisting>
</para>
</section>
</article>

View File

@@ -1,21 +0,0 @@
[article Code Block 3]
[section Python code block]
[python]
``
print "\xfabln\xeck"
``
[endsect]
[section C++ code block]
This isn't valid C++ but I think we should accept it;
[c++]
``
std::cout<<"\xfabln\xeck"<<"\n";
``
[endsect]

View File

@@ -1,9 +1,8 @@
[article Code Block Teletype 1
[quickbook 1.5]
[source-mode teletype]
]
[teletype]
[section A code block]
[def __text__ text]

View File

@@ -25,4 +25,3 @@ Some other problematic links:
'''
[endsect]

View File

@@ -1,5 +1,4 @@
[article Heading Test 1.1
]
[article Heading Test 1.1]
[/ Basic headers ]

View File

@@ -6,6 +6,3 @@
[import this-is-not-a-file.cpp]
[endsect]

View File

@@ -6,6 +6,3 @@
[include this-is-not-a-file.qbk]
[endsect]

View File

@@ -0,0 +1,17 @@
[article Include Test
[quickbook 1.5]
[id include-test]
]
[include include_sub-1_5.qbk]
[include include_sub.qbk]
[include:foo include_sub.qbk]
[include empty.qbk]
[def __defined__]
[? __undefined__ [include:foo1 include_sub.qbk] ]
[? __undefined__ [include:foo1 not_a_file.qbk] ]
[? __defined__
Just trying including in a conditional macro. [include:foo2 include_sub.qbk]
With some text around it.]

View File

@@ -3,12 +3,13 @@
[id include-test]
]
[include include-sub2.quickbook]
[include:foo include-sub2.quickbook]
[include include_sub.qbk]
[include:foo include_sub.qbk]
[def __defined__]
[? __undefined__ [include:foo1 include-sub2.quickbook] ]
[? __undefined__ [include:foo1 include_sub.qbk] ]
[? __undefined__ [include:foo1 not-a-file.qbk] ]
[? __defined__
Just trying including in a conditional macro. [include:foo2 include-sub2.quickbook]
Just trying including in a conditional macro. [include:foo2 include_sub.qbk]
With some text around it.]

View File

@@ -0,0 +1,8 @@
[article Include Test
[quickbook 1.6]
[id include-test]
]
[include include_sub-1_5.qbk]
[include include_sub.qbk]
[include:foo include_sub.qbk]

View File

@@ -1,16 +0,0 @@
[article Include Test
[quickbook 1.5]
[id include-test]
]
[include include-sub.quickbook]
[include include-sub2.quickbook]
[include:foo include-sub2.quickbook]
[include empty.quickbook]
[def __defined__]
[? __undefined__ [include:foo1 include-sub2.quickbook] ]
[? __defined__
Just trying including in a conditional macro. [include:foo2 include-sub2.quickbook]
With some text around it.]

View File

@@ -1,8 +0,0 @@
[article Include Test
[quickbook 1.6]
[id include-test]
]
[include include-sub.quickbook]
[include include-sub2.quickbook]
[include:foo include-sub2.quickbook]

View File

@@ -29,7 +29,7 @@ Two level list:
# B
* A
* B
Three level list:
# A

View File

@@ -1887,7 +1887,7 @@ sf_logo
</entry>
<entry>
<para>
quickbook-manual.quickbook
quickbook_manual-1_4.quickbook
</para>
</entry>
</row>

View File

@@ -62,7 +62,7 @@ comment]
[
[
Header 1. Paragraph 1
Header 1. Paragraph 2
]
[
@@ -75,7 +75,7 @@ comment]
]
[
Row 1. Cell 2.
Row 1. Cell 2. Paragraph 2.
]
]

View File

@@ -82,7 +82,7 @@ comment]
[
[
Header 1. Paragraph 1
Header 1. Paragraph 2
]
[
@@ -95,7 +95,7 @@ comment]
]
[
Row 1. Cell 2.
Row 1. Cell 2. Paragraph 2.
]
]

Some files were not shown because too many files have changed in this diff Show More