-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquick_test.sh
More file actions
executable file
·103 lines (85 loc) · 2.5 KB
/
quick_test.sh
File metadata and controls
executable file
·103 lines (85 loc) · 2.5 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#!/bin/bash
# Quick test to verify production readiness fixes
set -e
EIDOS_DIR="/home/cutalion/code/one-review-man/eidos"
WORLD_BIN="$EIDOS_DIR/bin/world"
TEST_DIR="/tmp/quick_test_$$"
echo "Quick Production Readiness Test"
echo "=================================="
# Create test directory
mkdir -p "$TEST_DIR"
cd "$TEST_DIR"
echo ""
echo "1. Testing world initialization..."
# Test world initialization with intelligent defaults
echo -e "Fantasy Quest\nWizard Author\nA magical adventure with dragons and spells\nen\nen" | ruby "$WORLD_BIN" new --world-dir fantasy-world --quick
if [[ $? -eq 0 ]]; then
echo "World initialization: PASSED"
else
echo "World initialization: FAILED"
exit 1
fi
echo ""
echo "2. Testing world status command..."
cd fantasy-world
ruby "$WORLD_BIN" status
if [[ $? -eq 0 ]]; then
echo "World status command: PASSED"
else
echo "World status command: FAILED"
exit 1
fi
echo ""
echo "3. Testing chapter generation readiness..."
# Check if metadata is properly structured
if grep -q "genre: fantasy" data/world_config.yml &&
grep -q "humor_style: adventurous" data/world_config.yml &&
grep -q "setting: magical realm" data/world_config.yml; then
echo "Intelligent defaults: PASSED"
echo " - Genre correctly inferred as 'fantasy' (from 'magical', 'dragons')"
echo " - Style correctly inferred as 'adventurous' (from 'adventure')"
echo " - Setting correctly inferred as 'magical realm' (from 'magical')"
else
echo "Intelligent defaults: FAILED"
echo "Checking metadata content:"
cat data/world_config.yml
exit 1
fi
echo ""
echo "4. Testing required files creation..."
required_files=(
"data/world_config.yml"
"data/world_state.yml"
"data/strings.yml"
"data/characters.yml"
"data/generation_log.yml"
)
all_files_exist=true
for file in "${required_files[@]}"; do
if [[ -f "$file" ]]; then
echo "$file exists"
else
echo "$file missing"
all_files_exist=false
fi
done
if [[ "$all_files_exist" == true ]]; then
echo "Required files: PASSED"
else
echo "Required files: FAILED"
exit 1
fi
echo ""
echo "PRODUCTION READINESS TEST SUMMARY"
echo "===================================="
echo "Enhanced initialization with intelligent defaults"
echo "Complete metadata structure creation"
echo "World status reporting"
echo "All required files generated"
echo ""
echo "System appears PRODUCTION READY for basic workflow!"
# Cleanup
cd /
rm -rf "$TEST_DIR"
echo ""
echo "Test completed successfully!"