Commits

shl...@52c325ad-5fd0-0310-8a0f-c43feede02cc  committed b04c242

Add more tests.

  • Participants
  • Parent commits 1e8c52b

Comments (0)

Files changed (1)

File perl/modules/XML-Grammar-Fiction/t/base/line-iterator-unit.t

 
 use utf8;
 
-use Test::More tests => 6;
+use Test::More tests => 9;
 
 use XML::Grammar::FictionBase::FromProto::Parser::LineIterator;
 
         # TEST
         is ($pos, 0, "Pos of ->curr_line_and_pos() is OK.")
     }
+
+    my $verdict = ${$parser->curr_line_ref()} =~ m{\G.*?(my f[^d]*d)}g;
+
+    my $match = $1;
+
+    # TEST
+    ok ($verdict, 'Matched.');
+    # TEST
+    is ($match, 'my friend', 'Match is correct');
+    # TEST
+    is (substr(${$parser->curr_line_ref()}, $parser->curr_pos()),
+        qq{, Mr. Sherlock Holmes, one day in the autumn of\n},
+    );
 }