diff options
Diffstat (limited to 'js/scripting-lang/run_tests.sh')
-rwxr-xr-x | js/scripting-lang/run_tests.sh | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/js/scripting-lang/run_tests.sh b/js/scripting-lang/run_tests.sh index 7841c15..994f915 100755 --- a/js/scripting-lang/run_tests.sh +++ b/js/scripting-lang/run_tests.sh @@ -22,11 +22,15 @@ run_test() { # Capture both stdout and stderr, and get the exit code local output local exit_code - output=$(node lang.js "$test_file" 2>&1) + output=$(DEBUG="$DEBUG" node lang.js "$test_file" 2>&1) exit_code=$? if [ $exit_code -eq 0 ]; then echo -e "${GREEN}PASS${NC}" + # Show debug output if DEBUG is set + if [ -n "$DEBUG" ]; then + echo "$output" + fi return 0 else echo -e "${RED}FAIL${NC}" @@ -41,7 +45,7 @@ run_test_with_output() { local test_name=$2 echo -e "${YELLOW}=== $test_name ===${NC}" - node lang.js "$test_file" + DEBUG="$DEBUG" node lang.js "$test_file" echo "" } @@ -70,8 +74,13 @@ unit_tests=( "tests/13_standard_library_complete.txt:Complete Standard Library" "tests/14_error_handling.txt:Error Handling" "tests/15_performance_stress.txt:Performance and Stress" - "tests/16_advanced_functional.txt:Advanced Functional Programming" - "tests/17_real_world_scenarios.txt:Real-World Scenarios" + "tests/16_function_composition.txt:Advanced Functional Programming" + "tests/17_table_enhancements.txt:Table Enhancements" + "tests/18_each_combinator.txt:Each Combinator" + "tests/19_embedded_functions.txt:Embedded Functions" + "tests/20_via_operator.txt:Via Operator" + "tests/21_enhanced_case_statements.txt:Enhanced Case Statements" + "tests/22_parser_limitations.txt:Parser Limitations" ) for test in "${unit_tests[@]}"; do @@ -94,6 +103,7 @@ integration_tests=( "tests/integration_01_basic_features.txt:Basic Features Integration" "tests/integration_02_pattern_matching.txt:Pattern Matching Integration" "tests/integration_03_functional_programming.txt:Functional Programming Integration" + "tests/integration_04_mini_case_multi_param.txt:Multi-parameter case expression at top level" ) for test in "${integration_tests[@]}"; do |