PageRenderTime 13ms CodeModel.GetById 2ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/wheels/tests/global/internal/$checkMinimumVersion.cfc

http://cfwheels.googlecode.com/
ColdFusion CFScript | 33 lines | 27 code | 6 blank | 0 comment | 0 complexity | c7d3287299378c92fac66ebf5a9cab5e MD5 | raw file
 1<cfcomponent extends="wheelsMapping.Test">
 2
 3	<cfset railoVersion = "3.1.2.020">
 4	<cfset adobeVersion = "8,0,1,0">
 5
 6	<cffunction name="test_railo_valid">
 7		<cfset assert('$checkMinimumVersion("3.1.2.020", railoVersion)')>
 8		<cfset assert('$checkMinimumVersion("3.2.2.020", railoVersion)')>
 9		<cfset assert('$checkMinimumVersion("3.1.2.022", railoVersion)')>
10		<cfset assert('$checkMinimumVersion("4.0.0.0", railoVersion)')>
11	</cffunction>
12
13	<cffunction name="test_railo_invalid">
14		<cfset assert('!$checkMinimumVersion("3.1.2.018", railoVersion)')>
15		<cfset assert('!$checkMinimumVersion("3.1.2.019", railoVersion)')>
16		<cfset assert('!$checkMinimumVersion("3", railoVersion)')>
17		<cfset assert('!$checkMinimumVersion("2.1.2.3", railoVersion)')>
18	</cffunction>
19
20	<cffunction name="test_adobe_valid">
21		<cfset assert('$checkMinimumVersion("8,0,1,0", adobeVersion)')>
22		<cfset assert('$checkMinimumVersion("9,0,0,251028", adobeVersion)')>
23		<cfset assert('$checkMinimumVersion("8,0,1,195765", adobeVersion)')>
24	</cffunction>
25
26	<cffunction name="test_adobe_invalid">
27		<cfset assert('!$checkMinimumVersion("8,0", adobeVersion)')>
28		<cfset assert('!$checkMinimumVersion("8,0,0,0", adobeVersion)')>
29		<cfset assert('!$checkMinimumVersion("8,0,0,195765", adobeVersion)')>
30		<cfset assert('!$checkMinimumVersion("7", adobeVersion)')>
31	</cffunction>
32
33</cfcomponent>