summaryrefslogtreecommitdiff
path: root/testdata
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2010-12-25 23:12:34 (GMT)
committerMarius Kintel <marius@kintel.net>2010-12-25 23:12:34 (GMT)
commitd0d266b83e777006a7badfd5cccb3980a3c31dd1 (patch)
treeda0728902ed0be74c2328872fca74311734a9095 /testdata
parent1bc4fe5d4d7d12e9d1777221780c2ad6551aa9b0 (diff)
parent592ca6abadcb6443629be4407b973279a891278c (diff)
merged with master
Diffstat (limited to 'testdata')
-rw-r--r--testdata/scad/include test6.scad4
-rw-r--r--testdata/scad/include-test.scad40
-rw-r--r--testdata/scad/include-test5.scad4
-rw-r--r--testdata/scad/string-test.scad1
-rw-r--r--testdata/scad/sub1/sub2/sub3/include-test4.scad4
-rw-r--r--testdata/scad/sub1/sub2/sub3/sub4/include-test2.scad10
-rw-r--r--testdata/scad/sub1/sub2/sub3/sub4/include-test3.scad4
7 files changed, 67 insertions, 0 deletions
diff --git a/testdata/scad/include test6.scad b/testdata/scad/include test6.scad
new file mode 100644
index 0000000..7a79456
--- /dev/null
+++ b/testdata/scad/include test6.scad
@@ -0,0 +1,4 @@
+module test6()
+{
+ echo("included from include test6.scad");
+}
diff --git a/testdata/scad/include-test.scad b/testdata/scad/include-test.scad
new file mode 100644
index 0000000..5db02d7
--- /dev/null
+++ b/testdata/scad/include-test.scad
@@ -0,0 +1,40 @@
+//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 preceeding 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();
+ test3();
+ test4();
+ test5();
+ test6();
+
+ //Just to give a top level object
+ sphere(1);
+}
+
+test1();
diff --git a/testdata/scad/include-test5.scad b/testdata/scad/include-test5.scad
new file mode 100644
index 0000000..4f6e656
--- /dev/null
+++ b/testdata/scad/include-test5.scad
@@ -0,0 +1,4 @@
+module test5()
+{
+ echo("included from include-test5.scad");
+}
diff --git a/testdata/scad/string-test.scad b/testdata/scad/string-test.scad
new file mode 100644
index 0000000..5ec4cfb
--- /dev/null
+++ b/testdata/scad/string-test.scad
@@ -0,0 +1 @@
+echo("The quick brown fox \tjumps \"over\" the lazy dog.\rThe quick brown fox.\nThe \\lazy\\ dog.");
diff --git a/testdata/scad/sub1/sub2/sub3/include-test4.scad b/testdata/scad/sub1/sub2/sub3/include-test4.scad
new file mode 100644
index 0000000..1cb7eab
--- /dev/null
+++ b/testdata/scad/sub1/sub2/sub3/include-test4.scad
@@ -0,0 +1,4 @@
+module test4()
+{
+ echo("included from include-test4.scad");
+}
diff --git a/testdata/scad/sub1/sub2/sub3/sub4/include-test2.scad b/testdata/scad/sub1/sub2/sub3/sub4/include-test2.scad
new file mode 100644
index 0000000..9f4c963
--- /dev/null
+++ b/testdata/scad/sub1/sub2/sub3/sub4/include-test2.scad
@@ -0,0 +1,10 @@
+//Test nested include
+include <include-test3.scad>
+
+//Test relative file location
+include <../include-test4.scad>
+
+module test2 ()
+{
+ echo("included from include-test2.scad");
+}
diff --git a/testdata/scad/sub1/sub2/sub3/sub4/include-test3.scad b/testdata/scad/sub1/sub2/sub3/sub4/include-test3.scad
new file mode 100644
index 0000000..2f67e93
--- /dev/null
+++ b/testdata/scad/sub1/sub2/sub3/sub4/include-test3.scad
@@ -0,0 +1,4 @@
+module test3()
+{
+ echo("included from include-test3.scad");
+}
contact: Jan Huwald // Impressum