123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
- 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 = (
- ['copying_not_closed',
- '@copying
- This is a copyright notice
- '],
- ['double_copying',
- '@copying
- This is a copyright notice
- @copying
- And a second one (?)
- @end copying
- @end copying
- '],
- ['double_titlepage_not_closed',
- '@titlepage
- This is in title page
- @titlepage
- And still in title page
- ']
- );
- my $format_in_titlepage_text = '@titlepage
- @format
- Published
- @end format
- @end titlepage
- @node Top
- ';
- my $anchor_in_titlepage_text =
- '@titlepage
- @anchor{in titlepage}
- @end titlepage
- @top top
- @node Top
- @xref{in titlepage}.
- ';
- my @test_formatted = (
- ['anchor_in_copying',
- '
- @copying
- Copying.
- @anchor{Copying information}
- @end copying
- @node Top
- @insertcopying
- @insertcopying
- @xref{Copying information}.
- '],
- ['anchor_in_copying_in_footnote',
- '@copying
- Copying@footnote{
- In footnote.
- @anchor{Copying footnote}
- }.
- @end copying
- @node Top
- @insertcopying
- @insertcopying
- @xref{Copying footnote}.
- '],
- ['format_in_titlepage',
- $format_in_titlepage_text
- ],
- ['format_in_titlepage_titlepage',
- $format_in_titlepage_text, {}, {'USE_TITLEPAGE_FOR_TITLE' => 1}
- ],
- ['anchor_in_titlepage',
- $anchor_in_titlepage_text
- ],
- ['anchor_in_titlepage_titlepage',
- $anchor_in_titlepage_text, {}, {'USE_TITLEPAGE_FOR_TITLE' => 1}
- ],
- ['ref_in_copying',
- '@copying
- @ref{GFDL}
- @end copying
- @node Top
- @top top
- @insertcopying
- @menu
- * GFDL::
- @end menu
- @node GFDL
- @chapter GFDL
- '],
- ['today_in_copying',
- '@copying
- @today{}.
- @end copying
- @node Top
- @top top
- @insertcopying
- ',{},{'TEST' => 1}],
- );
- foreach my $test (@test_formatted) {
- push @{$test->[2]->{'test_formats'}}, 'info';
- push @{$test->[2]->{'test_formats'}}, 'html';
- }
- our ($arg_test_case, $arg_generate, $arg_debug);
- run_all ('regions', [@test_cases, @test_formatted], $arg_test_case,
- $arg_generate, $arg_debug);
|