diff --git a/packages/create-gen-app/__tests__/licenses.test.ts b/packages/create-gen-app/__tests__/licenses.test.ts index 747c823..8142775 100644 --- a/packages/create-gen-app/__tests__/licenses.test.ts +++ b/packages/create-gen-app/__tests__/licenses.test.ts @@ -30,10 +30,19 @@ describe('license templates', () => { 'BSD-3-CLAUSE', 'UNLICENSE', 'MPL-2.0', + 'CLOSED', ]) ); }); + it('renders CLOSED license with author and email', () => { + const content = renderLicense('CLOSED', context); + expect(content).toContain('Test User'); + expect(content).toContain(''); + expect(content).toContain('2099'); + expect(content).toContain('All Rights Reserved'); + }); + it('handles case-insensitive lookups', () => { expect(isSupportedLicense('mit')).toBe(true); expect(renderLicense('mit', { author: 'User' })).toContain('User'); diff --git a/packages/create-gen-app/licenses-templates/CLOSED.txt b/packages/create-gen-app/licenses-templates/CLOSED.txt new file mode 100644 index 0000000..fe2b930 --- /dev/null +++ b/packages/create-gen-app/licenses-templates/CLOSED.txt @@ -0,0 +1,20 @@ +Copyright (c) {{YEAR}} {{AUTHOR}}{{EMAIL_LINE}} + +All Rights Reserved. + +This software and associated documentation files (the "Software") are the +exclusive property of the copyright holder. No part of the Software may be +reproduced, distributed, modified, or transmitted in any form or by any means, +including photocopying, recording, or other electronic or mechanical methods, +without the prior written permission of the copyright holder. + +Unauthorized copying, modification, distribution, or use of this Software, +via any medium, is strictly prohibited. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE.