You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2014/03/31 22:14:54 UTC

[2/2] git commit: CB-6382 platform list: sort output

CB-6382 platform list: sort output

github: close #156


Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/289239da
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/289239da
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/289239da

Branch: refs/heads/master
Commit: 289239daa806e38f47aa68f6ce5f5c4882f89a78
Parents: 6ddd959
Author: Josh Soref <js...@blackberry.com>
Authored: Mon Mar 31 15:19:28 2014 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Mon Mar 31 16:14:36 2014 -0400

----------------------------------------------------------------------
 spec/platform.spec.js | 2 +-
 src/platform.js       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/289239da/spec/platform.spec.js
----------------------------------------------------------------------
diff --git a/spec/platform.spec.js b/spec/platform.spec.js
index 65a22b7..d4ad000 100644
--- a/spec/platform.spec.js
+++ b/spec/platform.spec.js
@@ -165,7 +165,7 @@ describe('platform command', function() {
             });
             it('should list out added platforms in a project', function(done) {
                 cordova.on('results', function(res) {
-                    expect(res).toMatch(/^Installed platforms: ios, android, ubuntu, amazon-fireos, wp7, wp8, blackberry10, firefoxos, windows8\s*Available platforms:\s*$/);
+                    expect(res).toMatch(RegExp("^Installed platforms: "+supported_platforms.sort().join(", ")+"\\s*Available platforms:\\s*$"));
                     done();
                 });
                 cordova.raw.platform('list');

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/289239da/src/platform.js
----------------------------------------------------------------------
diff --git a/src/platform.js b/src/platform.js
index b932df9..1f21f22 100644
--- a/src/platform.js
+++ b/src/platform.js
@@ -221,7 +221,7 @@ function list(hooks, projectRoot) {
             });
         }));
     }).then(function(platformsText) {
-        var results = 'Installed platforms: ' + platformsText.join(', ') + '\n';
+        var results = 'Installed platforms: ' + platformsText.sort().join(', ') + '\n';
         var available = Object.getOwnPropertyNames(platforms).filter(function(p) {
             var platform = platforms[p] || {},
                 hostos = platform.hostos || null;