]> lifelog.hopto.org Git - PerlCNF.git/commitdiff
v.3.3.3 Final Minor Release
authorWill Budic <redacted>
Thu, 6 Mar 2025 06:43:03 +0000 (17:43 +1100)
committerWill Budic <redacted>
Thu, 6 Mar 2025 06:43:03 +0000 (17:43 +1100)
tests/testInstructor.pl

index 44f877a17f56d2a970e0604648cdf1dd94d2b7bf..b98bb4ffeb34856a51bae654646c7bb1c9d99dc7 100644 (file)
@@ -36,12 +36,30 @@ try{
             ));            
             print $test->failed("Test failed! Trying to overwrite existing instruction, which are global.");
         }catch{
-            $test->case("Passed fail on trying to overwrite existing instruction, which are global.");            
+            $test->passed("Passed fail on trying to overwrite existing instruction, which are global.");            
         }
 
       
     $test-> nextCase();
 
+
+   ###
+   # List entry with non reserved word instruction.
+   ###
+   $test->case("List entry with non word instructions.",'4');
+   my $list_parser = CNFParser->new()->parse(undef,q(<<list$$<20.05$>Spend in supermarket.>>));
+   my @list = $list_parser -> list('list');
+   my $instruction = $list[0];
+      $test -> isDefined("\$instruction", $instruction);
+      $test -> evaluate('$instruction.ins == "20.05$"','20.05$',$instruction->{ins});
+      $test -> evaluate('$instruction.val == "Spend in supermarket."','Spend in supermarket.',$instruction->{val});
+   my $anon  = $list_parser->anon('list01');
+      $test -> isZeroOrEqual("\$anon", $instruction);
+   #  
+   $test-> nextCase();
+   #
+
+
     #   
     $test -> done();
     #