123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339 |
- use strict;
- use File::Spec;
- BEGIN { if (defined($ENV{'top_srcdir'})) {unshift @INC, File::Spec->catdir($ENV{'top_srcdir'}, 'tp');} }
- require 't/test_utils.pl';
- my @test_cases = (
- ['image_inline_or_not',
- '@image{A}
- Para @image{hh}.
- @node Top
- @top top
- @image{B}
- Para @image{jj}.
- @example
- @image{in_example}
- T
- @image{in example after text}
- @end example
- @quotation @image{in_quotation_arg}
- @image{in_quotation_content}
- @end quotation
- @table @asis
- @item @image{in_table_item}
- @image{in_table_def}
- AA @image{in_table_def_para}
- @image{in_table_def_after}
- @end table
- @menu
- * @image{node_image}:: @image{image_in_description}
- * @image{in_menu_entry_name}: (somewhere)@image{extnode}.
- @image{in_menu_comment}
- @end menu
- @node @image{node_image}
- @chapter @image{in_chapter_arg}
- T@footnote{
- @image{in_footnote}
- }
- @float F,g
- @image{in_float}
- @caption{@image{in_caption} PAra @image{in_caption_para}}
- @end float
- '],
- ['comments_on_block_command_lines',
- '@itemize @c comm
- @item itemize it
- @end itemize
- @itemize x @c comm
- @item itemize xit
- @end itemize
- @itemize @bullet @c comm
- @item itemize bulletit
- @end itemize
- @itemize @bullet{} @c comm
- @item itemize bullet with braces
- @end itemize
- @enumerate @c comm
- @item en
- @end enumerate
- @enumerate a @c comm
- @item aen
- @end enumerate
- @table @asis @c table
- @item it
- @end table
- @quotation @c quot no arg
- Quot no arg
- @end quotation
- @quotation quotarg @c quot arg
- Quot arg
- @end quotation
- @group @c comm
- in gr
- @end group
- @example @c comm
- in ex
- @end example
- @multitable @columnfractions 0.4 0.6 @c comm
- @item a @tab b
- @end multitable
- @multitable {aaa} {bbb} @c c
- @item aaa @tab bbb
- @end multitable
- @float f,g @c comm
- In f
- @end float
- @flushright @c comm
- flushright
- @end flushright
- @raggedright @c comm
- raggedright
- @end raggedright
- '],
- ['comments_end_lines',
- '@itemize
- @item itemize it
- @end itemize @c comment itemize
- @enumerate
- @end enumerate @c comm
- @table @asis
- @item it
- @end table @c table
- @quotation
- Quot no arg
- @end quotation @c quot no arg
- @group
- in gr
- @end group @c comm
- @example
- in ex
- @end example @c comm
- @multitable @columnfractions 0.4 0.6
- @item a @tab b
- @end multitable @c comm
- @float f,g
- In f
- @end float @c comm
- @flushright
- flushright
- @end flushright @c comm
- @raggedright
- raggedright
- @end raggedright @c comm
- '],
- ['comments_on_misc_command_line',
- '@setfilename comments_on_misc_command_line.info @c setfilename (text)
- @definfoenclose phoo,;,: @c definfoenclose (number)
- @firstparagraphindent none @c c (number)
- @raisesections @c raisesections (skipline)
- @insertcopying @comment (noarg)
- @pagesizes 200mm @c pagesizes (line)
- @everyheading @thispage @| aaa @c everyheading (lineraw)
- @indent @c indent (skipspace)
- Para.
- '],
- ['raw',
- '@tex
- in <tex>
- @end tex
- Para
- @xml
- <in />
- @end xml
- ',
- {'expanded_formats' => ['tex', 'xml']}
- ],
- ['raw_and_comments',
- '@tex @c comment
- in <tex>
- @end tex @comment other comment
- Para
- @xml @c in xml comment
- <in />
- @end xml @comment end xml comment
- ',
- {'expanded_formats' => ['tex', 'xml']}
- ],
- ['node_no_section',
- '@node Top
- '],
- ['macro_and_args',
- '@macro good { aaa, 2b-bb}
- @end macro
- @macro bad { ggg"@@^_ ff, nnn_b, ccc v}
- @end macro
- '],
- ['commands_and_spaces',
- '@set foo some @value
- @setfilename commands_and_spaces.info
- @unmacro ggg
- @clickstyle @arrow
- @cropmarks after cropmarks.
- @node a ,(b),(c) , (d)
- @center centered
- @indent after indent.
- @indent
- line after indent
- @indent
- endof line with spaces line after indent
- @image{ a ,b,c , d,e }
- @image{ a ,b
- ,c , d,e }
- @quotation Note
- Q
- @end quotation
- @float ff , b
- f
- @caption{ In caption }j.
- @shortcaption{Short} g.
- @end float
- @multitable @columnfractions 0.4 0.6
- @end multitable
- @multitable {aa b} { r } @var{cmd}gg hh j
- @end multitable
- @verbatim
- in verbatim @g
- @end verbatim
- @tex
- in tex
- @end tex
- @example
- in example
- @end example
- @table @strong
- @item in item
- @end table
- T@footnote{ a}.
- Math @math{ \\underline{ a, b} }.
- @indicateurl{ http://ggg }
- @deffn { truc } { machin } { bidule } { chose } { arg }
- T
- @end deffn
- ',
- {'expanded_formats' => ['tex'] }
- ],
- ['spaces_info_lost',
- '@example text on example line
- in bad example
- @end example
- @verbatim
- in verbatim @g
- @end verbatim
- '],
- ['brace_commands_spaces_end_of_lines',
- '@image{
- a}
- @image{
- a}
- @image{a,
- b}
- @image{a,
- b}
- @image{a,
- b}
- @image{a,
- b}
- '],
- ['node_and_bye',
- '@node Top
- @bye
- ', {'test_split' => 'section'}],
- ['lone_bye',
- '@bye
- '],
- );
- foreach my $test (@test_cases) {
- $test->[2]->{'test_formats'} = ['xml'];
- }
- our ($arg_test_case, $arg_generate, $arg_debug);
- run_all ('xml_tests', [@test_cases], $arg_test_case,
- $arg_generate, $arg_debug);
- 1;
|