Skip to content

Commit

Permalink
LDEV-5282 test case for imageShear (disabled)
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer committed Jan 29, 2025
1 parent 1344b27 commit 2ad6f9a
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions tests/ImageShear.cfc
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
component extends="org.lucee.cfml.test.LuceeTestCase" labels="image" skip="true" {

function beforeAll(){
variables.path = getTempDirectory() & "ImageShear/";
if(!directoryExists(path)){
directoryCreate(path);
}
}

function run( testResults, testBox ) {
describe( "test case for ImageShear", function() {

it(title = "Checking with ImageShear", body = function( currentSpec ) {
var newimg = imageNew("",152,152,"rgb","A52A2A");
ImageShear(newimg,1.1,"vertical");
cfimage( action = "write", source = newimg, destination = path&'sheardrawImg.jpg', overwrite = "yes");
expect(fileExists(path&"sheardrawImg.jpg")).tobe("true");
});

it(title = "Checking with Image.Shear()", body = function( currentSpec ) {
var imgObj = imageNew("",200,200,"rgb","149c82");
imgObj.shear(0.4,"horizontal");
cfimage( action = "write", source = imgObj, destination = path&'sheardrawObj.png', overwrite = "yes" );
expect( fileExists(path&"sheardrawObj.png") ).tobe("true");
});

});
};

function afterAll(){
if(directoryExists(path)){
directoryDelete(path, true);
}
}
}

0 comments on commit 2ad6f9a

Please sign in to comment.