12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- 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 = (
- ['macro_in_value',
- '@macro ab
- a
- b
- @end macro
- @set flagab @ab
- flagab: @value{flagab}
- '],
- ['comma_value_in_macro_arg',
- '@set comma ,
- @macro macro1 { arg1 , arg2 }
- result: @emph{\\arg1\\} protected \\\\ -> \\\\arg1\\\\ @emph{\\arg2\\}
- @end macro
- @macro1 { arg1 @value{comma} arg2 }
- '],
- ['value_in_macro_body',
- '@set bodyarg \\arg\\
- @macro testvaluebody { arg }
- result: @emph{\\@value{bodyarg}\\ }
- @end macro
- @testvaluebody{macro_arg1}
- '],
- ['value_in_macro_formal_arg',
- '@set argument arg
- @macro testvalue { arg , the@value{argument} }
- result: @emph{\\arg\\} the \\the\\ thearg \\thearg\\ with value \\the@value{argument}\\
- @end macro
- @testvalue{macro_arg1}
- ']
- );
- our ($arg_test_case, $arg_generate, $arg_debug);
- run_all ('value_and_macro', \@test_cases, $arg_test_case,
- $arg_generate, $arg_debug);
|