brodybits closed pull request #541: [WIP] Reproduce GH-540 on 7.1.2
URL: https://github.com/apache/cordova-android/pull/541
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/spec/fixtures/org.test.plugins.dummyplugin/plugin.xml 
b/spec/fixtures/org.test.plugins.dummyplugin/plugin.xml
index a40df2b28..a6fa887ad 100644
--- a/spec/fixtures/org.test.plugins.dummyplugin/plugin.xml
+++ b/spec/fixtures/org.test.plugins.dummyplugin/plugin.xml
@@ -70,6 +70,10 @@
 
         <source-file src="src/android/DummyPlugin.java"
                 target-dir="src/com/phonegap/plugins/dummyplugin" />
+        <source-file src="src/android/DummyPlugin2.java"
+                target-dir="app/src/main/src/com/phonegap/plugins/dummyplugin" 
/>
+        <source-file src="src/android/TestLib.jar"
+                target-dir="app/libs" />
         <lib-file src="src/android/TestLib.jar" />
     </platform>
 </plugin>
diff --git 
a/spec/fixtures/org.test.plugins.dummyplugin/src/android/DummyPlugin2.java 
b/spec/fixtures/org.test.plugins.dummyplugin/src/android/DummyPlugin2.java
new file mode 100644
index 000000000..c2dd0f731
--- /dev/null
+++ b/spec/fixtures/org.test.plugins.dummyplugin/src/android/DummyPlugin2.java
@@ -0,0 +1 @@
+./org.test.plugins.dummyplugin/src/android/DummyPlugin2.java
diff --git a/spec/unit/pluginHandlers/handlers.spec.js 
b/spec/unit/pluginHandlers/handlers.spec.js
index edc8f43bc..725d7689a 100644
--- a/spec/unit/pluginHandlers/handlers.spec.js
+++ b/spec/unit/pluginHandlers/handlers.spec.js
@@ -108,6 +108,18 @@ describe('android project handler', function () {
                     android['source-file'].install(valid_source[0], 
dummyPluginInfo, dummyProject);
                 }).toThrow(new Error('"' + target + '" already exists!'));
             });
+
+            it('Test#007 : should allow installing sources using proper path', 
function () {
+                android['source-file'].install(valid_source[1], 
dummyPluginInfo, dummyProject, {android_studio: true});
+                expect(copyFileSpy)
+                    .toHaveBeenCalledWith(dummyplugin, 
'src/android/DummyPlugin2.java', temp, 
path.join('app/src/main/src/com/phonegap/plugins/dummyplugin/DummyPlugin2.java'),
 false);
+            });
+
+            it('Test#008 : should allow installing lib file from sources using 
proper path', function () {
+                android['source-file'].install(valid_source[2], 
dummyPluginInfo, dummyProject, {android_studio: true});
+                expect(copyFileSpy)
+                    .toHaveBeenCalledWith(dummyplugin, 
'src/android/TestLib.jar', temp, path.join('app/libs/TestLib.jar'), false);
+            });
         });
 
         describe('of <framework> elements', function () {


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org

Reply via email to