diff options
Diffstat (limited to 'awk/rawk/scratch/tests_old/README.md')
-rw-r--r-- | awk/rawk/scratch/tests_old/README.md | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/awk/rawk/scratch/tests_old/README.md b/awk/rawk/scratch/tests_old/README.md new file mode 100644 index 0000000..e33a781 --- /dev/null +++ b/awk/rawk/scratch/tests_old/README.md @@ -0,0 +1,74 @@ +# rawk Test Suite + +This directory contains the comprehensive test suite for the rawk language, organized by category. + +## Directory Structure + +### `core/` - Core Language Features +Tests for fundamental language features like function definitions, calls, recursion, and edge cases. + +### `real_world/` - Real-World Examples +Practical examples that demonstrate rawk's utility for common data processing tasks. + +### `stdlib/` - Standard Library Tests +Tests for the built-in standard library functions. + +### `data/` - Test Data Files +Sample data files used by the real-world examples. + +## Running Tests + +### Run All Core Tests +```bash +# Run the comprehensive test suite +awk -f ../rawk.awk core/test_suite.rawk | awk -f - + +# Run individual core tests +awk -f ../rawk.awk core/test_basic.rawk | awk -f - +awk -f ../rawk.awk core/test_multiline.rawk | awk -f - +awk -f ../rawk.awk core/test_recursive.rawk | awk -f - +``` + +### Run Real-World Examples +```bash +# System monitoring +awk -f ../rawk.awk real_world/test_system_monitor.rawk | awk -f - data/test_data.txt + +# Log parsing +awk -f ../rawk.awk real_world/test_log_parser.rawk | awk -f - data/test_logs.txt + +# CSV processing +awk -f ../rawk.awk real_world/test_csv_processor.rawk | awk -f - data/test_employees.csv +``` + +### Run Standard Library Tests +```bash +awk -f ../rawk.awk stdlib/test_stdlib_simple.rawk | awk -f - +``` + +## Test Categories + +### Core Language Tests +- **test_suite.rawk**: Comprehensive test suite with 15+ test cases +- **test_basic.rawk**: Basic function definitions and calls +- **test_multiline.rawk**: Multi-line function definitions +- **test_edge_cases.rawk**: Edge cases and error conditions +- **test_recursive.rawk**: Recursive function support +- **test_array_fix.rawk**: Array handling and utilities +- **test_failure.rawk**: Demonstrates failing assertions + +### Real-World Examples +- **test_system_monitor.rawk**: System monitoring (df, ps, ls output) +- **test_log_parser.rawk**: Log parsing (Apache, syslog) +- **test_csv_processor.rawk**: CSV data processing with validation +- **test_data_processing.rawk**: General data processing scenarios +- **test_mixed.rawk**: Mixed awk and rawk code + +### Standard Library Tests +- **test_stdlib_simple.rawk**: Tests for built-in functions + +### Test Data +- **test_data.txt**: Simulated system command outputs +- **test_logs.txt**: Sample Apache and syslog entries +- **test_employees.csv**: Sample employee data +- **test_input.txt**: Simple input data for mixed tests \ No newline at end of file |