From 6b66e9f0338509747ba4bf12438ff9f1ce0873e9 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sat, 25 May 2013 18:30:55 -0400 Subject: Added test cases for #364 diff --git a/testdata/modulecache-tests/README.txt b/testdata/modulecache-tests/README.txt index 277cff8..eb3bac0 100644 --- a/testdata/modulecache-tests/README.txt +++ b/testdata/modulecache-tests/README.txt @@ -72,10 +72,29 @@ o Compile (F5) - Verify that you get a circular disc o Edit radius.scad: Change RADIUS o Compile (F5) - Verify that the disc changed size -Test9: Circular include +Test10: Circular include ------ o Open circularincludemain.scad o Compile (F5) o Verify that OpenSCAD won't hang or crash +Test11: Missing include file appears +------ +o rm missing.scad +o Open includemissing.scad +o Compile (F5) +o Verify that you get: WARNING: Can't open 'use' file 'missing.scad'. +o echo "module missing() { sphere(10); }" > missing.scad +o rm missing.scad +o Reload and Compile (F4) - verify that the sphere is gone + +Test12: Missing include file in subpath appears +------ +o rm subdir/missingsub.scad +o Open includemissingsub.scad +o Compile (F5) +o Verify that you get: WARNING: Can't open 'use' file 'missingsub.scad'. +o echo "module missingsub() { sphere(10); }" > subdir/missingsub.scad +o rm subdir/missingsub.scad +o Reload and Compile (F4) - verify that the sphere is gone diff --git a/testdata/modulecache-tests/includemissing.scad b/testdata/modulecache-tests/includemissing.scad new file mode 100644 index 0000000..d8a165f --- /dev/null +++ b/testdata/modulecache-tests/includemissing.scad @@ -0,0 +1,2 @@ +include +missing(); diff --git a/testdata/modulecache-tests/includemissingsub.scad b/testdata/modulecache-tests/includemissingsub.scad new file mode 100644 index 0000000..50acffe --- /dev/null +++ b/testdata/modulecache-tests/includemissingsub.scad @@ -0,0 +1,2 @@ +include +missingsub(); -- cgit v0.10.1