Skip to content

Commit

Permalink
extend test case
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Jun 11, 2024
1 parent 5e66506 commit cac401a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/tickets/LDEV4892.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,27 @@ component extends="org.lucee.cfml.test.LuceeTestCase" {
it( title="check syntax colon no space", body=function( currentSpec ) {
var x={ "#test()#"=function(){} };
});

it( title="check syntax", body=function( currentSpec ) {
// https://github.com/coldbox-modules/cbproxies/blob/development/models/Optional.cfc#L252
function getNativeType( results ){
if ( isNull( arguments.results ) ) {
return;
}

var className = arguments.results.getClass().getName();
var isEntrySet = isInstanceOf( arguments.results, "java.util.Map$Entry" ) OR isInstanceOf(
arguments.results,
"java.util.HashMap$Node"
);

if ( isEntrySet ) {
return { "#arguments.results.getKey()#" : arguments.results.getValue() };
}

return arguments.results;
}
});
});
}
}

0 comments on commit cac401a

Please sign in to comment.