# -*-perl-*-
# Note: Since this makefile is checking three writers, it has to override
# stuff from the Common.smak slaymakefile.

{
    my @tests = (<*.idx>, <*.toc>, <*.xref>);
    @OKS = @tests;
    s/\..*$/.ok/ foreach @OKS;

    my @idxtests = <idxtest*>;

    # Note: These all need to have their arguments in the file flags
    %PREST_FILE_FLAGS =
	(index01 => qq(-W short_titles=0 @idxtests),
	 index02 => "@idxtests",
	 index03 => qq(-W doc_titles=0 @idxtests),
	 index04 => qq(-W index-role-target @idxtests),
	 index05 => qq(-W index-role-target=index @idxtests),
	 toc01 => qq(-W symbol='=' -W top_in_list @idxtests),
	 toc02 => qq(-W symbol='=' -W exclude_top @idxtests),
	 toc03 => qq(-W symbol='=' @idxtests),
	 toc04 => "@idxtests",
	 toc05 => qq(-W top_in_list -W file_suffix=htm -W filename_ext=_main @idxtests),
	 toc06 => qq(-W exclude_top -W depth=2 @idxtests),
	 toc07 => qq(-W top_in_list=0 @idxtests),
	 toc08 => qq(-W exclude_top @idxtests),
	 toc09 => qq(-W top_in_list -W depth=1 @idxtests),
	 toc10 => qq(-W symbol="=" -W top_in_list -W include_noheader @idxtests),
	 toc11 => qq(-W top_in_list -W include_noheader @idxtests),
	 toc12 => qq(-W symbol="=" -W include_noheader @idxtests),
	 toc13 => qq(-D keep_title_section @idxtests),
	 toc14 => qq(-W parent-role=submenu @idxtests),
	 xref01 => q(-W file_suffix=htm xreftest.rst),
	 xref02 => 'xreftest.rst',
	 xref03 => q(-W filename_ext=_main -W file_path=. xreftest.rst),
	 xref04 => q(-W sprintf='.. perl:: $s=q(%s); $s =~ /raw/ ? $s : ""' xreftest.rst),
	 xref05 => q(idxtest4),
	 xref06 => q(-W file_path=./ dupname.rst),
	 xref07 => q(-D perl='$title_prefix="1."' -W chapter=Pennod \
		     -W section=Dosran -W xref-sections -W xref-targets=0 \
		     xreftest.rst),
	 xref08 => q(-D perl='$title_prefix="A."' -W appendix=Atodiad \
		     -W xref-sections -W xref-targets=0 xreftest.rst),
	 xref09 => q(-W xref-sections -W xref-targets=0 xreftest.rst),
	 xref10 => q(-W xref_role_target xreftest.rst),
	 xref11 => q(-W xref_role_target=xref xreftest.rst),
	 );
}

find_oks: