summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTim Foley <tfoleyNV@users.noreply.github.com>2017-06-27 14:43:53 -0700
committerGitHub <noreply@github.com>2017-06-27 14:43:53 -0700
commitafe41a6c994a684cd646b4432a285ef959d0716b (patch)
tree4f3f1e8b03a1ea3a515c955d3b7e5f6a6b6283f0 /tests
parent97f253189af41f117e2de17093904cbb45202d46 (diff)
parent9eee1175d9c3089ba53ebed12171bf57a40e80e3 (diff)
Merge pull request #47 from tfoleyNV/import-subdir
Allow "dotted" import paths
Diffstat (limited to 'tests')
-rw-r--r--tests/front-end/import-subdir.slang7
-rw-r--r--tests/front-end/subdir/import-subdir-a.slang5
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/front-end/import-subdir.slang b/tests/front-end/import-subdir.slang
new file mode 100644
index 000000000..0d3931a82
--- /dev/null
+++ b/tests/front-end/import-subdir.slang
@@ -0,0 +1,7 @@
+//TEST:SIMPLE:
+
+// Confirming that we can use "dot notation" to import via a subdirectory
+
+__import subdir.import_subdir_a;
+
+float bar(float x) { return foo(x); } \ No newline at end of file
diff --git a/tests/front-end/subdir/import-subdir-a.slang b/tests/front-end/subdir/import-subdir-a.slang
new file mode 100644
index 000000000..3962d4662
--- /dev/null
+++ b/tests/front-end/subdir/import-subdir-a.slang
@@ -0,0 +1,5 @@
+//TEST_IGNORE_FILE:
+
+// This is the imported code.
+
+float foo(float x) { return x; } \ No newline at end of file