-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-examples.sh
More file actions
executable file
·74 lines (63 loc) · 1.69 KB
/
test-examples.sh
File metadata and controls
executable file
·74 lines (63 loc) · 1.69 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
#!/bin/bash
# Test script for simple module examples
# Verifies that all examples compile successfully
set -e # Exit on any error
echo "🧪 Testing Simple Module Examples"
echo "================================"
# Change to examples directory
cd "$(dirname "$0")"
echo ""
echo "📁 Current directory: $(pwd)"
echo "📋 Files present:"
ls -la
echo ""
echo "🔨 Compiling all examples..."
# Test individual compilations first
echo ""
echo "1️⃣ Compiling BasicModule..."
if haxe BasicModule.hxml; then
echo "✅ BasicModule compilation successful"
else
echo "❌ BasicModule compilation failed"
exit 1
fi
echo ""
echo "2️⃣ Compiling MathHelper..."
if haxe MathHelper.hxml; then
echo "✅ MathHelper compilation successful"
else
echo "❌ MathHelper compilation failed"
exit 1
fi
echo ""
echo "3️⃣ Compiling UserUtil..."
if haxe UserUtil.hxml; then
echo "✅ UserUtil compilation successful"
else
echo "❌ UserUtil compilation failed"
exit 1
fi
echo ""
echo "🎯 Testing batch compilation..."
if haxe compile-all.hxml; then
echo "✅ Batch compilation successful"
else
echo "❌ Batch compilation failed"
exit 1
fi
echo ""
echo "📂 Checking output files..."
if [ -d "output" ]; then
echo "Output directory exists:"
ls -la output/
else
echo "⚠️ No output directory found (expected for --no-output flag)"
fi
echo ""
echo "🎉 All simple module examples compiled successfully!"
echo ""
echo "💡 Next steps:"
echo " • Review the generated output (if any)"
echo " • Compare with expected/ directory"
echo " • Try modifying the examples and recompiling"
echo " • Move on to ../02-mix-project/ for more advanced examples"