mirror of
https://github.com/shivammathur/setup-php.git
synced 2025-08-02 03:37:16 +07:00
Add support for any git repository to compile extension from source
Add support for extensions in a subdirectory to compile from source
This commit is contained in:
@ -154,7 +154,7 @@ describe('Extension tests', () => {
|
||||
'linux'
|
||||
);
|
||||
expect(linux).toContain(
|
||||
'add_extension_from_github mongodb mongodb mongo-php-driver master'
|
||||
'add_extension_from_source mongodb https://github.com mongodb mongo-php-driver . master extension'
|
||||
);
|
||||
});
|
||||
|
||||
@ -254,7 +254,7 @@ describe('Extension tests', () => {
|
||||
'darwin'
|
||||
);
|
||||
expect(darwin).toContain(
|
||||
'add_extension_from_github mongodb mongodb mongo-php-driver master'
|
||||
'add_extension_from_source mongodb https://github.com mongodb mongo-php-driver . master extension'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
@ -259,4 +259,31 @@ describe('Utils tests', () => {
|
||||
await utils.customPackage('pkg8', 'ext', '1.2.3', 'linux')
|
||||
).toContain(script_path + '\nadd_pkg 1.2.3');
|
||||
});
|
||||
|
||||
it('checking parseExtensionSource', async () => {
|
||||
expect(
|
||||
await utils.parseExtensionSource(
|
||||
'ext-org-name/repo-name@release',
|
||||
'extension'
|
||||
)
|
||||
).toContain(
|
||||
'\nadd_extension_from_source ext https://github.com org-name repo-name . release extension'
|
||||
);
|
||||
expect(
|
||||
await utils.parseExtensionSource(
|
||||
'ext-https://sub.domain.tld/org/repo@release',
|
||||
'extension'
|
||||
)
|
||||
).toContain(
|
||||
'\nadd_extension_from_source ext https://sub.domain.tld org repo . release extension'
|
||||
);
|
||||
expect(
|
||||
await utils.parseExtensionSource(
|
||||
'ext-https://sub.domain.XN--tld/org/repo/sub/dir@release',
|
||||
'extension'
|
||||
)
|
||||
).toContain(
|
||||
'\nadd_extension_from_source ext https://sub.domain.XN--tld org repo sub/dir release extension'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user