You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by be...@apache.org on 2013/06/27 01:58:57 UTC
git commit: Fixed path issues for running tests on windows
Updated Branches:
refs/heads/master2 30239cc60 -> f01d66a24
Fixed path issues for running tests on windows
Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/f01d66a2
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/f01d66a2
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/f01d66a2
Branch: refs/heads/master2
Commit: f01d66a241247806065caac3b8db3847c132e3c0
Parents: 30239cc
Author: Benn Mapes <be...@gmail.com>
Authored: Wed Jun 26 16:58:21 2013 -0700
Committer: Benn Mapes <be...@gmail.com>
Committed: Wed Jun 26 16:58:21 2013 -0700
----------------------------------------------------------------------
spec/metadata/android_parser.spec.js | 8 ++++----
spec/metadata/ios_parser.spec.js | 6 +++---
spec/metadata/wp7_parser.spec.js | 4 ++--
spec/metadata/wp8_parser.spec.js | 4 ++--
spec/platform.spec.js | 2 +-
5 files changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/f01d66a2/spec/metadata/android_parser.spec.js
----------------------------------------------------------------------
diff --git a/spec/metadata/android_parser.spec.js b/spec/metadata/android_parser.spec.js
index e84a3ec..a3fcf41 100644
--- a/spec/metadata/android_parser.spec.js
+++ b/spec/metadata/android_parser.spec.js
@@ -27,7 +27,7 @@ var platforms = require('../../platforms'),
cordova = require('../../cordova');
describe('android project parser', function() {
- var proj = '/some/path';
+ var proj = path.join('some', 'path');
var exists, exec, custom;
beforeEach(function() {
exists = spyOn(fs, 'existsSync').andReturn(true);
@@ -42,7 +42,7 @@ describe('android project parser', function() {
exists.andReturn(false);
expect(function() {
new platforms.android.parser(proj);
- }).toThrow('The provided path "/some/path" is not an Android project.');
+ }).toThrow('The provided path "' + proj + '" is not an Android project.');
});
it('should create an instance with path, strings, manifest and android_config properties', function() {
expect(function() {
@@ -90,7 +90,7 @@ describe('android project parser', function() {
});
});
it('should check that we can update an android project by calling `android update project` on a custom path if it is so defined', function(done) {
- var custom_path = '/some/custom/path/to/android/lib'
+ var custom_path = path.join('some', 'custom', 'path', 'to', 'android', 'lib');
custom.andReturn(custom_path);
platforms.android.parser.check_requirements(proj, function(err) {
expect(err).toEqual(false);
@@ -225,7 +225,7 @@ describe('android project parser', function() {
expect(read.mostRecentCall.args[0]).toContain(util.libDirectory);
});
it('should copy in a fresh cordova.js from custom cordova lib if custom lib is specified', function() {
- var custom_path = '/custom/path';
+ var custom_path = path.join('custom', 'path');
custom.andReturn(custom_path);
p.update_www();
expect(write).toHaveBeenCalled();
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/f01d66a2/spec/metadata/ios_parser.spec.js
----------------------------------------------------------------------
diff --git a/spec/metadata/ios_parser.spec.js b/spec/metadata/ios_parser.spec.js
index 7dfb0aa..24e5cda 100644
--- a/spec/metadata/ios_parser.spec.js
+++ b/spec/metadata/ios_parser.spec.js
@@ -29,7 +29,7 @@ var platforms = require('../../platforms'),
cordova = require('../../cordova');
describe('ios project parser', function () {
- var proj = '/some/path';
+ var proj = path.join('some', 'path');
var exec, custom, readdir, cfg_parser;
beforeEach(function() {
exec = spyOn(shell, 'exec').andCallFake(function(cmd, opts, cb) {
@@ -52,7 +52,7 @@ describe('ios project parser', function () {
expect(p.path).toEqual(proj);
expect(p.pbxproj).toEqual(path.join(proj, 'test.xcodeproj', 'project.pbxproj'));
expect(p.xcodeproj).toEqual(path.join(proj, 'test.xcodeproj'));
- expect(p.originalName).toEqual('/test');
+ expect(p.originalName).toEqual(path.join(proj, 'test');
}).not.toThrow();
});
});
@@ -247,7 +247,7 @@ describe('ios project parser', function () {
expect(cp.mostRecentCall.args[1]).toMatch(util.libDirectory);
});
it('should copy in a fresh cordova.js from custom cordova lib if custom lib is specified', function() {
- var custom_path = '/custom/path';
+ var custom_path = path.join('custom', 'path');
custom.andReturn(custom_path);
p.update_www();
expect(cp.mostRecentCall.args[1]).toMatch(custom_path);
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/f01d66a2/spec/metadata/wp7_parser.spec.js
----------------------------------------------------------------------
diff --git a/spec/metadata/wp7_parser.spec.js b/spec/metadata/wp7_parser.spec.js
index 88bf4b1..b85eac8 100644
--- a/spec/metadata/wp7_parser.spec.js
+++ b/spec/metadata/wp7_parser.spec.js
@@ -74,7 +74,7 @@ describe('wp7 project parser', function() {
});
});
it('should check by calling check_reqs on a custom path if it is so defined', function(done) {
- var custom_path = '/some/custom/path/to/wp7/lib'
+ var custom_path = path.join('some','custom','path','to','wp7','lib');
custom.andReturn(custom_path);
platforms.wp7.parser.check_requirements(proj, function(err) {
expect(err).toEqual(false);
@@ -183,7 +183,7 @@ describe('wp7 project parser', function() {
expect(read.mostRecentCall.args[0]).toContain(util.libDirectory);
});
it('should copy in a fresh cordova.js from custom cordova lib if custom lib is specified', function() {
- var custom_path = '/custom/path';
+ var custom_path = path.join('custom', 'path');
custom.andReturn(custom_path);
p.update_www();
expect(write).toHaveBeenCalled();
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/f01d66a2/spec/metadata/wp8_parser.spec.js
----------------------------------------------------------------------
diff --git a/spec/metadata/wp8_parser.spec.js b/spec/metadata/wp8_parser.spec.js
index 1b1ced8..ff71e87 100644
--- a/spec/metadata/wp8_parser.spec.js
+++ b/spec/metadata/wp8_parser.spec.js
@@ -74,7 +74,7 @@ describe('wp8 project parser', function() {
});
});
it('should check by calling check_reqs on a custom path if it is so defined', function(done) {
- var custom_path = '/some/custom/path/to/wp8/lib'
+ var custom_path = path.join('some','custom','path','to','wp8','lib');
custom.andReturn(custom_path);
platforms.wp8.parser.check_requirements(proj, function(err) {
expect(err).toEqual(false);
@@ -183,7 +183,7 @@ describe('wp8 project parser', function() {
expect(read.mostRecentCall.args[0]).toContain(util.libDirectory);
});
it('should copy in a fresh cordova.js from custom cordova lib if custom lib is specified', function() {
- var custom_path = '/custom/path';
+ var custom_path = path.join('custom','path');
custom.andReturn(custom_path);
p.update_www();
expect(write).toHaveBeenCalled();
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/f01d66a2/spec/platform.spec.js
----------------------------------------------------------------------
diff --git a/spec/platform.spec.js b/spec/platform.spec.js
index 77980aa..8b2a5dc 100644
--- a/spec/platform.spec.js
+++ b/spec/platform.spec.js
@@ -30,7 +30,7 @@ var cordova = require('../cordova'),
var cwd = process.cwd();
var supported_platforms = Object.keys(platforms).filter(function(p) { return p != 'www'; });
-var project_dir = '/some/path';
+var project_dir = path.join('some', 'path');
describe('platform command', function() {
var is_cordova, list_platforms, fire, config_parser, find_plugins, config_read, load, load_custom, rm, mkdir, existsSync, supports, pkg, name, exec, prep_spy, plugman_install, parsers = {};