From: Will Budic Date: Thu, 6 Mar 2025 06:43:03 +0000 (+1100) Subject: v.3.3.3 Final Minor Release X-Git-Url: https://lifelog.hopto.org/gitweb/?a=commitdiff_plain;h=8145bce420df6f67d9e720328e4ed9051332e51d;p=PerlCNF.git v.3.3.3 Final Minor Release --- diff --git a/tests/testInstructor.pl b/tests/testInstructor.pl index 44f877a..b98bb4f 100644 --- a/tests/testInstructor.pl +++ b/tests/testInstructor.pl @@ -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(<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(); #