[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[7235] * tp/t/test_utils.pl (set_converter_option_defaults): Set
From: |
gavinsmith0123 |
Subject: |
[7235] * tp/t/test_utils.pl (set_converter_option_defaults): Set |
Date: |
Sat, 25 Jun 2016 20:20:46 +0000 (UTC) |
Revision: 7235
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7235
Author: gavin
Date: 2016-06-25 20:20:46 +0000 (Sat, 25 Jun 2016)
Log Message:
-----------
* tp/t/test_utils.pl (set_converter_option_defaults): Set
default expanded formats hash for converter even if this was
given in the parser options. This helps to make the parser
options and converter options separate.
(test) If expanded formats not defined in the parser options,
expand all of the formats except 'tex'.
* t/16raw.t,
* t/50value.t,
* t/55conditionals.t,
* t/57invalid_nestings.t,
* t/60macro.t,
* t/converters_tests.t,
* t/html_tests.t,
* t/plaintext_tests.t:
Add 'expanded_formats' configuration values where required to
minimize changes to the results of the tests.
Modified Paths:
--------------
trunk/ChangeLog
trunk/tp/t/16raw.t
trunk/tp/t/50value.t
trunk/tp/t/55conditionals.t
trunk/tp/t/57invalid_nestings.t
trunk/tp/t/60macro.t
trunk/tp/t/converters_tests.t
trunk/tp/t/html_tests.t
trunk/tp/t/plaintext_tests.t
trunk/tp/t/results/converters_tests/inline.pl
trunk/tp/t/results/converters_tests/inlinefmtifelse.pl
trunk/tp/t/results/menu/inlineraw_in_menu_description.pl
trunk/tp/t/results/plaintext_tests/lone_braces_in_inlineraw.pl
trunk/tp/t/results/raw/inline_in_example.pl
trunk/tp/t/results/raw/inlinefmt.pl
trunk/tp/t/results/raw/inlinefmt_with_empty_line.pl
trunk/tp/t/results/raw/inlineraw.pl
trunk/tp/t/results/raw/inlineraw_with_empty_line.pl
trunk/tp/t/test_utils.pl
trunk/tp/t/xml_tests.t
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2016-06-19 15:18:52 UTC (rev 7234)
+++ trunk/ChangeLog 2016-06-25 20:20:46 UTC (rev 7235)
@@ -1,3 +1,24 @@
+2016-06-25 Gavin Smith <address@hidden>
+
+ * tp/t/test_utils.pl (set_converter_option_defaults): Set
+ default expanded formats hash for converter even if this was
+ given in the parser options. This helps to make the parser
+ options and converter options separate.
+
+ (test) If expanded formats not defined in the parser options,
+ expand all of the formats except 'tex'.
+
+ * t/16raw.t,
+ * t/50value.t,
+ * t/55conditionals.t,
+ * t/57invalid_nestings.t,
+ * t/60macro.t,
+ * t/converters_tests.t,
+ * t/html_tests.t,
+ * t/plaintext_tests.t:
+ Add 'expanded_formats' configuration values where required to
+ minimize changes to the results of the tests.
+
2016-06-19 Gavin Smith <address@hidden>
* tp/Texinfo/Parser.pm (_end_line, _parse_texi): Remove some
Modified: trunk/tp/t/16raw.t
===================================================================
--- trunk/tp/t/16raw.t 2016-06-19 15:18:52 UTC (rev 7234)
+++ trunk/tp/t/16raw.t 2016-06-25 20:20:46 UTC (rev 7235)
@@ -109,7 +109,9 @@
@end tex
@end example
-'],
+',
+{'expanded_formats' => ['tex']}
+],
['lone_braces_in_html',
'@html
}
@@ -291,7 +293,9 @@
in <i>@acronym{HTML}</i>}.
@end example
-'],
+',
+{'expanded_formats' => ['plaintext']}
+],
['raw_in_style',
'@code{
@html
@@ -303,7 +307,8 @@
@html
in html
@end html
-}',{'expanded_formats' => ['html']}],
+}',{'expanded_formats' => ['html']}, {'expanded_formats' => ['html']}
+],
['verbatim_in_brace_command',
'@samp{
@verbatim
@@ -324,7 +329,9 @@
'@tex
This is some \LaTeX{}
-'],
+',
+{'expanded_formats' => ['tex']}
+],
['verbatim_not_closed',
'@verbatim
@@ -355,7 +362,9 @@
['beginning_and_end_on_line',
'
@tex in tex @end tex
-'],
+',
+{'expanded_formats' => ['tex']}
+],
);
my %html_tests = (
Modified: trunk/tp/t/50value.t
===================================================================
--- trunk/tp/t/50value.t 2016-06-19 15:18:52 UTC (rev 7234)
+++ trunk/tp/t/50value.t 2016-06-25 20:20:46 UTC (rev 7235)
@@ -291,7 +291,9 @@
@set bye_macro @bye
address@hidden'],
address@hidden',
+{'expanded_formats' => []}
+],
['value_in_invalid_documentencoding',
'@set badvalue bad
@documentencoding @value{badvalue}
Modified: trunk/tp/t/55conditionals.t
===================================================================
--- trunk/tp/t/55conditionals.t 2016-06-19 15:18:52 UTC (rev 7234)
+++ trunk/tp/t/55conditionals.t 2016-06-25 20:20:46 UTC (rev 7235)
@@ -462,6 +462,12 @@
'],
);
+for my $test (@test_cases) {
+ if (!defined $test->[2]->{'expanded_formats'}) {
+ $test->[2]->{'expanded_formats'} = [];
+ }
+}
+
our ($arg_test_case, $arg_generate, $arg_debug);
run_all ('conditionals', address@hidden, $arg_test_case,
Modified: trunk/tp/t/57invalid_nestings.t
===================================================================
--- trunk/tp/t/57invalid_nestings.t 2016-06-19 15:18:52 UTC (rev 7234)
+++ trunk/tp/t/57invalid_nestings.t 2016-06-25 20:20:46 UTC (rev 7235)
@@ -30,11 +30,15 @@
'],
['raw_block_on_line',
'@cindex @tex
-'],
+',
+{'expanded_formats' => ['tex']}
+],
['ignored_text',
'@node before ignore @ifinfo
in ifinfo
address@hidden ifinfo on the node line'],
address@hidden ifinfo on the node line',
+{'expanded_formats' => []}
+],
['in_table',
'
@node Top
Modified: trunk/tp/t/60macro.t
===================================================================
--- trunk/tp/t/60macro.t 2016-06-19 15:18:52 UTC (rev 7234)
+++ trunk/tp/t/60macro.t 2016-06-25 20:20:46 UTC (rev 7235)
@@ -521,7 +521,9 @@
Call macroseven
@macroseven{aaa}
-'],
+',
+{'expanded_formats' => []}
+],
['expansion_order',
'@macro bidule{arg}
@machin{}
Modified: trunk/tp/t/converters_tests.t
===================================================================
--- trunk/tp/t/converters_tests.t 2016-06-19 15:18:52 UTC (rev 7234)
+++ trunk/tp/t/converters_tests.t 2016-06-25 20:20:46 UTC (rev 7235)
@@ -599,16 +599,20 @@
@end deffn
'],
['raw_block_commands',
-$raw_commands_text
+$raw_commands_text,
+{'expanded_formats' => ['tex', 'docbook', 'html', 'xml']}
],
['raw_block_commands_expand_tex',
-$raw_commands_text, {'expanded_formats' => ['tex']},
+$raw_commands_text,
+{'expanded_formats' => ['tex', 'docbook', 'html', 'xml']},
+{'expanded_formats' => ['tex']},
],
['inline',
$inline_text
],
['inline_expand_tex',
$inline_text, {'expanded_formats' => ['tex']},
+{'expanded_formats' => ['tex']},
],
['inlinefmtifelse',
'@inlinefmtifelse{html,,else html no if}.
@@ -946,7 +950,8 @@
Macros that should not be defined: @mymacro{}. @macroarg{with arg}.
-', {'expanded_formats' => ['html']}],
+', {'expanded_formats' => ['html']}, {'expanded_formats' => ['html']}
+],
);
my @html_text_cases = (
Modified: trunk/tp/t/html_tests.t
===================================================================
--- trunk/tp/t/html_tests.t 2016-06-19 15:18:52 UTC (rev 7234)
+++ trunk/tp/t/html_tests.t 2016-06-25 20:20:46 UTC (rev 7235)
@@ -192,7 +192,8 @@
aa
@end tex
@end copying
-', {'expanded_formats' => ['tex']}
+', {'expanded_formats' => ['tex']},
+{'expanded_formats' => ['tex']}
],
['titles',
'@setfilename html-title.info
Modified: trunk/tp/t/plaintext_tests.t
===================================================================
--- trunk/tp/t/plaintext_tests.t 2016-06-19 15:18:52 UTC (rev 7234)
+++ trunk/tp/t/plaintext_tests.t 2016-06-25 20:20:46 UTC (rev 7235)
@@ -90,14 +90,14 @@
html
@end html
after.
-',{'expanded_formats' => ['html']}
+',{'expanded_formats' => ['html']}, {'expanded_formats' => ['html']}
],
['isolated_html_expanded',
'
@html
html
@end html
-',{'expanded_formats' => ['html']}
+',{'expanded_formats' => ['html']}, {'expanded_formats' => ['html']}
],
['star_at_command_formatting',
'@macro mymacro
@@ -477,7 +477,7 @@
HHH
@end tex
bbbbbbbbb1 bbbbbbbbbbb2 bbbbbbbbbb3 bbbbbbbbbbbbbb4.
-', {'expanded_formats' => ['tex']}
+', {'expanded_formats' => ['tex']}, {'expanded_formats' => ['tex']}
],
['paragraphindent',
'First
Modified: trunk/tp/t/results/converters_tests/inline.pl
===================================================================
--- trunk/tp/t/results/converters_tests/inline.pl 2016-06-19 15:18:52 UTC
(rev 7234)
+++ trunk/tp/t/results/converters_tests/inline.pl 2016-06-25 20:20:46 UTC
(rev 7235)
@@ -54,6 +54,7 @@
{}
]
],
+ 'expand_index' => 1,
'format' => 'html'
},
'line_nr' => {
@@ -107,6 +108,7 @@
{}
]
],
+ 'expand_index' => 1,
'format' => 'plaintext'
},
'line_nr' => {
@@ -160,6 +162,7 @@
{}
]
],
+ 'expand_index' => 1,
'format' => 'xml'
},
'line_nr' => {
@@ -213,6 +216,7 @@
{}
]
],
+ 'expand_index' => 1,
'format' => 'docbook'
},
'line_nr' => {
@@ -383,6 +387,7 @@
{}
]
],
+ 'expand_index' => 1,
'format' => 'html'
},
'line_nr' => {
@@ -436,6 +441,7 @@
{}
]
],
+ 'expand_index' => 1,
'format' => 'plaintext'
},
'line_nr' => {
@@ -489,6 +495,7 @@
{}
]
],
+ 'expand_index' => 1,
'format' => 'xml'
},
'line_nr' => {
@@ -542,6 +549,7 @@
{}
]
],
+ 'expand_index' => 1,
'format' => 'docbook'
},
'line_nr' => {
Modified: trunk/tp/t/results/converters_tests/inlinefmtifelse.pl
===================================================================
--- trunk/tp/t/results/converters_tests/inlinefmtifelse.pl 2016-06-19
15:18:52 UTC (rev 7234)
+++ trunk/tp/t/results/converters_tests/inlinefmtifelse.pl 2016-06-25
20:20:46 UTC (rev 7235)
@@ -49,7 +49,7 @@
{}
]
],
- 'expand_index' => 2,
+ 'expand_index' => 1,
'format' => 'html'
},
'line_nr' => {
@@ -111,7 +111,7 @@
{}
]
],
- 'expand_index' => 2,
+ 'expand_index' => 1,
'format' => 'html'
},
'line_nr' => {
@@ -172,6 +172,7 @@
{}
]
],
+ 'expand_index' => 1,
'format' => 'plaintext'
},
'line_nr' => {
@@ -233,7 +234,7 @@
{}
]
],
- 'expand_index' => 2,
+ 'expand_index' => 1,
'format' => 'plaintext'
},
'line_nr' => {
@@ -300,7 +301,7 @@
],
undef
],
- 'expand_index' => 2,
+ 'expand_index' => 1,
'format' => 'xml'
},
'line_nr' => {
@@ -399,7 +400,7 @@
{}
]
],
- 'expand_index' => 2,
+ 'expand_index' => 1,
'format' => 'docbook',
'spaces_before_argument' => {}
},
@@ -574,7 +575,7 @@
{}
]
],
- 'expand_index' => 2,
+ 'expand_index' => 1,
'format' => 'docbook'
},
'line_nr' => {
Modified: trunk/tp/t/results/menu/inlineraw_in_menu_description.pl
===================================================================
--- trunk/tp/t/results/menu/inlineraw_in_menu_description.pl 2016-06-19
15:18:52 UTC (rev 7234)
+++ trunk/tp/t/results/menu/inlineraw_in_menu_description.pl 2016-06-25
20:20:46 UTC (rev 7235)
@@ -191,6 +191,7 @@
{}
]
],
+ 'expand_index' => 1,
'format' => 'html'
},
'line_nr' => {
Modified: trunk/tp/t/results/plaintext_tests/lone_braces_in_inlineraw.pl
===================================================================
--- trunk/tp/t/results/plaintext_tests/lone_braces_in_inlineraw.pl
2016-06-19 15:18:52 UTC (rev 7234)
+++ trunk/tp/t/results/plaintext_tests/lone_braces_in_inlineraw.pl
2016-06-25 20:20:46 UTC (rev 7235)
@@ -59,6 +59,7 @@
{}
]
],
+ 'expand_index' => 1,
'format' => 'plaintext'
},
'line_nr' => {},
Modified: trunk/tp/t/results/raw/inline_in_example.pl
===================================================================
--- trunk/tp/t/results/raw/inline_in_example.pl 2016-06-19 15:18:52 UTC (rev
7234)
+++ trunk/tp/t/results/raw/inline_in_example.pl 2016-06-25 20:20:46 UTC (rev
7235)
@@ -100,6 +100,7 @@
{}
]
],
+ 'expand_index' => 1,
'format' => 'plaintext'
},
'line_nr' => {
@@ -153,6 +154,7 @@
{}
]
],
+ 'expand_index' => 1,
'format' => 'plaintext'
},
'line_nr' => {
Modified: trunk/tp/t/results/raw/inlinefmt.pl
===================================================================
--- trunk/tp/t/results/raw/inlinefmt.pl 2016-06-19 15:18:52 UTC (rev 7234)
+++ trunk/tp/t/results/raw/inlinefmt.pl 2016-06-25 20:20:46 UTC (rev 7235)
@@ -75,6 +75,7 @@
{}
]
],
+ 'expand_index' => 1,
'format' => 'plaintext'
},
'line_nr' => {},
@@ -159,6 +160,7 @@
{}
]
],
+ 'expand_index' => 1,
'format' => 'html'
},
'line_nr' => {},
Modified: trunk/tp/t/results/raw/inlinefmt_with_empty_line.pl
===================================================================
--- trunk/tp/t/results/raw/inlinefmt_with_empty_line.pl 2016-06-19 15:18:52 UTC
(rev 7234)
+++ trunk/tp/t/results/raw/inlinefmt_with_empty_line.pl 2016-06-25 20:20:46 UTC
(rev 7235)
@@ -56,6 +56,7 @@
{}
]
],
+ 'expand_index' => 1,
'format' => 'plaintext'
},
'line_nr' => {
@@ -136,6 +137,7 @@
{}
]
],
+ 'expand_index' => 1,
'format' => 'html'
},
'line_nr' => {
Modified: trunk/tp/t/results/raw/inlineraw.pl
===================================================================
--- trunk/tp/t/results/raw/inlineraw.pl 2016-06-19 15:18:52 UTC (rev 7234)
+++ trunk/tp/t/results/raw/inlineraw.pl 2016-06-25 20:20:46 UTC (rev 7235)
@@ -75,6 +75,7 @@
{}
]
],
+ 'expand_index' => 1,
'format' => 'plaintext'
},
'line_nr' => {},
@@ -159,6 +160,7 @@
{}
]
],
+ 'expand_index' => 1,
'format' => 'html'
},
'line_nr' => {},
Modified: trunk/tp/t/results/raw/inlineraw_with_empty_line.pl
===================================================================
--- trunk/tp/t/results/raw/inlineraw_with_empty_line.pl 2016-06-19 15:18:52 UTC
(rev 7234)
+++ trunk/tp/t/results/raw/inlineraw_with_empty_line.pl 2016-06-25 20:20:46 UTC
(rev 7235)
@@ -83,6 +83,7 @@
{}
]
],
+ 'expand_index' => 1,
'format' => 'plaintext'
},
'line_nr' => {
@@ -184,6 +185,7 @@
{}
]
],
+ 'expand_index' => 1,
'format' => 'html'
},
'line_nr' => {
Modified: trunk/tp/t/test_utils.pl
===================================================================
--- trunk/tp/t/test_utils.pl 2016-06-19 15:18:52 UTC (rev 7234)
+++ trunk/tp/t/test_utils.pl 2016-06-25 20:20:46 UTC (rev 7235)
@@ -462,8 +462,7 @@
my $parser_options = shift;
my $format = shift;
$converter_options = {} if (!defined($converter_options));
- if (!defined($parser_options->{'expanded_formats'})
- and !defined($converter_options->{'expanded_formats'})) {
+ if (!defined($converter_options->{'expanded_formats'})) {
$converter_options->{'expanded_formats'} = [$format];
}
return $converter_options;
@@ -685,6 +684,15 @@
$parser_options = shift @$test_case if (@$test_case);
$converter_options = shift @$test_case if (@$test_case);
+ if (!defined $parser_options->{'expanded_formats'}) {
+ $parser_options->{'expanded_formats'} = [
+ 'docbook', 'html', 'xml', 'info', 'plaintext'];
+ # 'tex' is missed out here so that @ifnottex is expanded
+ # in the tests. Put
+ # {'expanded_formats' => ['tex']}
+ # where you need @tex expanded in the t/*.t files.
+ }
+
my $test_file;
if ($parser_options->{'test_file'}) {
$test_file = $input_files_dir . $parser_options->{'test_file'};
Modified: trunk/tp/t/xml_tests.t
===================================================================
--- trunk/tp/t/xml_tests.t 2016-06-19 15:18:52 UTC (rev 7234)
+++ trunk/tp/t/xml_tests.t 2016-06-25 20:20:46 UTC (rev 7235)
@@ -280,7 +280,9 @@
T
@end deffn
-'],
+',
+{'expanded_formats' => ['tex'] }
+],
['spaces_info_lost',
'@example text on example line
in bad example
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [7235] * tp/t/test_utils.pl (set_converter_option_defaults): Set,
gavinsmith0123 <=