1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//! # Generator Module
//!
//! Generates comprehensive BATS (Bash Automated Testing System) test suites from CLI analysis.
//!
//! ## Test Categories
//!
//! The generator produces tests across 9 categories:
//!
//! - **Basic**: Help, version, exit codes
//! - **Help**: Help text validation and formatting
//! - **Security**: Injection attacks, path traversal, command injection
//! - **Path**: File/directory handling, special characters
//! - **InputValidation**: Invalid inputs, boundary conditions
//! - **DestructiveOps**: Operations requiring confirmation
//! - **DirectoryTraversal**: Path traversal prevention
//! - **Performance**: Response time validation
//! - **MultiShell**: Cross-shell compatibility (bash, zsh, fish)
//!
//! ## Example Usage
//!
//! ```no_run
//! use cli_testing_specialist::analyzer::CliParser;
//! use cli_testing_specialist::generator::TestGenerator;
//! use cli_testing_specialist::types::TestCategory;
//! use std::path::Path;
//!
//! let parser = CliParser::new();
//! let analysis = parser.analyze(Path::new("/usr/bin/curl"))?;
//!
//! let generator = TestGenerator::new(
//! analysis,
//! vec![TestCategory::Basic, TestCategory::Security]
//! );
//! let tests = generator.generate()?;
//!
//! println!("Generated {} tests", tests.len());
//! # Ok::<(), cli_testing_specialist::error::CliTestError>(())
//! ```
//!
//! ## Performance
//!
//! - **Sequential**: 50-100ms for 50 tests
//! - **Parallel**: 20-40ms for 50 tests (2-3x faster)
//!
//! ## Template System
//!
//! Uses embedded templates with variable substitution:
//! - `{{binary_name}}`: Target CLI tool name
//! - `{{command}}`: Test command to execute
//! - `{{expected_output}}`: Expected output pattern
//!
//! Templates are validated at compile time for correctness.
// Re-export commonly used types
pub use AssertCmdGenerator;
pub use BatsWriter;
pub use TemplateEngine;
pub use TestGenerator;
pub use TestGenerator as TestGeneratorTrait;
// test_level_parallel module contains helper functions for future use
// Currently used directly in test_generator.rs via rayon::par_iter()