From fab0f891b79c0c2cbc91120f7648af8a96c6669d Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Thu, 8 Sep 2011 02:31:27 +0200 Subject: Updated the include tests to provide geometry diff --git a/testdata/scad/features/include test6.scad b/testdata/scad/features/include test6.scad index 7a79456..0d96b26 100644 --- a/testdata/scad/features/include test6.scad +++ b/testdata/scad/features/include test6.scad @@ -1,4 +1,7 @@ module test6() { - echo("included from include test6.scad"); + difference() { + cube(center=true); + cylinder(r=0.4, h=2, center=true); + } } diff --git a/testdata/scad/features/include-test.scad b/testdata/scad/features/include-test.scad deleted file mode 100644 index 5db02d7..0000000 --- a/testdata/scad/features/include-test.scad +++ /dev/null @@ -1,40 +0,0 @@ -//Test that the entire path is pushed onto the stack upto the last '/' -include - -//Test that a non existent path/file doesn't screw things up -include - -//Test with empty path -include - -//Test without preceeding space -include - -//Test with other strange character that is allowed -include>>>>> - -//Test that filenames with spaces work -include - -//Test with empty file -include - -//Test with empty path and file -include - -//Test with empty -include <> - -module test1() -{ - test2(); - test3(); - test4(); - test5(); - test6(); - - //Just to give a top level object - sphere(1); -} - -test1(); diff --git a/testdata/scad/features/include-test5.scad b/testdata/scad/features/include-test5.scad index 4f6e656..e4393cb 100644 --- a/testdata/scad/features/include-test5.scad +++ b/testdata/scad/features/include-test5.scad @@ -1,4 +1,4 @@ module test5() { - echo("included from include-test5.scad"); + sphere(r=0.5, $fn=8); } diff --git a/testdata/scad/features/include-tests.scad b/testdata/scad/features/include-tests.scad new file mode 100644 index 0000000..36c04ca --- /dev/null +++ b/testdata/scad/features/include-tests.scad @@ -0,0 +1,40 @@ +//Test that the entire path is pushed onto the stack upto the last '/' +include + +//Test that a non existent path/file doesn't screw things up +include + +//Test with empty path +include + +//Test without preceeding space +include + +//Test with other strange character that is allowed +include>>>>> + +//Test that filenames with spaces work +include + +//Test with empty file +include + +//Test with empty path and file +include + +//Test with empty +include <> + +module test1() +{ + test2(); + translate([2,0,0]) test3(); + translate([2,-2,0]) test4(); + translate([-2,0,0]) test5(); + translate([-2,-2,0]) test6(); + + //Just to give a top level object + translate([0,-2,0]) sphere(0.7, $fn=16); +} + +test1(); diff --git a/testdata/scad/features/sub1/sub2/sub3/include-test4.scad b/testdata/scad/features/sub1/sub2/sub3/include-test4.scad index 1cb7eab..c13368c 100644 --- a/testdata/scad/features/sub1/sub2/sub3/include-test4.scad +++ b/testdata/scad/features/sub1/sub2/sub3/include-test4.scad @@ -1,4 +1,4 @@ module test4() { - echo("included from include-test4.scad"); + cylinder(r=0.5, $fn=10, center=true); } diff --git a/testdata/scad/features/sub1/sub2/sub3/sub4/include-test2.scad b/testdata/scad/features/sub1/sub2/sub3/sub4/include-test2.scad index 9f4c963..140c4ed 100644 --- a/testdata/scad/features/sub1/sub2/sub3/sub4/include-test2.scad +++ b/testdata/scad/features/sub1/sub2/sub3/sub4/include-test2.scad @@ -6,5 +6,5 @@ include <../include-test4.scad> module test2 () { - echo("included from include-test2.scad"); + cube(center=true); } diff --git a/testdata/scad/features/sub1/sub2/sub3/sub4/include-test3.scad b/testdata/scad/features/sub1/sub2/sub3/sub4/include-test3.scad index 2f67e93..6e3537e 100644 --- a/testdata/scad/features/sub1/sub2/sub3/sub4/include-test3.scad +++ b/testdata/scad/features/sub1/sub2/sub3/sub4/include-test3.scad @@ -1,4 +1,4 @@ module test3() { - echo("included from include-test3.scad"); + cylinder(r1=0.7, r2=0.2, center=true); } -- cgit v0.10.1