From 86ee9e595aecf7e1bae63259b03ef44da01d25e7 Mon Sep 17 00:00:00 2001 From: 7000pctAUTO Date: Fri, 30 Jan 2026 07:12:55 +0000 Subject: [PATCH] Add test files: fixtures, generators, spec parser, validation --- test/fixtures.ts | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 test/fixtures.ts diff --git a/test/fixtures.ts b/test/fixtures.ts new file mode 100644 index 0000000..8425269 --- /dev/null +++ b/test/fixtures.ts @@ -0,0 +1,53 @@ +import { CLISpec, Option, Command, Argument, Example } from '../src/types/spec.js'; + +const testSpec: CLISpec = { + name: 'test-cli', + version: '1.0.0', + description: 'A test CLI tool', + author: 'Test Author', + commands: [ + { + name: 'start', + description: 'Start the service', + options: [ + { + name: 'port', + short: 'p', + description: 'Port number', + type: 'number', + default: 8080, + }, + ], + arguments: [ + { + name: 'service', + description: 'Service name', + required: true, + }, + ], + }, + { + name: 'stop', + description: 'Stop the service', + options: [ + { + name: 'force', + description: 'Force stop', + type: 'boolean', + default: false, + }, + ], + }, + ], + globalOptions: [ + { + name: 'verbose', + short: 'v', + description: 'Enable verbose output', + type: 'boolean', + default: false, + }, + ], +}; + +export { testSpec };