[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[7536] new paragraph tests
From: |
gavinsmith0123 |
Subject: |
[7536] new paragraph tests |
Date: |
Sat, 3 Dec 2016 17:10:59 +0000 (UTC) |
Revision: 7536
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7536
Author: gavin
Date: 2016-12-03 17:10:59 +0000 (Sat, 03 Dec 2016)
Log Message:
-----------
new paragraph tests
Modified Paths:
--------------
trunk/ChangeLog
trunk/tp/t/paragraph.t
trunk/tp/t/plaintext_tests.t
Added Paths:
-----------
trunk/tp/t/results/plaintext_tests/punctuation_in_sc.pl
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2016-12-03 16:50:32 UTC (rev 7535)
+++ trunk/ChangeLog 2016-12-03 17:10:59 UTC (rev 7536)
@@ -1,5 +1,11 @@
2016-12-03 Gavin Smith <address@hidden>
+ * tp/t/paragraph.t (two_words_dot_paren_dot, two_words_dot_dot)
+ (three_newlines): New tests.
+ * tp/t/plaintext.t (punctuation_in_sc): New tests.
+
+2016-12-03 Gavin Smith <address@hidden>
+
* tp/Texinfo/Convert/ParagraphNonXS.pm
(add_text): Do not remove end-of-sentence flag here, as adding
more spaces later on would cancel the doubled space.
Modified: trunk/tp/t/paragraph.t
===================================================================
--- trunk/tp/t/paragraph.t 2016-12-03 16:50:32 UTC (rev 7535)
+++ trunk/tp/t/paragraph.t 2016-12-03 17:10:59 UTC (rev 7536)
@@ -6,7 +6,9 @@
BEGIN {
-plan tests => 127 * 2 - 45;
+# X * 2 - Y: X is the total number of tests, Y the number of tests only to
+# be run once.
+plan tests => 130 * 2 - 45;
my ($real_command_name, $command_directory, $command_suffix)
= fileparse($0, '.t');
@@ -78,9 +80,12 @@
#test_para(['word. other'], "word. other\n", 'two_words_dot_one_space');
test_para(['word. other'], "word. other\n", 'two_words_dot_one_space');
test_para(['word.) other'], "word.) other\n",
'two_words_dot_paren_one_space');
+test_para(['word.). other'], "word.). other\n", 'two_words_dot_paren_dot');
+test_para(['word.. other'], "word.. other\n", 'two_words_dot_dot');
test_para(['worD. other'], "worD. other\n", 'two_words_dot_upper');
test_para(['worD.) other'], "worD.) other\n", 'two_words_dot_paren_upper');
test_para(['worD). other'], "worD). other\n", 'two_words_paren_dot_upper');
+test_para(["word.\n", "\n", "\n", 'other',], "word. other\n",
'three_newlines');
test_para(['word','other'], "wordother\n", 'concatenate');
test_para(['word.', ' A'], "word. A\n", 'punctuation_at_end_fragment');
test_para(['word','other'], "wordother\n", 'concatenate_max', {'max' => 2});
Modified: trunk/tp/t/plaintext_tests.t
===================================================================
--- trunk/tp/t/plaintext_tests.t 2016-12-03 16:50:32 UTC (rev 7535)
+++ trunk/tp/t/plaintext_tests.t 2016-12-03 17:10:59 UTC (rev 7536)
@@ -50,6 +50,7 @@
Now ! !@:@@ !@:
but , ,@:
'],
+['punctuation_in_sc', 'one @sc{two.} three @sc{FOUR.} five'],
['accent_command_punctuation',
'@dotaccent{e} after'],
['empty_line_in_example_end',
Added: trunk/tp/t/results/plaintext_tests/punctuation_in_sc.pl
===================================================================
--- trunk/tp/t/results/plaintext_tests/punctuation_in_sc.pl
(rev 0)
+++ trunk/tp/t/results/plaintext_tests/punctuation_in_sc.pl 2016-12-03
17:10:59 UTC (rev 7536)
@@ -0,0 +1,95 @@
+use vars qw(%result_texis %result_texts %result_trees %result_errors
+ %result_indices %result_sectioning %result_nodes %result_menus
+ %result_floats %result_converted %result_converted_errors
+ %result_elements %result_directions_text);
+
+use utf8;
+
+$result_trees{'punctuation_in_sc'} = {
+ 'contents' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => 'one '
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => 'two.'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'sc',
+ 'contents' => [],
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 1,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ },
+ {
+ 'parent' => {},
+ 'text' => ' three '
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => 'FOUR.'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'sc',
+ 'contents' => [],
+ 'line_nr' => {},
+ 'parent' => {}
+ },
+ {
+ 'parent' => {},
+ 'text' => ' five'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'paragraph'
+ }
+ ],
+ 'type' => 'text_root'
+};
+$result_trees{'punctuation_in_sc'}{'contents'}[0]{'contents'}[0]{'parent'} =
$result_trees{'punctuation_in_sc'}{'contents'}[0];
+$result_trees{'punctuation_in_sc'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
= $result_trees{'punctuation_in_sc'}{'contents'}[0]{'contents'}[1]{'args'}[0];
+$result_trees{'punctuation_in_sc'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'parent'}
= $result_trees{'punctuation_in_sc'}{'contents'}[0]{'contents'}[1];
+$result_trees{'punctuation_in_sc'}{'contents'}[0]{'contents'}[1]{'parent'} =
$result_trees{'punctuation_in_sc'}{'contents'}[0];
+$result_trees{'punctuation_in_sc'}{'contents'}[0]{'contents'}[2]{'parent'} =
$result_trees{'punctuation_in_sc'}{'contents'}[0];
+$result_trees{'punctuation_in_sc'}{'contents'}[0]{'contents'}[3]{'args'}[0]{'contents'}[0]{'parent'}
= $result_trees{'punctuation_in_sc'}{'contents'}[0]{'contents'}[3]{'args'}[0];
+$result_trees{'punctuation_in_sc'}{'contents'}[0]{'contents'}[3]{'args'}[0]{'parent'}
= $result_trees{'punctuation_in_sc'}{'contents'}[0]{'contents'}[3];
+$result_trees{'punctuation_in_sc'}{'contents'}[0]{'contents'}[3]{'line_nr'} =
$result_trees{'punctuation_in_sc'}{'contents'}[0]{'contents'}[1]{'line_nr'};
+$result_trees{'punctuation_in_sc'}{'contents'}[0]{'contents'}[3]{'parent'} =
$result_trees{'punctuation_in_sc'}{'contents'}[0];
+$result_trees{'punctuation_in_sc'}{'contents'}[0]{'contents'}[4]{'parent'} =
$result_trees{'punctuation_in_sc'}{'contents'}[0];
+$result_trees{'punctuation_in_sc'}{'contents'}[0]{'parent'} =
$result_trees{'punctuation_in_sc'};
+
+$result_texis{'punctuation_in_sc'} = 'one @sc{two.} three @sc{FOUR.} five';
+
+
+$result_texts{'punctuation_in_sc'} = 'one TWO. three FOUR. five';
+
+$result_errors{'punctuation_in_sc'} = [];
+
+
+
+$result_converted{'plaintext'}->{'punctuation_in_sc'} = 'one TWO. three FOUR.
five
+';
+
+1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [7536] new paragraph tests,
gavinsmith0123 <=