summaryrefslogtreecommitdiff
path: root/testdata/scad/features/use-tests.scad
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2012-01-04 22:07:32 (GMT)
committerMarius Kintel <marius@kintel.net>2012-01-04 22:07:32 (GMT)
commitfdce8d15fc4a927d1a6a257783dde5054d9f3e7b (patch)
tree6a779b50ef65474af9c539ad7d42268f7e760ae8 /testdata/scad/features/use-tests.scad
parentcbabbaed700536b3a1f513fd5a07d25382cb137f (diff)
parentba8aa515d14cf270c9d0fdf50b4c7c55b3c416a8 (diff)
Merge branch 'master' into boost_filesystem
Conflicts: boost.pri src/lexer.l tests/CMakeLists.txt
Diffstat (limited to 'testdata/scad/features/use-tests.scad')
-rw-r--r--testdata/scad/features/use-tests.scad39
1 files changed, 39 insertions, 0 deletions
diff --git a/testdata/scad/features/use-tests.scad b/testdata/scad/features/use-tests.scad
new file mode 100644
index 0000000..64af692
--- /dev/null
+++ b/testdata/scad/features/use-tests.scad
@@ -0,0 +1,39 @@
+//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();
contact: Jan Huwald // Impressum