#!/bin/bash
# CHECK: verify word_counter.py works correctly
cd /root/troupe-standup/wizard-work/spark
python3 << 'EOF'
import sys
sys.path.insert(0, '/root/troupe-standup/wizard-work/spark')
from word_counter import count_words

# Test that the word counter works
result = count_words("Hello world test")
assert result == 3, f"Expected 3, got {result}"

result2 = count_words("")
assert result2 == 0, f"Expected 0, got {result2}"

result3 = count_words("a b c d e")
assert result3 == 5, f"Expected 5, got {result3}"

print("All tests passed!")
sys.exit(0)
EOF
exit $?