-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/lucee/extension-lucene
# Conflicts: # .github/workflows/main.yml
- Loading branch information
Showing
3 changed files
with
338 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
Large diffs are not rendered by default.
Oops, something went wrong.