incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [26/50] git commit: added more tests
Date Tue, 10 Apr 2012 19:15:20 GMT
added more tests


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-coho/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-coho/commit/0a840f5e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-coho/tree/0a840f5e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-coho/diff/0a840f5e

Branch: refs/heads/master
Commit: 0a840f5ebeb4f9c4a5f85f082e823433ef712737
Parents: b737381
Author: Steven Gill <stevengill97@gmail.com>
Authored: Mon Feb 6 15:49:17 2012 -0800
Committer: Steven Gill <stevengill97@gmail.com>
Committed: Mon Feb 6 15:49:17 2012 -0800

----------------------------------------------------------------------
 coho              |    6 +++---
 test/tests.coffee |   23 ++++++++++++++---------
 2 files changed, 17 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-coho/blob/0a840f5e/coho
----------------------------------------------------------------------
diff --git a/coho b/coho
index 22913ea..16e167a 100755
--- a/coho
+++ b/coho
@@ -27,7 +27,7 @@ var util           = require('util')
 , webosReleaseLibDir = '../../release/lib/webos'
 , badaReleaseLibDir = '../../release/lib/bada'
 , releaseDocDir = '../../release/doc'
-, oldVer = process.argv[3]
+, oldVer = process.argv[3];
 
 var commandQueue = [],
     child;
@@ -60,7 +60,7 @@ function executeCommands(callback) {
     	console.log('All done');
     }
 }
-
+/*
 queueCommand("rm -rf temp && mkdir temp && cd temp && mkdir repositories
&& mkdir release");
 queueCommand("cd temp/release && mkdir lib && cd lib && mkdir ios
&& mkdir android && mkdir blackberry && mkdir windows && mkdir
webos && mkdir symbian && mkdir bada");
 
@@ -123,7 +123,7 @@ if (oldVer != undefined){
 	queueCommand("echo 'bada' >> temp/release/changelog")
 	queueCommand("cd " + tempRepoDir + "/"+badadir+" && git shortlog --no-merges "+oldVer+".."+VERSION+"
>> ../../release/changelog")
 }
-
+*/
 executeCommands(function(){
 	exec("cd temp/ && zip -r phonegap-"+VERSION+".zip release/ && say DONE",
function(e, stdout, stderr) {
 	});

http://git-wip-us.apache.org/repos/asf/incubator-cordova-coho/blob/0a840f5e/test/tests.coffee
----------------------------------------------------------------------
diff --git a/test/tests.coffee b/test/tests.coffee
index 0bf0d65..52d8c80 100644
--- a/test/tests.coffee
+++ b/test/tests.coffee
@@ -113,8 +113,8 @@ exports['check ios version number'] = (test)->
 exports['check android version number'] = (test)->
 	test.expect 1
 	fs = require('fs')
-	if fs.readFileSync('./temp/repositories/incubator-cordova-android/VERSION', 'ascii') !=
VERSION
-		test.ok false, "VERSION file doesn't match release version " + VERSION +" " + vFile
+	if fs.readFileSync('./temp/repositories/incubator-cordova-android/VERSION', 'utf8') != VERSION+"\n"
+		test.ok false, "VERSION file doesn't match release version"
 		test.done()
 	else
 		test.ok true, "VERSION file matches release version"
@@ -123,7 +123,7 @@ exports['check android version number'] = (test)->
 exports['check blackberry version number'] = (test)->
 	test.expect 1
 	fs = require('fs')
-	if fs.readFileSync('./temp/repositories/incubator-cordova-blackberry/VERSION', 'ascii')
!= VERSION
+	if fs.readFileSync('./temp/repositories/incubator-cordova-blackberry-webworks/VERSION',
'ascii') != VERSION+"\n"
 		test.ok false, "VERSION file doesn't match release version"
 		test.done()
 	else
@@ -143,7 +143,7 @@ exports['check windows version number'] = (test)->
 exports['check webos version number'] = (test)->
 	test.expect 1
 	fs = require('fs')
-	if fs.readFileSync('./temp/repositories/incubator-cordova-webos/VERSION', 'ascii') != VERSION
+	if fs.readFileSync('./temp/repositories/incubator-cordova-webos/VERSION', 'ascii') != VERSION+"\n\n"
 		test.ok false, "VERSION file doesn't match release version"
 		test.done()
 	else
@@ -153,8 +153,8 @@ exports['check webos version number'] = (test)->
 exports['check bada version number'] = (test)->
 	test.expect 1
 	fs = require('fs')
-	if fs.readFileSync('./temp/repositories/incubator-cordova-bada/VERSION', 'ascii') != VERSION
-		test.ok false, "VERSION file doesn't match release version" + fs.readFileSync('./temp/repositories/incubator-cordova-bada/VERSION',
'ascii')
+	if fs.readFileSync('./temp/repositories/incubator-cordova-bada/VERSION', 'ascii') != VERSION+"\n\n"
+		test.ok false, "VERSION file doesn't match release version"
 		test.done()
 	else
 		test.ok true, "VERSION file matches release version"
@@ -163,7 +163,7 @@ exports['check bada version number'] = (test)->
 exports['check docs version number'] = (test)->
 	test.expect 1
 	fs = require('fs')
-	if fs.readFileSync('./temp/repositories/incubator-cordova-docs/VERSION', 'ascii') != VERSION
+	if fs.readFileSync('./temp/repositories/incubator-cordova-docs/VERSION', 'ascii') != VERSION+"\n"
 		test.ok false, "VERSION file doesn't match release version"
 		test.done()
 	else
@@ -255,6 +255,11 @@ exports['version file copied into release'] = (test)->
 	test.ok require('path').existsSync("./temp/release/version")
 	test.done()
 	
+exports['readme copied into release'] = (test)->
+	test.expect 1
+	test.ok require('path').existsSync("./temp/release/readme.md")
+	test.done()
+	
 exports['test if symbian depreciation file copied'] = (test)->
 	test.expect 1
 	test.ok require('path').existsSync("./temp/release/lib/symbian/depreciate.txt")
@@ -266,7 +271,7 @@ exports['zip exists'] = (test)->
 	test.done()
 	
 exports['test if zip is empty'] = (test)->
-	fs = require('fs')
 	test.expect 1
-	test.ok fs.statSync('temp/phonegap-#{VERSION}.zip').size isnt 0, 'zip created too soon'
+	fs = require('fs')
+	test.ok fs.statSync('./temp/phonegap-#{VERSION}.zip').size != 0, 'zip created too soon'
 	test.done()


Mime
View raw message