Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add test for compressionMethod stored #707

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 12 additions & 1 deletion test/tags/Zip.cfc
Expand Up @@ -29,6 +29,7 @@ component extends="org.lucee.cfml.test.LuceeTestCase" {
variables.dir1=root&"a/";
variables.file2=root&"a/b.txt";
variables.target=root&"test.zip";
variables.targetStored=root&"testStored.zip";
variables.unzip=root&"unzip";

if(directoryExists(root)) directoryDelete(root,true);
Expand Down Expand Up @@ -74,7 +75,17 @@ component extends="org.lucee.cfml.test.LuceeTestCase" {
zip action="list" file=target name="local.qry";
assertEquals(4,qry.recordcount);
assertEquals('/1/2.cfm,a.txt,b.txt,b/c/a.txt',listSort(valueList(qry.name),'textnocase'));


// zip no compression
if(fileExists(targetStored)) fileDelete(targetStored);

zip action="zip" file=targetStored compressionMethod="store"{
zipparam entryPath = "/1/2.cfm" source =variables.file1;
zipparam source =variables.file1;
zipparam source =variables.dir1;
zipparam prefix="n/m" source =variables.dir1;
}
assertTrue(getFileInfo(targetStored).size GT getFileInfo(target).size);

}
finally {
Expand Down