MovieMapper/tests/legacy/test-command-line.js
Jarian Cottingham 2ce7ab14c9 chore: reorganize repo layout, remove dead files
- Move phase/plan docs into docs/
- Move legacy node:test files into tests/legacy/ with README
- Remove .backup file, test audit artifacts, and unused AI prompt/skill files
- Remove broken iOS GitHub workflows (reference missing MovieMapper-iOS/)
2026-08-20 20:11:57 +00:00

26 lines
919 B
JavaScript

// Test script to verify command-line parameter parsing
console.log('Testing command-line parameter parsing...');
// Simulate command line arguments like: npm start -- --dir=/path/to/directory
const testArgs = process.argv.slice(2);
console.log('Command line arguments:', testArgs);
// Check for directory parameter
const commandLineDirectory = testArgs.find(arg => arg.startsWith('--dir=') || arg.startsWith('-d='))?.split('=')[1];
console.log('Parsed directory from command line:', commandLineDirectory);
// Test with various formats
const testCases = [
'--dir=/test/path',
'-d=/test/path',
'--dir=/another/path',
'normal-argument',
'--other=option'
];
testCases.forEach(arg => {
const dir = testArgs.find(a => a.startsWith('--dir=') || a.startsWith('-d='))?.split('=')[1];
console.log(`Argument: ${arg} -> Directory: ${dir || 'Not found'}`);
});
console.log('Command-line parsing test complete.');