public void testProcessDirective() throws Exception {
TemplateActionHandlerStub tahs = new TemplateActionHandlerStub();
PropertySet ps = new PropertySet();
ps.load( new File( "../../../../conf/system.conf" ) );
BasicDirectiveElementProcessor bdep = create( ps, tahs );
tahs.clear();
String s01 = "foo = bar;";
Block b01 = new Block( Block.TYPE_script, s01 );
assertTrue( ! bdep.isMatch( b01 ) );
tahs.clear();
String s02 = "@foo bar;";
Block b02 = new Block( Block.TYPE_script, s02 );
assertTrue( bdep.isMatch( b02 ) );
tahs.clear();
String s03 = " @section bar ";
Block b03 = new Block( Block.TYPE_script, s03 );
assertTrue( bdep.isMatch( b03 ) );
bdep.process( b03 );
assertTrue( "bar".equals( tahs.getDefaultSectionName() ) );
String s04 = " @section ";
Block b04 = new Block( Block.TYPE_script, s04 );
assertTrue( bdep.isMatch( b04 ) );
bdep.process( b04 );
assertTrue( Section.NAME_body.equals( tahs.getDefaultSectionName() ) );
}