Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/main.yml
  • Loading branch information
michaeloffner committed Dec 11, 2024
2 parents e8a36dc + 1f8471f commit 0351d12
Show file tree
Hide file tree
Showing 3 changed files with 338 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
Docs: https://docs.lucee.org/categories/search.html

Issues: https://luceeserver.atlassian.net/issues/?jql=labels%20%3D%20cfsearch

## Known Issues

- File locking problems on Windows https://luceeserver.atlassian.net/browse/LDEV-3310
73 changes: 73 additions & 0 deletions tests/Collection.cfc
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<!---
*
* Copyright (c) 2014, the Railo Company LLC. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
---><cfscript>
component extends="org.lucee.cfml.test.LuceeTestCase" {

public void function testCreateCollection() localmode=true {
try {

curr=GetDirectoryFromPath(GetCurrentTemplatePath());
path=curr&"_collection/";

if(DirectoryExists(path)) {
directoryDelete(path,true);
}
directoryCreate(path);


collection action="list" name="test";
lenBefore=test.recordcount;


collection
action="create"
collection="collA"
path="#path#/#server.ColdFusion.ProductName#"
language="English";
collection
action="create"
collection="collB"
path="#path#/#server.ColdFusion.ProductName#"
language="English";

collection action="list" name="test";
lenAfter=test.recordcount;

assertEquals(lenBefore+2,lenAfter);


collection
action="optimize"
collection="colla";

collection
action="delete"
collection="collA";
collection
action="delete"
collection="collB";
}
finally {
if(DirectoryExists(path)) {
directoryDelete(path,true);
}
}
}

}
</cfscript>
261 changes: 261 additions & 0 deletions tests/Index.cfc

Large diffs are not rendered by default.

0 comments on commit 0351d12

Please sign in to comment.