fixed blacberry install tests
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/30a7493f Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/30a7493f Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/30a7493f Branch: refs/heads/future Commit: 30a7493ff1c68a33282c7ae787d098bc2d3e2670 Parents: 140d63d Author: Tim Kim <[email protected]> Authored: Fri Apr 12 14:10:14 2013 -0700 Committer: Tim Kim <[email protected]> Committed: Fri Apr 12 14:10:14 2013 -0700 ---------------------------------------------------------------------- test/blackberry-install.js | 7 ++++++- test/plugins/cordova.echo/plugin.xml | 10 +++++----- 2 files changed, 11 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/30a7493f/test/blackberry-install.js ---------------------------------------------------------------------- diff --git a/test/blackberry-install.js b/test/blackberry-install.js index 1356738..c4a82c4 100644 --- a/test/blackberry-install.js +++ b/test/blackberry-install.js @@ -23,6 +23,7 @@ var fs = require('fs') , et = require('elementtree') , osenv = require('osenv') , blackberry = require(path.join(__dirname, '..', 'platforms', 'blackberry')) + , plugin_loader = require('../util/plugin_loader') , test_dir = path.join(osenv.tmpdir(), 'test_plugman') , test_project_dir = path.join(test_dir, 'projects', 'blackberry', 'www') , test_plugin_dir = path.join(test_dir, 'plugins', 'cordova.echo') @@ -65,6 +66,9 @@ exports['should move the source files'] = function (test) { } exports['should move the js file'] = function (test) { + var pluginsPath = path.join(test_dir, 'plugins'); + var wwwPath = path.join(test_dir, 'projects', 'blackberry', 'www'); + // setting up a DummyPlugin var dummy_plugin_dir = path.join(test_dir, 'plugins', 'DummyPlugin') var dummy_xml_path = path.join(test_dir, 'plugins', 'DummyPlugin', 'plugin.xml') @@ -72,7 +76,8 @@ exports['should move the js file'] = function (test) { // run the platform-specific function blackberry.handlePlugin('install', test_project_dir, dummy_plugin_dir, dummy_plugin_et); - + plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'blackberry'); + var jsPath = path.join(test_project_dir, 'dummyplugin.js'); test.ok(fs.existsSync(jsPath)); test.done(); http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/30a7493f/test/plugins/cordova.echo/plugin.xml ---------------------------------------------------------------------- diff --git a/test/plugins/cordova.echo/plugin.xml b/test/plugins/cordova.echo/plugin.xml index f9fa664..8468ec1 100644 --- a/test/plugins/cordova.echo/plugin.xml +++ b/test/plugins/cordova.echo/plugin.xml @@ -15,10 +15,10 @@ <feature id="cordova.echo" required="true" version="1.0.0.0"/> </config-file> - <source-file src="client.js" target-dir="ext-qnx/cordova.echo" /> - <source-file src="index.js" target-dir="ext-qnx/cordova.echo" /> - <source-file src="manifest.json" target-dir="ext-qnx/cordova.echo" /> - <source-file src="device/echoJnext.so" target-dir="ext-qnx/cordova.echo/device" /> - <source-file src="simulator/echoJnext.so" target-dir="ext-qnx/cordova.echo/simulator" /> + <source-file src="src/blackberry/client.js" target-dir="ext-qnx/cordova.echo" /> + <source-file src="src/blackberry/index.js" target-dir="ext-qnx/cordova.echo" /> + <source-file src="src/blackberry/manifest.json" target-dir="ext-qnx/cordova.echo" /> + <source-file src="src/blackberry/device/echoJnext.so" target-dir="ext-qnx/cordova.echo/device" /> + <source-file src="src/blackberry/simulator/echoJnext.so" target-dir="ext-qnx/cordova.echo/simulator" /> </platform> </plugin> \ No newline at end of file
