Skip to content

Commit

Permalink
LDEV-3672 testcase for dump error with final
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer committed Aug 9, 2024
1 parent a253f35 commit 4f1546d
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 0 deletions.
24 changes: 24 additions & 0 deletions test/tickets/LDEV3672.cfc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
component extends="org.lucee.cfml.test.LuceeTestCase" skip=true {

function beforeAll(){
variables.uri = createURI("LDEV3672");
}

function run( testResults , testBox ) {

describe( title='LDEV-3672' , body=function(){

it( title='dumping a cfc errors with final' , body=function() {
local.result = _InternalRequest(
template:"#variables.uri#/LDEV3672.cfm"
);
expect(local.result.filecontent.trim()).toBe('success');
});
});
}

private string function createURI(string calledName){
var baseURI="/test/#listLast(getDirectoryFromPath(getCurrentTemplatepath()),"\/")#/";
return baseURI & "" & calledName;
}
}
3 changes: 3 additions & 0 deletions test/tickets/LDEV3672/Application.cfc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
component {
this.name = "LDEV3672";
}
11 changes: 11 additions & 0 deletions test/tickets/LDEV3672/LDEV3672.cfm
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<cfscript>
cfc = new LDEV3672_final();
try {
savecontent variable="ignore"{
dump( cfc );
}
echo( "success" );
} catch( e ){
echo( e.stacktrace );
}
</cfscript>
3 changes: 3 additions & 0 deletions test/tickets/LDEV3672/LDEV3672_final.cfc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
component {
final this.test = "test"
}

0 comments on commit 4f1546d

Please sign in to comment.