"Fossies" - the Fresh Open Source Software Archive

Member "texinfo-6.5/tp/t/02coverage.t" (3 Jan 2017, 12049 Bytes) of package /linux/misc/texinfo-6.5.tar.xz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 # $Id: 02coverage.t 6132 2015-02-18 00:07:53Z karl $
    2 use strict;
    3 
    4 use File::Spec;
    5 BEGIN { if (defined($ENV{'top_srcdir'})) {unshift @INC, File::Spec->catdir($ENV{'top_srcdir'}, 'tp');} }
    6 
    7 require 't/test_utils.pl';
    8 
    9 my @test_cases = (
   10 ['commands','@@ @TeX{} @
   11 @"e @^{@dotless{i}} @~{a} @ringaccent a
   12 @clicksequence{File @click{} Open}@.
   13 @email{a, b} @code{code --- -- \'\' ``}
   14 --- -- \'\' ``. @sc{small caps}.
   15 
   16 @cindex index entry ``in text\'\' @LaTeX{}
   17 
   18 @majorheading majorheading @b{in b}
   19 '],
   20 ['lettered_accent_and_spaces',
   21 '@ringaccent    a
   22 '],
   23 ['accent_and_dash',
   24 '@^{a--}'],
   25 ['math',
   26 'Simple math
   27 @math{--{x^i}\over{\tan y}}
   28 
   29 Math with @@-command
   30 @math{@code{math code} a < b \sum@sub{i} q@sup{2}}
   31 
   32 Complex
   33 @math{ \underline{@code{math \hbox{ code }}} @\i \sum_{i}{\underline{f}}}
   34 
   35 @@\ outside of math
   36 @\
   37 
   38 The 3@sup{rd}is the I@sub{r}.
   39 
   40 '],
   41 ['empty_w',
   42 '@w{} @w{a b}.'
   43 ],
   44 ['hyphenation',
   45 '
   46 @hyphenation{some-where }
   47 
   48 '],
   49 ['block_commands','
   50 @group
   51 in group
   52 @end group
   53 
   54 @quotation warning
   55 in quotation
   56 @end quotation
   57 
   58 @float a float, b float
   59 In float
   60 
   61 
   62 @caption{in caption
   63 
   64 in caption}
   65 @end float
   66 '],
   67 ['raggedright','
   68 @raggedright
   69 in raggedright
   70 @end raggedright
   71 '],
   72 ['item_container','
   73 @itemize +
   74 @item i--tem +
   75 @end itemize
   76 
   77 @itemize @bullet
   78 @item
   79  b--ullet
   80 @end itemize
   81 
   82 @itemize
   83 @item no itemize argument
   84 @end itemize
   85 '],
   86 ['table','
   87 @table @asis
   88 @item table item
   89 @itemx table itemx
   90 
   91 In table
   92 @end table
   93 
   94 @vtable @samp@c samp
   95 @c after vtable
   96 @cindex index entry
   97 
   98 @item vtable item
   99 @c after item
  100 @kindex key
  101 @itemx itemx vtable @comment comment in itemx line
  102 
  103 @end vtable
  104 '],
  105 ['table_command_comment',
  106 '@table @code@c in comment
  107 @item item
  108 @end table'
  109 ],
  110 ['multitable','
  111 @multitable @columnfractions 0.6 0.4
  112 @headitem mu--ltitable headitem @tab another tab
  113 @item mu--ltitable item @tab multitable tab
  114 @c comment in multitable
  115 @item mu--ltitable item 2 @tab multitable tab 2
  116 @cindex index entry within multitable
  117 @item lone mu--ltitable item
  118 @end multitable
  119 
  120 @multitable {truc} {bidule}
  121 @item truc @tab bidule
  122 @end multitable
  123 '],
  124 ['preformatted','
  125 @example
  126 e--xample  some  
  127 
  128    text
  129 @end example
  130 
  131 @format
  132 @vtable @code
  133 @item item in table in format
  134 
  135 in table in format
  136 @end vtable
  137 @end format
  138 '],
  139 ['def','
  140 @deffn {c--ategory} d--effn_name a--rguments...
  141 d--effn
  142 @end deffn
  143 
  144 @deffn cate--gory de--ffn_name ar--guments @
  145    more args @* even more so
  146 def--fn
  147 @end deffn
  148 
  149 @deffn fset @var{i} a g
  150 @deffnx {cmde} truc {}
  151 @deffnx Command {log trap} {}
  152 @deffnx Command { log trap1} {}  
  153 @deffnx Command {log trap2 } {}
  154 @deffnx cmde @b{id ule} truc
  155 @deffnx cmde2 @b{id @samp{i} ule} truc
  156 @deffnx{} machin
  157 @deffnx{} {bidule machin}
  158 @deffnx{truc} machin
  159 @deffnx {truc} followed by a comment
  160 @c comment
  161 @deffnx {truc} after a deff item
  162 @c comment
  163 @deffnx {truc} deffnx before end deffn
  164 Various deff lines
  165 @end deffn
  166 '],
  167 ['symbol_after_command',
  168 '@table @asis
  169 @item. dot
  170 @item, comma
  171 @item@@ @@
  172 @item@{ @{
  173 @item! exclam
  174 @item\'\' quotes
  175 @item: colon
  176 @end table
  177 
  178 @@. @{, @@@@ @?, @!: @@@{ @@\'\' @@:
  179 '],
  180 ['nested_block_commands',
  181 '@group
  182 In group
  183 @quotation
  184 in quotation
  185 @end quotation
  186 @end group
  187 
  188 @group
  189 @quotation
  190 in quotation
  191 @end quotation
  192 @end group
  193 
  194 @group
  195 In group
  196 @quotation
  197 in quotation
  198 @end quotation
  199 after quotation
  200 @end group
  201 
  202 @group
  203 
  204 In group sp b
  205 @quotation
  206 in quotation
  207 @end quotation
  208 @end group
  209 
  210 @group
  211 
  212 In group sp b a
  213 
  214 @quotation
  215 in quotation
  216 @end quotation
  217 @end group
  218 
  219 @group
  220 In group sp a
  221 
  222 @quotation
  223 in quotation
  224 @end quotation
  225 @end group
  226 
  227 @group
  228 @quotation
  229 
  230 in quotation sp b
  231 @end quotation
  232 @end group
  233 
  234 @group
  235 @quotation
  236 
  237 in quotation sp b a
  238 
  239 @end quotation
  240 @end group
  241 
  242 @group
  243 @quotation
  244 in quotation sp a
  245 
  246 @end quotation
  247 @end group
  248 
  249 @group
  250 @quotation
  251 in quotation
  252 @end quotation
  253 
  254 After quotation sp b
  255 @end group
  256 
  257 @group
  258 @quotation
  259 in quotation
  260 @end quotation
  261 After quotation sp a
  262 
  263 @end group
  264 
  265 @group
  266 @quotation
  267 in quotation
  268 @end quotation
  269 
  270 After quotation sp b a
  271 
  272 @end group
  273 '],
  274 ['cartouche',
  275 '@cartouche
  276 in cartouche.
  277 @end cartouche'],
  278 ['indentedblock',
  279 '@indentedblock
  280   indented block
  281 
  282 Text
  283 @end indentedblock
  284 '],
  285 ['comment_on_cartouche_line',
  286 '@cartouche @c comment
  287 in cartouche.
  288 @end cartouche
  289 '],
  290 ['comment_on_group_line',
  291 '@group @c comment
  292 in group.
  293 @end group
  294 '],
  295 ['insertcopying',
  296 '@copying
  297 License.
  298 
  299 @quotation 
  300 You are not allowed.
  301 @end quotation
  302 @end copying
  303 
  304 License:
  305 
  306 @insertcopying
  307 '],
  308 ['flushleft_flushright',
  309 '
  310 @flushleft
  311 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ccccccccccccccc
  312 ldskf dsflj
  313      lklsdlv l    lll. Bbb.
  314 
  315 lhds
  316 @end flushleft
  317 
  318 @flushright
  319 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ccccccccccccccc
  320 ldskf dsflj
  321      lklsdlv l    lll. Bbb.
  322 
  323 lhds
  324 @end flushright
  325 '],
  326 ['quotation_author',
  327 '@quotation
  328 
  329 @author First Author
  330 quotation
  331 @author S@~econd author
  332 quotation continues.
  333 
  334 @end quotation
  335 '],
  336 ['flushleft_flushright_in_quotation',
  337 '
  338 @quotation
  339 @flushleft
  340    f l
  341 @end flushleft
  342 
  343 @flushright
  344   f r
  345 @end flushright
  346 @end quotation
  347 '],
  348 ['cartouche_in_quotation',
  349 '@quotation
  350 In quotation
  351 @cartouche
  352 In cartouche in quotation
  353 @end cartouche
  354 end quotation
  355 @end quotation
  356 '],
  357 ['cartouche_in_example',
  358 '@example
  359 In example
  360 @cartouche
  361 In cartouche in example
  362 @end cartouche
  363 end example
  364 @end example
  365 '],
  366 ['flushright_example_nested',
  367 '@example
  368 @flushright
  369 in   --- flushright
  370 
  371 @end flushright
  372 @end example
  373 
  374 @flushright
  375 @example
  376 in   --- example
  377 
  378 flush then example
  379 @end example
  380 @end flushright
  381 '],
  382 ['center',
  383 '
  384 @center  in center @code{in code}
  385 
  386 '],
  387 ['titlefont_in_center',
  388 '
  389 @center @titlefont{A manual}
  390 '],
  391 ['exdent_and_formats',
  392 '@example
  393  Example   Hoho. @TeX{} . @* @@.
  394 
  395 @exdent Other line
  396 not exdented
  397 @end example
  398 
  399 
  400 @example
  401 @exdent exdented  and dash --- in example
  402 Not exdented
  403 @exdent exdented
  404 Not exdented
  405 @end example
  406 
  407 Para1.
  408 
  409 @quotation
  410 qsddsqkdsqkkmljsqjsqodmmdsqdsmqj dqs sdq sqd sdq dsq sdq sqd sqd sdq sdq 
  411 qsd dsq sdq dsq dssdq sdq sdq sdq dsq sdq dsq dsq sdq dsq sdqsd q
  412 @end quotation
  413 
  414 Para2.
  415 
  416 Para3.
  417 
  418 Last para.
  419 
  420 @quotation
  421 quotation1
  422 quotation2
  423 @end quotation
  424 
  425 @quotation
  426 quotation para 1
  427 
  428 quotation para 2
  429 @end quotation
  430 
  431 @example
  432 Example   Hoho.
  433 @example
  434 Nested Other line
  435 @exdent exdented nested other line
  436 @end example
  437 @end example
  438 
  439 @quotation
  440 @exdent exdented quotation line   and dash --- in quotation
  441 @end quotation
  442 
  443 @quotation
  444 Not exdented followed by exdented
  445 @exdent  exdented quotation line
  446 @end quotation
  447 
  448 @quotation
  449 @exdent  exdented quotation line
  450 Followed by not exdented 
  451 @end quotation
  452 
  453 @quotation
  454 @exdent exdented quotation line oidfjslsd aez a aze azaz aeae za eaz az
  455 @exdent azeaz az az az az
  456 @end quotation
  457 
  458 @quotation
  459 @exdent exdented quotation line oidfjslsd aez a aze azaz aeae za eaz az azeaz end line
  460 @exdent az az az az
  461 @end quotation
  462 
  463 @quotation
  464 quotation line oidfjslsd aez a aze azaz aeae za eaz az zelef  aaa
  465 @exdent ezkfjklezf 
  466 @end quotation
  467 
  468 @quotation
  469 @exdent very loooooooooooooooooooooooooooooooooong exdented quotation line oidfjslsd aez a aze azaz aeae za eaz az azeaz end line
  470 @exdent az az az az
  471 @end quotation
  472 '],
  473 ['exdent_and_commands',
  474 '@quotation
  475 quotation1
  476 @exdent in exdented protected eol @
  477 following
  478 @exdent in exdented a @@* @* and following
  479 after exdented
  480 @end quotation
  481 
  482 @example
  483 example
  484 @exdent in exdented protected eol @
  485 following
  486 @exdent in exdented a @@* @* and following
  487 after exdented
  488 @end example
  489 '],
  490 ['verbatiminclude',
  491 '
  492 @verbatiminclude incl-incl.txi
  493 '],
  494 ['punctuation_in_line_commands',
  495 '
  496 @node node! After punc
  497 @top top! After punc
  498 
  499 @table @asis
  500 @item item! After punc
  501 @end table
  502 
  503 @quotation quotation arg! After punc
  504 In quotation
  505 @exdent exdent quotation! After punc
  506 @end quotation
  507 
  508 @float float type! After punc, float label! After punc
  509 In float
  510 @shortcaption{shortcaption! After punc}
  511 @end float
  512 
  513 @float float type! After punc, label with caption
  514 In float with caption.
  515 @caption{caption! After punc}
  516 @end float
  517 
  518 @listoffloats float type! After punc
  519 
  520 @cindex index! After punc
  521 
  522 @heading heading! After punc
  523 
  524 @titlefont{titlefont! After punc}
  525 
  526 @center center! After punc
  527 
  528 @printindex cp
  529 
  530 @contents
  531 
  532 '],
  533 ['test_tie',
  534 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA@tie{}BBBBBBBBBBB
  535 '],
  536 ['test_today',
  537 '@today{}.', {}, {'TEST' => 1}],
  538 ['at_after_accent_command',
  539 '@ringaccent @@. @^@@.
  540 '],
  541 ['setfilename_in_paragraph',
  542 'Some text
  543 @setfilename filename.info
  544 '],
  545 ['invalid_U',
  546 '@U @U{} @U{z} @U{abc} @U{9999999999999} @U{110000} @U{10FFFF}
  547 '],
  548 ['test_errormsg',
  549 'Some text
  550 @errormsg{Text @~e @code{code}}
  551 '],
  552 ['unknown_accents',
  553 '@"X @"x @"Q @"Y
  554 
  555 @\'z @\'q @\'r
  556 @\'Z @\'Q @\'R
  557 
  558 @,{H} @,{h}
  559 
  560 @^z @^r @^t @^k
  561 @^Z @^R @^T @^K
  562 
  563 @`z @`m @`p
  564 
  565 @~Z @~s
  566 '],
  567 );
  568 
  569 my @test_tree = (
  570 ['arg_in_brace_no_arg_command',
  571 '@TeX{in tex}
  572 '],
  573 ['accents_errors',
  574 'accent at end of line @ringaccent
  575 accent at end of line and spaces @ringaccent  
  576 accent followed by @@ @ringaccent@.
  577 
  578 accent character with spaces @~ following.
  579 accent character at end of line @~
  580 accent character followed by @@ @~@.
  581 '],
  582 ['accent_no_closed',
  583 '@~{e'],
  584 ['accent_no_closed_newline',
  585 '@~{e
  586 
  587 '],
  588 ['accent_no_closed_paragraph',
  589 '@~{e
  590 
  591 other para.
  592 '],
  593 ['accent_no_closed_comment',
  594 '@~{e @c comment
  595 '],
  596 ['not_i_j_in_dotless',
  597 '@dotless a bc, @^{@dotless{q}}.'],
  598 ['indicateurl_end_lines',
  599 '@indicateurl{http://begin
  600 continue on other line}
  601 
  602 @indicateurl{http://begin2
  603 
  604 cut by blank line}
  605 '],
  606 ['spaces_after_braced_command',
  607 '@code {b}
  608 
  609 @samp
  610 {v}
  611 '],
  612 ['spaces_no_brace_after_braced_command',
  613 '@code b
  614 '],
  615 ['flushright_not_closed',
  616 '@flushright
  617 
  618 text flushed right
  619 '],
  620 ['group_not_closed',
  621 '@group
  622 
  623 text in group
  624 '],
  625 ['unknown_commands',
  626 '@unknwon
  627 @#
  628 '],
  629 ['symbol_after_block',
  630 '@html
  631 In html
  632 @end html. On the line.
  633 
  634 @html
  635 In html
  636 @end html@@ On the line.
  637 
  638 Verbatim:
  639 
  640 @verbatim
  641 In verbatim
  642 @end verbatim;
  643 
  644 @verbatim
  645 In verbatim
  646 @end verbatim@@
  647 
  648 Table:
  649 
  650 @table @emph
  651 @item a
  652 l--ine
  653 @end table+
  654 
  655 @table @emph
  656 @item a
  657 l--ine
  658 @end table@@
  659 
  660 Itemize:
  661 
  662 @itemize @bullet
  663 @item e--mph item
  664 @end itemize\'\'
  665 
  666 @itemize @bullet
  667 @item e--mph item
  668 @end itemize@@
  669 
  670 Multitable:
  671 
  672 @multitable @columnfractions 6 7
  673 @headitem mu--ltitable headitem @tab another tab
  674 @item mu--ltitable item @tab multitable tab
  675 @end multitable^
  676 
  677 @multitable @columnfractions 6 7
  678 @headitem mu--ltitable headitem @tab another tab
  679 @item mu--ltitable item @tab multitable tab
  680 @end multitable@{
  681 
  682 Flushleft:
  683 
  684 @flushleft
  685 flushleft
  686 @end flushleft!
  687 
  688 @flushleft
  689 flushleft
  690 @end flushleft@@
  691 
  692 Copying:
  693 
  694 @copying
  695 Copying
  696 @end copying*
  697 
  698 @copying
  699 Copying
  700 @end copying@@
  701 '],
  702 ['formats_titles',
  703 '@itemize
  704 before first itemize
  705 @item item
  706 @end itemize
  707 
  708 @enumerate
  709 before first enumerate
  710 @item enum
  711 @end enumerate
  712 
  713 @table @emph
  714 before first table
  715 @item tab
  716 @end table
  717 
  718 @vtable @asis
  719 before first vtable
  720 @item vtab
  721 @end vtable
  722 
  723 @multitable @columnfractions 0.5 0.5
  724 before first multitable
  725 @item item multit @tab tab multit
  726 @end multitable
  727 '],
  728 ['formats_only_titles',
  729 '@itemize
  730 before first itemize
  731 @end itemize
  732 
  733 @enumerate
  734 before first enumerate
  735 @end enumerate
  736 
  737 @table @emph
  738 before first table
  739 @end table
  740 
  741 @vtable @asis
  742 before first vtable
  743 @end vtable
  744 
  745 @multitable @columnfractions 0.5 0.5
  746 before first multitable
  747 @end multitable
  748 '],
  749 ['formats_only_title_comments',
  750 '@itemize
  751 @c comment itemize
  752 before first itemize
  753 @end itemize
  754 
  755 @enumerate @c comment on enumerate line
  756 @c comment enumerate
  757 before first enumerate
  758 @end enumerate
  759 
  760 @table @emph
  761 @c comment table
  762 before first table
  763 @end table
  764 
  765 @vtable @asis @c comment on vtable line
  766 before first vtable
  767 @end vtable
  768 
  769 @multitable @columnfractions 0.5 0.5
  770 @c comment multitable
  771 before first multitable
  772 @end multitable
  773 '],
  774 ['delcomment', undef, {'test_file' => 'delcomment.texi'}
  775 ],
  776 ['group_beginning_and_end_on_line',
  777 '@group within @end group
  778 '],
  779 );
  780 
  781 foreach my $test (@test_cases) {
  782   push @{$test->[2]->{'test_formats'}}, 'plaintext';
  783   push @{$test->[2]->{'test_formats'}}, 'html_text';
  784   push @{$test->[2]->{'test_formats'}}, 'xml';
  785   push @{$test->[2]->{'test_formats'}}, 'docbook';
  786 }
  787 
  788 our ($arg_test_case, $arg_generate, $arg_debug);
  789 
  790 run_all ('coverage', [@test_cases, @test_tree], $arg_test_case,
  791    $arg_generate, $arg_debug);