//! Common test utilities shared across colorizer tests
use colorize_regex;
use GrcatConfigEntry;
use Cursor;
/// Helper function to run colorize_regex and return the output as a String
///
/// # Arguments
/// * `input` - The input text to colorize
/// * `rules` - Vector of GrcatConfigEntry rules to apply
///
/// # Returns
/// The colorized output as a UTF-8 string
/// Helper function to strip ANSI escape codes from a string
///
/// Removes all ANSI CSI sequences (like `\x1b[...m`) for clean text comparison
///
/// # Arguments
/// * `s` - The string containing ANSI escape codes
///
/// # Returns
/// The string with all ANSI codes removed
// (helper for creating rules with count removed - use explicit construction in tests)