$cnf->parse(undef,q(
<<TestInstructor<INSTRUCTOR>TEST2>>
));
- $test -> nextCase();
+
try{
- # New instance doesn't mask it for being global, it is still there!
- CNFParser->new(undef,{STRICT=>1})->parse(undef,q(
- <<TestInstructor<INSTRUCTOR>TEST>>
+ # New instance doesn't mask it for being global, is it still there?
+ CNFParser->new(undef,{STRICT=>1, ENABLE_WARNINGS=>1})->parse(undef,q(
+ <<GenericInstructionHandler<INSTRUCTOR>
+ #called the following:
+ TEST
+ >>
));
- print $test->failed("Test failed! Trying to overwrite existing instruction, which are global.");
+ print $test->failed("Test failed! Passed to overwrite existing instruction, which are global.");
}catch{
$test->passed("Passed fail on trying to overwrite existing instruction, which are global.");
}
-
+
$test-> nextCase();
+ $test->case('Test instructor to generate property.');
+
+ my $parser = CNFParser->new(undef,{STRICT=>1, ENABLE_WARNINGS=>1})->parse(undef,q(
+ <<GenericInstructionHandler<INSTRUCTOR>
+ flag:1
+ TEST_ME
+ >>
+ <<MY_PROP<TEST_ME>
+ A:1
+ B:2
+ Some multi line
+ VALUE is HERE!
+ >>
+
+ ));
+ my $mp = $parser -> property('MY_PROP');
+ $test->isDefined("\$MY_PROP", $mp);
+ $test->evaluate("\$MY_PROP->val()","Some multi line\nVALUE is HERE!",$mp->val());
+
+ $test -> nextCase();
+
+
###
# List entry with non reserved word instruction.
###