mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-31 17:32:51 +08:00
Check old compat of other extension (CB-14125) (PR #550)
of plugin source file installed into app/src/main with old target-dir scheme NOTE: These tests do *not* check compatibility of plugins with old lib target-dir scheme.
This commit is contained in:
parent
e3468c66a3
commit
dea6846918
@ -77,6 +77,7 @@
|
|||||||
<source-file src="src/android/TestAar.aar"
|
<source-file src="src/android/TestAar.aar"
|
||||||
target-dir="app/libs" />
|
target-dir="app/libs" />
|
||||||
<source-file src="src/android/mysettings.xml" target-dir="res/xml" />
|
<source-file src="src/android/mysettings.xml" target-dir="res/xml" />
|
||||||
|
<source-file src="src/android/other.extension" target-dir="res/values" />
|
||||||
<lib-file src="src/android/TestLib.jar" />
|
<lib-file src="src/android/TestLib.jar" />
|
||||||
</platform>
|
</platform>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
1
spec/fixtures/org.test.plugins.dummyplugin/src/android/other.extension
vendored
Normal file
1
spec/fixtures/org.test.plugins.dummyplugin/src/android/other.extension
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
dummy
|
@ -134,6 +134,13 @@ describe('android project handler', function () {
|
|||||||
'src/android/mysettings.xml', temp,
|
'src/android/mysettings.xml', temp,
|
||||||
path.join('app/src/main/res/xml/mysettings.xml'), false);
|
path.join('app/src/main/res/xml/mysettings.xml'), false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('Test#006e : should allow installing file with other extension from sources with old target-dir scheme', function () {
|
||||||
|
android['source-file'].install(valid_source[5], dummyPluginInfo, dummyProject, {android_studio: true});
|
||||||
|
expect(copyFileSpy).toHaveBeenCalledWith(dummyplugin,
|
||||||
|
'src/android/other.extension', temp,
|
||||||
|
path.join('app/src/main/res/values/other.extension'), false);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('of <framework> elements', function () {
|
describe('of <framework> elements', function () {
|
||||||
@ -313,6 +320,12 @@ describe('android project handler', function () {
|
|||||||
android['source-file'].uninstall(valid_source[4], dummyPluginInfo, dummyProject, {android_studio: true});
|
android['source-file'].uninstall(valid_source[4], dummyPluginInfo, dummyProject, {android_studio: true});
|
||||||
expect(removeFileSpy).toHaveBeenCalledWith(temp, path.join('app/src/main/res/xml/mysettings.xml'));
|
expect(removeFileSpy).toHaveBeenCalledWith(temp, path.join('app/src/main/res/xml/mysettings.xml'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('Test#019e : should remove stuff by calling common.removeFile for Android Studio projects, of file with other extension with old target-dir scheme', function () {
|
||||||
|
android['source-file'].install(valid_source[5], dummyPluginInfo, dummyProject, {android_studio: true});
|
||||||
|
android['source-file'].uninstall(valid_source[5], dummyPluginInfo, dummyProject, {android_studio: true});
|
||||||
|
expect(removeFileSpy).toHaveBeenCalledWith(temp, path.join('app/src/main/res/values/other.extension'));
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('of <framework> elements', function () {
|
describe('of <framework> elements', function () {
|
||||||
|
Loading…
Reference in New Issue
Block a user