From 8145bce420df6f67d9e720328e4ed9051332e51d Mon Sep 17 00:00:00 2001 From: Will Budic Date: Thu, 6 Mar 2025 17:43:03 +1100 Subject: [PATCH] v.3.3.3 Final Minor Release --- tests/testInstructor.pl | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) 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(); # -- 2.34.1