diff options
author | Marius Kintel <marius@kintel.net> | 2012-01-14 02:25:09 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2012-01-14 02:25:09 (GMT) |
commit | 10701f71581bd4053ab328254d6abacd6956b498 (patch) | |
tree | 235e93f614c1d2d15d9e6b445a632af5d2f3d2c4 /testdata/scad/features | |
parent | 26c9514b70cee4d49ea5441c50dabbda2631e9fa (diff) |
Added absolute path tests to include and use tests, fixed bug using absolute paths in use and include
Diffstat (limited to 'testdata/scad/features')
-rw-r--r-- | testdata/scad/features/include test6.scad | 7 | ||||
-rw-r--r-- | testdata/scad/features/include-test5.scad | 4 | ||||
-rw-r--r-- | testdata/scad/features/include-tests.scad | 40 | ||||
-rw-r--r-- | testdata/scad/features/sub1/sub2/sub3/include-test4.scad | 4 | ||||
-rw-r--r-- | testdata/scad/features/sub1/sub2/sub3/sub4/include-test2.scad | 12 | ||||
-rw-r--r-- | testdata/scad/features/sub1/sub2/sub3/sub4/include-test3.scad | 4 | ||||
-rw-r--r-- | testdata/scad/features/sub1/sub2/sub3/sub4/use-test2.scad | 14 | ||||
-rw-r--r-- | testdata/scad/features/sub1/sub2/sub3/sub4/use-test3.scad | 4 | ||||
-rw-r--r-- | testdata/scad/features/sub1/sub2/sub3/use-test4.scad | 4 | ||||
-rw-r--r-- | testdata/scad/features/use test6.scad | 7 | ||||
-rw-r--r-- | testdata/scad/features/use-test5.scad | 4 | ||||
-rw-r--r-- | testdata/scad/features/use-tests.scad | 39 |
12 files changed, 0 insertions, 143 deletions
diff --git a/testdata/scad/features/include test6.scad b/testdata/scad/features/include test6.scad deleted file mode 100644 index 0d96b26..0000000 --- a/testdata/scad/features/include test6.scad +++ /dev/null @@ -1,7 +0,0 @@ -module test6() -{ - difference() { - cube(center=true); - cylinder(r=0.4, h=2, center=true); - } -} diff --git a/testdata/scad/features/include-test5.scad b/testdata/scad/features/include-test5.scad deleted file mode 100644 index e4393cb..0000000 --- a/testdata/scad/features/include-test5.scad +++ /dev/null @@ -1,4 +0,0 @@ -module test5() -{ - sphere(r=0.5, $fn=8); -} diff --git a/testdata/scad/features/include-tests.scad b/testdata/scad/features/include-tests.scad deleted file mode 100644 index fc4e9d0..0000000 --- a/testdata/scad/features/include-tests.scad +++ /dev/null @@ -1,40 +0,0 @@ -//Test that the entire path is pushed onto the stack upto the last '/' -include <sub1/sub2/sub3/sub4/include-test2.scad> - -//Test that a non existent path/file doesn't screw things up -include <non/existent/path/non-file> - -//Test with empty path -include <include-test5.scad> - -//Test without preceding space -include<include-test5.scad> - -//Test with other strange character that is allowed -include>>>>><include-test5.scad> - -//Test that filenames with spaces work -include <include test6.scad> - -//Test with empty file -include<test/> - -//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(test2_variable, $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 deleted file mode 100644 index c13368c..0000000 --- a/testdata/scad/features/sub1/sub2/sub3/include-test4.scad +++ /dev/null @@ -1,4 +0,0 @@ -module test4() -{ - 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 deleted file mode 100644 index c34632c..0000000 --- a/testdata/scad/features/sub1/sub2/sub3/sub4/include-test2.scad +++ /dev/null @@ -1,12 +0,0 @@ -//Test nested include -include <include-test3.scad> - -//Test relative file location -include <../include-test4.scad> - -test2_variable = 0.7; - -module test2() -{ - 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 deleted file mode 100644 index 6e3537e..0000000 --- a/testdata/scad/features/sub1/sub2/sub3/sub4/include-test3.scad +++ /dev/null @@ -1,4 +0,0 @@ -module test3() -{ - cylinder(r1=0.7, r2=0.2, center=true); -} diff --git a/testdata/scad/features/sub1/sub2/sub3/sub4/use-test2.scad b/testdata/scad/features/sub1/sub2/sub3/sub4/use-test2.scad deleted file mode 100644 index 68013db..0000000 --- a/testdata/scad/features/sub1/sub2/sub3/sub4/use-test2.scad +++ /dev/null @@ -1,14 +0,0 @@ -//Test nested use -use <use-test3.scad> - -//Test relative file location -use <../use-test4.scad> - -test2_variable = 0.7; - -module test2() -{ - translate([2,0,0]) test3(); - translate([2,-2,0]) test4(); - cube(center=true); -} diff --git a/testdata/scad/features/sub1/sub2/sub3/sub4/use-test3.scad b/testdata/scad/features/sub1/sub2/sub3/sub4/use-test3.scad deleted file mode 100644 index 6e3537e..0000000 --- a/testdata/scad/features/sub1/sub2/sub3/sub4/use-test3.scad +++ /dev/null @@ -1,4 +0,0 @@ -module test3() -{ - cylinder(r1=0.7, r2=0.2, center=true); -} diff --git a/testdata/scad/features/sub1/sub2/sub3/use-test4.scad b/testdata/scad/features/sub1/sub2/sub3/use-test4.scad deleted file mode 100644 index c13368c..0000000 --- a/testdata/scad/features/sub1/sub2/sub3/use-test4.scad +++ /dev/null @@ -1,4 +0,0 @@ -module test4() -{ - cylinder(r=0.5, $fn=10, center=true); -} diff --git a/testdata/scad/features/use test6.scad b/testdata/scad/features/use test6.scad deleted file mode 100644 index 0d96b26..0000000 --- a/testdata/scad/features/use test6.scad +++ /dev/null @@ -1,7 +0,0 @@ -module test6() -{ - difference() { - cube(center=true); - cylinder(r=0.4, h=2, center=true); - } -} diff --git a/testdata/scad/features/use-test5.scad b/testdata/scad/features/use-test5.scad deleted file mode 100644 index e4393cb..0000000 --- a/testdata/scad/features/use-test5.scad +++ /dev/null @@ -1,4 +0,0 @@ -module test5() -{ - sphere(r=0.5, $fn=8); -} diff --git a/testdata/scad/features/use-tests.scad b/testdata/scad/features/use-tests.scad deleted file mode 100644 index 64af692..0000000 --- a/testdata/scad/features/use-tests.scad +++ /dev/null @@ -1,39 +0,0 @@ -//Test that the entire path is pushed onto the stack upto the last '/' -use <sub1/sub2/sub3/sub4/use-test2.scad> - -//Test that a non existent path/file doesn't screw things up -use <non/existent/path/non-file> - -//Test with empty path -use <use-test5.scad> - -//Test without preceding space -use<use-test5.scad> - -//Test with other strange character that is allowed -use>>>>><use-test5.scad> - -//Test that filenames with spaces work -use <use test6.scad> - -//Test with empty file -use<test/> - -//Test with empty path and file -use </> - -module test1() -{ - test2(); - // test3() and test4() are not directly included and thus not imported into - // this scope - translate([4,0,0]) test3(); - translate([4,-2,0]) test4(); - translate([-2,0,0]) test5(); - translate([-2,-2,0]) test6(); - - // test2_variable won't be visible - translate([0,-2,0]) sphere(test2_variable, $fn=16); -} - -test1(); |