123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550 |
- 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 = (
- ['w_argument',
- '@itemize @w{}
- @item @option{--build=} platform on which the program is compiled,
- @item @option{--target=} target platform on which the program is processed.
- @end itemize
- '],
- # unclear that these are valid constructs...
- ['accent_argument',
- '@itemize @~@comment
- @item item
- @end itemize
- @itemize @~
- @item item
- @end itemize
- '],
- ['comment_first_on_itemize_line',
- '@itemize @c comment on itemize line
- @item first
- @end itemize
- '],
- ['enumerate_argument',
- '@enumerate 1
- @end enumerate
- @enumerate A@c comment
- @end enumerate
- @enumerate z @c comment
- @end enumerate
- '],
- ['enumerate_argument_item',
- '@enumerate 1
- @item numeric first
- @item numeric second
- @end enumerate
- @enumerate A@c comment
- @item upper case first
- @item upper case second
- @end enumerate
- @enumerate z @c comment
- @item lower case first
- @item lower case second
- @end enumerate
- '],
- ['comment_first_on_enumerate_line',
- '@enumerate @c comment on enumerate line
- @item first
- @end enumerate
- '],
- ['enumerate_letters',
- '@enumerate c
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @item aaa
- @end enumerate
- '],
- ['enumerate_in_example',
- '
- @example
- @enumerate
- @item first item
- @item second item
- still second
- @end enumerate
- @end example
- '],
- ['itemize_and_empty_lines',
- '@itemize youhou
- @item first item
- @item
- @example
- In example
- end example.
- @end example
- @item
- empty line.
- @item
- @example
- In second example
- @end example
- @quotation
- Quotation
- @end quotation
- @item
- @quotation
- quotation after a blank line
- @end quotation
- @end itemize
- @itemize
- @item first item
- @item
- @example
- In example
- end example.
- @end example
- @item
- empty line.
- @item
- @example
- In second example
- @end example
- @item
- @quotation
- Quotation
- @end quotation
- @item
- @quotation
- quotation after a blank line
- @end quotation
- @end itemize
- An itemize
- @itemize @minus
- @item truc
- line
- @end itemize
- After itemize
- A nested itemize
- @itemize @minus
- @item truc
- line
- @itemize @bullet
- @item in nested itemize
- @end itemize
- After inside nested itemize.
- @end itemize
- After nested itemize
- @itemize @bullet
- @item the version number of Texinfo and the program(s) or manual(s) involved.
- @item hardware and operating system names and versions.
- @item something aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaa
- b b bbbbbbbbbbbbbbbbbbbbbbb.
- @end itemize
- '],
- ['itemize_long_item',
- '@itemize youhou itemize very long item aaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbb cccccccccccc
- @item first item
- @item
- @example
- In example
- end example.
- @end example
- @item
- empty line.
- @item
- @example
- In second example
- @end example
- @item
- @quotation
- Quotation
- @end quotation
- @item
- @quotation
- quotation after a blank line
- @end quotation
- @end itemize
- '],
- ['enumerate_and_empty_lines',
- '@enumerate
- @item first item
- @item
- @example
- In example
- end example.
- @end example
- @item
- empty line.
- @item
- @example
- In second example
- @end example
- @item
- @quotation
- Quotation
- @end quotation
- @item
- @quotation
- quotation after a blank line
- @end quotation
- @end enumerate
- @enumerate
- @item aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa fffffffff ggggggggg vvvvvvvvv ggggggggg h
- @end enumerate
- '],
- ['itemize_line_commands_with_brace',
- '@itemize @bullet{}
- @item bullet
- @end itemize
- @itemize @minus{}
- @item minus
- @end itemize
- '],
- ['asis_as_itemize_argument',
- '@itemize @asis
- @item as is
- @end itemize
- '],
- ['itemize_in_example',
- '@example
- @itemize @bullet
- @item first
- more.
- @end itemize
- @itemize @asis
- @item as is
- @end itemize
- @itemize +
- @item item +
- @end itemize
- @itemize @bullet{} a--n itemize line
- @item in an itemize line
- @end itemize
- @end example
- '],
- ['inter_item_commands_in_itemize',
- '@itemize @minus
- @c comment in itemize
- @cindex also a cindex in itemize
- @item e--mph item
- @end itemize
- @itemize @bullet
- @cindex index entry within itemize
- @item i--tem 1
- @item @cindex index entry right after @@item
- i--tem 2
- @end itemize
- @itemize
- @c comment in itemize
- T--ext before items.
- @cindex also a cindex in itemize
- @item bullet item
- @end itemize
- '],
- ['inter_item_commands_in_enumerate',
- '@enumerate
- @comment comment before first item in enumerate
- @item e--numerate
- @end enumerate
- @enumerate
- Title
- @cindex cindex
- @item enum
- @end enumerate
- '],
- );
- my @test_invalid = (
- ['not_closed_item',
- '@itemize
- @item in item
- '],
- ['not_closed_itemize',
- '@itemize
- '],
- ['lone_end_itemize',
- '@end itemize
- '],
- ['headitem_itemx_in_itemize',
- '@itemize
- @item item
- @itemx itemx
- @headitem headitem
- @end itemize
- '],
- ['headitem_itemx_in_enumerate',
- '@enumerate
- @item item enumerate
- @itemx itemx enumerate
- @headitem headitem enumerate
- @end enumerate
- '],
- ['bad_enumerate_arguments',
- '@enumerate a b
- @end enumerate
- @enumerate !
- @end enumerate
- @enumerate @code{a}
- @end enumerate
- @enumerate a@@
- @end enumerate
- @enumerate a0
- @end enumerate
- '],
- );
- foreach my $test (@test_cases) {
- push @{$test->[2]->{'test_formats'}}, 'plaintext';
- push @{$test->[2]->{'test_formats'}}, 'html_text';
- }
- our ($arg_test_case, $arg_generate, $arg_debug);
- run_all ('itemize', [@test_cases, @test_invalid], $arg_test_case,
- $arg_generate, $arg_debug);
|