mirror of
https://github.com/apache/cordova-android.git
synced 2026-04-23 00:00:09 +08:00
feat!: add partial night & day theme support (#1818)
* feat!: partial night & day theme support * feat!: prefix core resource values files with cdv_
This commit is contained in:
@@ -276,17 +276,17 @@ describe('create', function () {
|
||||
});
|
||||
});
|
||||
|
||||
it('should interpolate the project name into strings.xml', () => {
|
||||
it('should interpolate the project name into cdv_strings.xml', () => {
|
||||
config_mock.name.and.returnValue('IncredibleApp');
|
||||
return create.create(project_path, config_mock, {}, events_mock).then(() => {
|
||||
expect(utils.replaceFileContents).toHaveBeenCalledWith(path.join(app_path, 'res', 'values', 'strings.xml'), /__NAME__/, 'IncredibleApp');
|
||||
expect(utils.replaceFileContents).toHaveBeenCalledWith(path.join(app_path, 'res', 'values', 'cdv_strings.xml'), /__NAME__/, 'IncredibleApp');
|
||||
});
|
||||
});
|
||||
|
||||
it('should interpolate the escaped project name into strings.xml', () => {
|
||||
it('should interpolate the escaped project name into cdv_strings.xml', () => {
|
||||
config_mock.name.and.returnValue('<Incredible&App>');
|
||||
return create.create(project_path, config_mock, {}, events_mock).then(() => {
|
||||
expect(utils.replaceFileContents).toHaveBeenCalledWith(path.join(app_path, 'res', 'values', 'strings.xml'), /__NAME__/, '<Incredible&App>');
|
||||
expect(utils.replaceFileContents).toHaveBeenCalledWith(path.join(app_path, 'res', 'values', 'cdv_strings.xml'), /__NAME__/, '<Incredible&App>');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -930,7 +930,7 @@ describe('prepare', () => {
|
||||
locations: {
|
||||
plugins: '/mock/plugins',
|
||||
www: '/mock/www',
|
||||
strings: '/mock/res/values/strings.xml'
|
||||
strings: '/mock/res/values/cdv_strings.xml'
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user