-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_features.sh
More file actions
47 lines (42 loc) · 1.21 KB
/
Copy pathtest_features.sh
File metadata and controls
47 lines (42 loc) · 1.21 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
#!/bin/bash
echo "🧪 Testing CGM Viewer Features..."
echo ""
# Test 1: SVG Conversion
echo "1. Testing SVG conversion..."
python3 cgm_to_svg.py OWL1.CGM test_owl1.svg 800 600
if [ -f test_owl1.svg ]; then
echo " ✓ SVG file created: $(ls -lh test_owl1.svg | awk '{print $5}')"
else
echo " ✗ Failed to create SVG"
exit 1
fi
# Test 2: Verify SVG content
echo "2. Verifying SVG content..."
if grep -q "<svg xmlns" test_owl1.svg; then
echo " ✓ Valid SVG header found"
else
echo " ✗ Invalid SVG format"
exit 1
fi
# Test 3: Check syntax of viewer
echo "3. Checking viewer syntax..."
python3 -m py_compile cgm_viewer_ok.py
if [ $? -eq 0 ]; then
echo " ✓ Viewer syntax valid"
else
echo " ✗ Syntax errors in viewer"
exit 1
fi
# Test 4: Check imports
echo "4. Testing imports..."
python3 -c "from cgm_to_svg import convert_cgm_to_svg; print(' ✓ SVG converter imports OK')"
python3 -c "from cgm_svg_renderer import CGMSVGRenderer; print(' ✓ SVG renderer imports OK')"
echo ""
echo "✅ All tests passed!"
echo ""
echo "📋 Summary:"
echo " - SVG export: Working"
echo " - Viewer syntax: Valid"
echo " - Imports: All OK"
echo ""
echo "🎉 Your CGM viewer is ready to use!"