Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: https://farcry.jira.com/svn/FC/branches/p600@5546 8f7d33b6-1012-0410-9a5a-bb7ecce9c363
- Loading branch information
Rob Rohan
committed
Jun 4, 2010
1 parent
a65bebb
commit 263fa30
Showing
3 changed files
with
208 additions
and
11 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
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,76 @@ | ||
<!--- @@Copyright: Copyright (c) 2009 Rob Rohan. All rights reserved. ---> | ||
<!--- @@displayname: fapiTest.cfc ---> | ||
<!--- @@description: | ||
This file holds all the tests for the Utils API in FarCry. | ||
WARNING: this file requires it be opened and saved in | ||
UTF-8. There are characters in this file that require UTF-8 | ||
encoding. Please ensure you are opening and saving this file in UTF-8 | ||
or tests will start to fail and will need to be re-written using the | ||
correct encoding. | ||
On Windows UTF-8 is not the default. If you are using Eclipse please | ||
right click on the file and make sure the encoding is UTF-8. If this | ||
doesn't look like Chinese: | ||
这个我的猴子!那个我的帽子!我写得津津有味! | ||
Then you are not using UTF-8. | ||
---> | ||
<cfcomponent extends="mxunit.framework.TestCase" displayname="Utils Tests"> | ||
<!--- setup and teardown ---> | ||
<cffunction name="setUp" returntype="void" access="public"> | ||
<!--- Any code needed to return your environment to normal goes here ---> | ||
</cffunction> | ||
|
||
<cffunction name="tearDown" returntype="void" access="public"> | ||
<!--- Any code needed to return your environment to normal goes here ---> | ||
|
||
</cffunction> | ||
|
||
<!--- ////////////////////////////////////////////////////////////////// ---> | ||
|
||
<cffunction name="arrayFromStringCommands_Blank_Test" access="public"> | ||
<cfset assertEquals( | ||
application.fc.utils.arrayFromStringCommands("", ""), | ||
[]) /> | ||
</cffunction> | ||
|
||
<cffunction name="arrayFromStringCommands_MinusAsterisk_Test" access="public"> | ||
<cfset assertEquals( | ||
application.fc.utils.arrayFromStringCommands("one,two,three,four", "-*"), | ||
[]) /> | ||
</cffunction> | ||
|
||
<cffunction name="arrayFromStringCommands_AsteriskMinus_Test" access="public"> | ||
<cfset assertEquals( | ||
application.fc.utils.arrayFromStringCommands("one,two,three,four", "*:-four"), | ||
["one","two","three"]) /> | ||
</cffunction> | ||
|
||
<cffunction name="arrayFromStringCommands_AsteriskPlus_Test" access="public"> | ||
<cfset assertEquals( | ||
application.fc.utils.arrayFromStringCommands("one,two,three,four", "*:+five"), | ||
["one","two","three","four","five"]) /> | ||
</cffunction> | ||
|
||
<cffunction name="arrayFromStringCommands_Plus_Test" access="public"> | ||
<cfset assertEquals( | ||
application.fc.utils.arrayFromStringCommands("one,two,three,four", "+five"), | ||
["one","two","three","four","five"]) /> | ||
</cffunction> | ||
|
||
<cffunction name="arrayFromStringCommands_AsteriskPlusMinus_Test" access="public"> | ||
<cfset assertEquals( | ||
application.fc.utils.arrayFromStringCommands("one,two,three,four", "*:+five:-one"), | ||
["two","three","four","five"]) /> | ||
</cffunction> | ||
|
||
<cffunction name="arrayFromStringCommands_AsteriskPlusListMinusList_Test" access="public"> | ||
<cfset assertEquals( | ||
application.fc.utils.arrayFromStringCommands( | ||
"one,two,three,four", | ||
"*:+five,six,seven:-one,four,three"), | ||
["two","five","six","seven"]) /> | ||
</cffunction> | ||
|
||
<!--- ////////////////////////////////////////////////////////////////// ---> | ||
|
||
</cfcomponent> |