Author: mnodine Date: 2010-03-01 21:18:26 +0100 (Mon, 01 Mar 2010) New Revision: 6233 Added: trunk/prest/t/70_plugins/code_block.init/code13.dom trunk/prest/t/70_plugins/code_block.init/code13.rst trunk/prest/t/70_plugins/code_block.init/code14.dom trunk/prest/t/70_plugins/code_block.init/code14.rst trunk/prest/t/70_plugins/perl.init/perl17.dom trunk/prest/t/70_plugins/perl.init/perl17.rst trunk/prest/t/70_plugins/perl.init/perl18.dom trunk/prest/t/70_plugins/perl.init/perl18.rst trunk/prest/t/70_plugins/perl.init/perl18.stderr trunk/prest/t/80_misc/transforms.init/decorations_03.dom trunk/prest/t/80_misc/transforms.init/decorations_03.rst trunk/prest/t/80_misc/transforms.init/emptytopic.dom trunk/prest/t/80_misc/transforms.init/emptytopic.rst trunk/prest/t/80_misc/transforms.init/sectnum_02.dom trunk/prest/t/80_misc/transforms.init/sectnum_02.rst trunk/prest/t/90_bugs/parse.init/list.dom trunk/prest/t/90_bugs/parse.init/list.rst trunk/prest/t/90_bugs/parse.init/title01.dom trunk/prest/t/90_bugs/parse.init/title01.rst Modified: trunk/prest/t/70_plugins/code_block.init/Dir.smak trunk/prest/t/70_plugins/perl.init/Dir.smak trunk/prest/t/80_misc/transforms.init/Dir.smak trunk/prest/t/90_bugs/parse.init/Dir.smak Log: Added tests for improved coverage Modified: trunk/prest/t/70_plugins/code_block.init/Dir.smak =================================================================== --- trunk/prest/t/70_plugins/code_block.init/Dir.smak 2010-03-01 20:17:19 UTC (rev 6232) +++ trunk/prest/t/70_plugins/code_block.init/Dir.smak 2010-03-01 20:18:26 UTC (rev 6233) @@ -6,5 +6,6 @@ (code09 => q(-D code-block-states-file=nosuchfile.rst), code10 => q(-D code-block-states-file=nosuchfile.rst), code11 => q(-D code-block-states-file=nosuchfile.rst), + code14 => q(-D code-block-states-file=nosuchfile.rst), ); } Added: trunk/prest/t/70_plugins/code_block.init/code13.dom =================================================================== --- trunk/prest/t/70_plugins/code_block.init/code13.dom 2010-03-01 20:17:19 UTC (rev 6232) +++ trunk/prest/t/70_plugins/code_block.init/code13.dom 2010-03-01 20:18:26 UTC (rev 6233) @@ -0,0 +1,46 @@ +<document source="test data"> + <paragraph> + Tests a code block with a class. + <system_message level="1" line="3" source="test data" type="INFO"> + <paragraph> + No directive entry for "code_block" in module "Text::Restructured::Directive". + Trying "code_block" as canonical directive name. + <parsed_literal classes="makefile" xml:space="preserve"> + <strong> + # A make file + + BIN_DIR = ../bin + BIN_TARGETS = $( + <emphasis> + notdir $(PRL_FILES:.prl=) $(PM_FILES) $(WRT_FILES) + ) + DIREC_PM_FILES := $( + <emphasis> + filter-out %~,$(wildcard directives/*) + ) + DIREC_TARGETS = $( + <emphasis> + subst directives,Directive,$(DIREC_PM_FILES) + ) + BINS = $( + <emphasis> + addprefix $(BIN_DIR)/,$(BIN_TARGETS) $(DIREC_TARGETS) + ) + \n\ + <emphasis> + default: + $( + <emphasis> + BIN_DIR + ) $( + <emphasis> + BIN_DIR + )/Directive $( + <emphasis> + BINS + ) + \n\ + <emphasis> + $(BIN_DIR): + + mkdir $@ Added: trunk/prest/t/70_plugins/code_block.init/code13.rst =================================================================== --- trunk/prest/t/70_plugins/code_block.init/code13.rst 2010-03-01 20:17:19 UTC (rev 6232) +++ trunk/prest/t/70_plugins/code_block.init/code13.rst 2010-03-01 20:18:26 UTC (rev 6233) @@ -0,0 +1,16 @@ +Tests a code block with a class. + +.. code_block:: makefile + :class: makefile + + # A make file + BIN_DIR = ../bin + BIN_TARGETS = $(notdir $(PRL_FILES:.prl=) $(PM_FILES) $(WRT_FILES)) + DIREC_PM_FILES := $(filter-out %~,$(wildcard directives/*)) + DIREC_TARGETS = $(subst directives,Directive,$(DIREC_PM_FILES)) + BINS = $(addprefix $(BIN_DIR)/,$(BIN_TARGETS) $(DIREC_TARGETS)) + + default: $(BIN_DIR) $(BIN_DIR)/Directive $(BINS) + + $(BIN_DIR): + mkdir $@ Added: trunk/prest/t/70_plugins/code_block.init/code14.dom =================================================================== --- trunk/prest/t/70_plugins/code_block.init/code14.dom 2010-03-01 20:17:19 UTC (rev 6232) +++ trunk/prest/t/70_plugins/code_block.init/code14.dom 2010-03-01 20:18:26 UTC (rev 6233) @@ -0,0 +1,19 @@ +<document source="test data"> + <paragraph> + Tests a code block with a class. + <system_message level="1" line="3" source="test data" type="INFO"> + <paragraph> + No directive entry for "code_block" in module "Text::Restructured::Directive". + Trying "code_block" as canonical directive name. + <literal_block classes="makefile" xml:space="preserve"> + # A make file + BIN_DIR = ../bin + BIN_TARGETS = $(notdir $(PRL_FILES:.prl=) $(PM_FILES) $(WRT_FILES)) + DIREC_PM_FILES := $(filter-out %~,$(wildcard directives/*)) + DIREC_TARGETS = $(subst directives,Directive,$(DIREC_PM_FILES)) + BINS = $(addprefix $(BIN_DIR)/,$(BIN_TARGETS) $(DIREC_TARGETS)) + \n\ + default: $(BIN_DIR) $(BIN_DIR)/Directive $(BINS) + \n\ + $(BIN_DIR): + mkdir $@ Added: trunk/prest/t/70_plugins/code_block.init/code14.rst =================================================================== --- trunk/prest/t/70_plugins/code_block.init/code14.rst 2010-03-01 20:17:19 UTC (rev 6232) +++ trunk/prest/t/70_plugins/code_block.init/code14.rst 2010-03-01 20:18:26 UTC (rev 6233) @@ -0,0 +1,16 @@ +Tests a code block with a class. + +.. code_block:: makefile + :class: makefile + + # A make file + BIN_DIR = ../bin + BIN_TARGETS = $(notdir $(PRL_FILES:.prl=) $(PM_FILES) $(WRT_FILES)) + DIREC_PM_FILES := $(filter-out %~,$(wildcard directives/*)) + DIREC_TARGETS = $(subst directives,Directive,$(DIREC_PM_FILES)) + BINS = $(addprefix $(BIN_DIR)/,$(BIN_TARGETS) $(DIREC_TARGETS)) + + default: $(BIN_DIR) $(BIN_DIR)/Directive $(BINS) + + $(BIN_DIR): + mkdir $@ Modified: trunk/prest/t/70_plugins/perl.init/Dir.smak =================================================================== --- trunk/prest/t/70_plugins/perl.init/Dir.smak 2010-03-01 20:17:19 UTC (rev 6232) +++ trunk/prest/t/70_plugins/perl.init/Dir.smak 2010-03-01 20:18:26 UTC (rev 6233) @@ -6,6 +6,7 @@ (perl08 => q(-D xformoff='(?!Pending).......$'), perl09 => q(-D perl='$a=0;$b=1'), perl10 => q(-D perl=4/0), + perl18 => q(-d -d -d), trusted01 => q(-D trusted=0), trusted03 => q(-D trusted=0 -D perl='$a=1;open F,"perl14.rst"'), ); Added: trunk/prest/t/70_plugins/perl.init/perl17.dom =================================================================== --- trunk/prest/t/70_plugins/perl.init/perl17.dom 2010-03-01 20:17:19 UTC (rev 6232) +++ trunk/prest/t/70_plugins/perl.init/perl17.dom 2010-03-01 20:18:26 UTC (rev 6233) @@ -0,0 +1,21 @@ +<document source="test data"> + <comment xml:space="preserve"> + Tests many of the global variables defined within a perl directive + <system_message level="1" line="3" source="test data" type="INFO"> + <paragraph> + No directive entry for "perl" in module "Text::Restructured::Directive". + Trying "perl" as canonical directive name. + <paragraph> + SOURCE = test data + <paragraph> + LINENO = 4 + <paragraph> + DIRECTIVE = .. perl:: "DIRECTIVE = $DIRECTIVE" + <paragraph> + SUBSTITUTION = + <substitution_definition names="subst-name"> + SUBSTITUTION = subst-name + <paragraph> + INCLUDES = + <paragraph> + TOP_FILE = perl17.rst Added: trunk/prest/t/70_plugins/perl.init/perl17.rst =================================================================== --- trunk/prest/t/70_plugins/perl.init/perl17.rst 2010-03-01 20:17:19 UTC (rev 6232) +++ trunk/prest/t/70_plugins/perl.init/perl17.rst 2010-03-01 20:18:26 UTC (rev 6233) @@ -0,0 +1,9 @@ +.. Tests many of the global variables defined within a perl directive + +.. perl:: "SOURCE = $SOURCE" +.. perl:: "LINENO = $LINENO" +.. perl:: "DIRECTIVE = $DIRECTIVE" +.. perl:: "SUBSTITUTION = $SUBSTITUTION" +.. |subst-name| perl:: "SUBSTITUTION = $SUBSTITUTION" +.. perl:: "INCLUDES = " . join ' ',@INCLUDES +.. perl:: "TOP_FILE = $TOP_FILE" Added: trunk/prest/t/70_plugins/perl.init/perl18.dom =================================================================== --- trunk/prest/t/70_plugins/perl.init/perl18.dom 2010-03-01 20:17:19 UTC (rev 6232) +++ trunk/prest/t/70_plugins/perl.init/perl18.dom 2010-03-01 20:18:26 UTC (rev 6233) @@ -0,0 +1,9 @@ +<document source="test data"> + <paragraph> + Test of the debug option. + <system_message level="1" line="3" source="test data" type="INFO"> + <paragraph> + No directive entry for "perl" in module "Text::Restructured::Directive". + Trying "perl" as canonical directive name. + <paragraph> + This text should appear. Added: trunk/prest/t/70_plugins/perl.init/perl18.rst =================================================================== --- trunk/prest/t/70_plugins/perl.init/perl18.rst 2010-03-01 20:17:19 UTC (rev 6232) +++ trunk/prest/t/70_plugins/perl.init/perl18.rst 2010-03-01 20:18:26 UTC (rev 6233) @@ -0,0 +1,3 @@ +Test of the debug option. + +.. perl:: "This text should appear." Added: trunk/prest/t/70_plugins/perl.init/perl18.stderr =================================================================== --- trunk/prest/t/70_plugins/perl.init/perl18.stderr 2010-03-01 20:17:19 UTC (rev 6232) +++ trunk/prest/t/70_plugins/perl.init/perl18.stderr 2010-03-01 20:18:26 UTC (rev 6233) @@ -0,0 +1,46 @@ +/export/home/nodine/tools/prest/blib/lib/Text/Restructured/Writer/dom.wrt, line 23 +/export/home/nodine/tools/prest/blib/lib/Text/Restructured/Writer/dom.wrt, line 36 +/export/home/nodine/tools/prest/blib/lib/Text/Restructured/Writer/dom.wrt, line 49 +/export/home/nodine/tools/prest/blib/lib/Text/Restructured/Writer/dom.wrt, line 61 +/export/home/nodine/tools/prest/blib/lib/Text/Restructured/Writer/dom.wrt, line 66 +Debug: perl: test data, 3 +PROCESS: #PCDATA +Test of the debug option. + +PROCESS: paragraph +<paragraph> + Test of the debug option. + +PROCESS: #PCDATA +No directive entry for "perl" in module "Text::Restructured::Directive". +Trying "perl" as canonical directive name. + +PROCESS: paragraph +<paragraph> + No directive entry for "perl" in module "Text::Restructured::Directive". + Trying "perl" as canonical directive name. + +PROCESS: system_message +<system_message level="1" line="3" source="test data" type="INFO"> + <paragraph> + No directive entry for "perl" in module "Text::Restructured::Directive". + Trying "perl" as canonical directive name. + +PROCESS: #PCDATA +This text should appear. + +PROCESS: paragraph +<paragraph> + This text should appear. + +PROCESS: document +<document source="test data"> + <paragraph> + Test of the debug option. + <system_message level="1" line="3" source="test data" type="INFO"> + <paragraph> + No directive entry for "perl" in module "Text::Restructured::Directive". + Trying "perl" as canonical directive name. + <paragraph> + This text should appear. + Modified: trunk/prest/t/80_misc/transforms.init/Dir.smak =================================================================== --- trunk/prest/t/80_misc/transforms.init/Dir.smak 2010-03-01 20:17:19 UTC (rev 6232) +++ trunk/prest/t/80_misc/transforms.init/Dir.smak 2010-03-01 20:18:26 UTC (rev 6233) @@ -10,6 +10,9 @@ %PREST_FILE_FLAGS = (decorations_01 => q(-D time=0 -D date=1 -D xformoff=Messages), decorations_02 => q(-D time=0 -D xformoff=Messages), + decorations_03 => q(-D time=0 -D generator=0 \\ + -D source-url=http://mysite.com \\ + -D xformoff=Messages), docinfo_01 => q(-D docinfo-levels=1), ); } Added: trunk/prest/t/80_misc/transforms.init/decorations_03.dom =================================================================== --- trunk/prest/t/80_misc/transforms.init/decorations_03.dom 2010-03-01 20:17:19 UTC (rev 6232) +++ trunk/prest/t/80_misc/transforms.init/decorations_03.dom 2010-03-01 20:18:26 UTC (rev 6233) @@ -0,0 +1,9 @@ +<document source="test data"> + <decoration> + <footer> + <paragraph> + <reference refuri="http://mysite.com"> + View document source + . + <paragraph> + Very simple file. Added: trunk/prest/t/80_misc/transforms.init/decorations_03.rst =================================================================== --- trunk/prest/t/80_misc/transforms.init/decorations_03.rst 2010-03-01 20:17:19 UTC (rev 6232) +++ trunk/prest/t/80_misc/transforms.init/decorations_03.rst 2010-03-01 20:18:26 UTC (rev 6233) @@ -0,0 +1 @@ +Very simple file. Added: trunk/prest/t/80_misc/transforms.init/emptytopic.dom =================================================================== --- trunk/prest/t/80_misc/transforms.init/emptytopic.dom 2010-03-01 20:17:19 UTC (rev 6232) +++ trunk/prest/t/80_misc/transforms.init/emptytopic.dom 2010-03-01 20:18:26 UTC (rev 6233) @@ -0,0 +1,3 @@ +<document source="test data"> + <paragraph> + Test an empty topic. Added: trunk/prest/t/80_misc/transforms.init/emptytopic.rst =================================================================== --- trunk/prest/t/80_misc/transforms.init/emptytopic.rst 2010-03-01 20:17:19 UTC (rev 6232) +++ trunk/prest/t/80_misc/transforms.init/emptytopic.rst 2010-03-01 20:18:26 UTC (rev 6233) @@ -0,0 +1,15 @@ +Test an empty topic. + +.. perl:: + + my $DOM = 'Text::Restructured::DOM'; + my $dom = $DOM->new('topic'); + $dom; + +.. perl:: + + my $DOM = 'Text::Restructured::DOM'; + my $dom = $DOM->new('topic'); + $dom->append($DOM->new('title') + ->append($DOM->newPCDATA('Title but no content'))); + $dom; Added: trunk/prest/t/80_misc/transforms.init/sectnum_02.dom =================================================================== --- trunk/prest/t/80_misc/transforms.init/sectnum_02.dom 2010-03-01 20:17:19 UTC (rev 6232) +++ trunk/prest/t/80_misc/transforms.init/sectnum_02.dom 2010-03-01 20:18:26 UTC (rev 6233) @@ -0,0 +1,8 @@ +<document source="test data"> + <paragraph> + Test prefix-title with no main title + <section ids="not-a-main-title" names="not a main title"> + <title> + <generated classes="sectnum"> + Chapter 3.14159\u00a0\u00a0\u00a0 + Not a Main Title Added: trunk/prest/t/80_misc/transforms.init/sectnum_02.rst =================================================================== --- trunk/prest/t/80_misc/transforms.init/sectnum_02.rst 2010-03-01 20:17:19 UTC (rev 6232) +++ trunk/prest/t/80_misc/transforms.init/sectnum_02.rst 2010-03-01 20:18:26 UTC (rev 6233) @@ -0,0 +1,9 @@ +Test prefix-title with no main title + +================ +Not a Main Title +================ + +.. sectnum:: + :prefix-title: + :prefix: Chapter 3.14159 Modified: trunk/prest/t/90_bugs/parse.init/Dir.smak =================================================================== --- trunk/prest/t/90_bugs/parse.init/Dir.smak 2010-03-01 20:17:19 UTC (rev 6232) +++ trunk/prest/t/90_bugs/parse.init/Dir.smak 2010-03-01 20:18:26 UTC (rev 6233) @@ -4,11 +4,12 @@ %PREST_FILE_FLAGS = (autofootnote => q(-D xformoff='Decorations|Unreferenced|CitationReferences|DocTitle|SectionSubTitle'), - badinline => q(-D nestinline), - fakerefinref => q(-D xformoff='.*'), - litinref => q(-D xformoff='.*'), - litref => q(-D xformoff='.*'), - defotherlist => q(-D xformoff='.*'), + badinline => q(-D nestinline), + fakerefinref => q(-D xformoff='.*'), + litinref => q(-D xformoff='.*'), + litref => q(-D xformoff='.*'), + defotherlist => q(-D xformoff='.*'), tabalignmultipar => q(-D align), + title01 => q(-D xformoff='.*'), ); } Added: trunk/prest/t/90_bugs/parse.init/list.dom =================================================================== --- trunk/prest/t/90_bugs/parse.init/list.dom 2010-03-01 20:17:19 UTC (rev 6232) +++ trunk/prest/t/90_bugs/parse.init/list.dom 2010-03-01 20:18:26 UTC (rev 6233) @@ -0,0 +1,14 @@ +<document source="list.rst"> + <paragraph> + <strong> + foo + <bullet_list bullet="*"> + <list_item> + <paragraph> + etabliert der Beginn + <list_item> + <paragraph> + welche Details sind dazu geeignet? + <paragraph> + <strong> + bar Added: trunk/prest/t/90_bugs/parse.init/list.rst =================================================================== --- trunk/prest/t/90_bugs/parse.init/list.rst 2010-03-01 20:17:19 UTC (rev 6232) +++ trunk/prest/t/90_bugs/parse.init/list.rst 2010-03-01 20:18:26 UTC (rev 6233) @@ -0,0 +1,6 @@ +**foo** + +* etabliert der Beginn +* welche Details sind dazu geeignet? + +**bar** Added: trunk/prest/t/90_bugs/parse.init/title01.dom =================================================================== --- trunk/prest/t/90_bugs/parse.init/title01.dom 2010-03-01 20:17:19 UTC (rev 6232) +++ trunk/prest/t/90_bugs/parse.init/title01.dom 2010-03-01 20:18:26 UTC (rev 6233) @@ -0,0 +1,6 @@ +<document source="title01.rst"> + <comment xml:space="preserve"> + this throws an error: + <section ids="\u00fcberschrift-1" names="\u00fcberschrift 1"> + <title> + \u00dcberschrift 1 Added: trunk/prest/t/90_bugs/parse.init/title01.rst =================================================================== --- trunk/prest/t/90_bugs/parse.init/title01.rst 2010-03-01 20:17:19 UTC (rev 6232) +++ trunk/prest/t/90_bugs/parse.init/title01.rst 2010-03-01 20:18:26 UTC (rev 6233) @@ -0,0 +1,8 @@ + +.. this throws an error: + +Überschrift 1 +============= + + + |