mirror of
https://github.com/apache/cordova-android.git
synced 2026-04-04 00:02:03 +08:00
fix(pluginHandlers): properly check if path is inside another (#1014)
This commit is contained in:
committed by
GitHub
parent
80ad635348
commit
8ef8d994df
@@ -108,6 +108,15 @@ describe('common platform handler', function () {
|
||||
expect(s).toHaveBeenCalled();
|
||||
expect(s).toHaveBeenCalledWith(java_file, resolvedDest);
|
||||
});
|
||||
|
||||
it('should handle relative paths when checking for sub paths', () => {
|
||||
fs.outputFileSync(java_file, 'contents');
|
||||
const relativeProjectPath = path.relative(process.cwd(), project_dir);
|
||||
|
||||
expect(() => {
|
||||
copyFile(test_dir, java_file, relativeProjectPath, dest);
|
||||
}).not.toThrow();
|
||||
});
|
||||
});
|
||||
|
||||
describe('copyNewFile', function () {
|
||||
|
||||
Reference in New Issue
Block a user