summaryrefslogtreecommitdiff
path: root/dhall/tests/import/data
diff options
context:
space:
mode:
Diffstat (limited to 'dhall/tests/import/data')
-rw-r--r--dhall/tests/import/data/cycle.dhall1
-rw-r--r--dhall/tests/import/data/doesNotTypecheck.dhall1
-rw-r--r--dhall/tests/import/data/example.txt1
-rw-r--r--dhall/tests/import/data/fieldOrder/1.dhall1
-rw-r--r--dhall/tests/import/data/fieldOrder/2.dhall1
-rw-r--r--dhall/tests/import/data/importBoundary.dhall3
-rw-r--r--dhall/tests/import/data/nested.dhall1
-rw-r--r--dhall/tests/import/data/referentiallyOpaque.dhall18
-rw-r--r--dhall/tests/import/data/simple.dhall1
-rw-r--r--dhall/tests/import/data/simpleLocation.dhall1
10 files changed, 29 insertions, 0 deletions
diff --git a/dhall/tests/import/data/cycle.dhall b/dhall/tests/import/data/cycle.dhall
new file mode 100644
index 0000000..c370a8d
--- /dev/null
+++ b/dhall/tests/import/data/cycle.dhall
@@ -0,0 +1 @@
+../failure/cycle.dhall
diff --git a/dhall/tests/import/data/doesNotTypecheck.dhall b/dhall/tests/import/data/doesNotTypecheck.dhall
new file mode 100644
index 0000000..b748e2d
--- /dev/null
+++ b/dhall/tests/import/data/doesNotTypecheck.dhall
@@ -0,0 +1 @@
+0 0
diff --git a/dhall/tests/import/data/example.txt b/dhall/tests/import/data/example.txt
new file mode 100644
index 0000000..af5626b
--- /dev/null
+++ b/dhall/tests/import/data/example.txt
@@ -0,0 +1 @@
+Hello, world!
diff --git a/dhall/tests/import/data/fieldOrder/1.dhall b/dhall/tests/import/data/fieldOrder/1.dhall
new file mode 100644
index 0000000..797e071
--- /dev/null
+++ b/dhall/tests/import/data/fieldOrder/1.dhall
@@ -0,0 +1 @@
+{ foo = 1, bar = True }
diff --git a/dhall/tests/import/data/fieldOrder/2.dhall b/dhall/tests/import/data/fieldOrder/2.dhall
new file mode 100644
index 0000000..c16b568
--- /dev/null
+++ b/dhall/tests/import/data/fieldOrder/2.dhall
@@ -0,0 +1 @@
+{ bar = True, foo = 1 }
diff --git a/dhall/tests/import/data/importBoundary.dhall b/dhall/tests/import/data/importBoundary.dhall
new file mode 100644
index 0000000..e6f1074
--- /dev/null
+++ b/dhall/tests/import/data/importBoundary.dhall
@@ -0,0 +1,3 @@
+-- This file contains a free variable. This should be a type error, even if the variable
+-- is in scope in the importing expression
+x
diff --git a/dhall/tests/import/data/nested.dhall b/dhall/tests/import/data/nested.dhall
new file mode 100644
index 0000000..bf88f65
--- /dev/null
+++ b/dhall/tests/import/data/nested.dhall
@@ -0,0 +1 @@
+{ x = ./simple.dhall sha256:15f52ecf91c94c1baac02d5a4964b2ed8fa401641a2c8a95e8306ec7c1e3b8d2 }
diff --git a/dhall/tests/import/data/referentiallyOpaque.dhall b/dhall/tests/import/data/referentiallyOpaque.dhall
new file mode 100644
index 0000000..ff33765
--- /dev/null
+++ b/dhall/tests/import/data/referentiallyOpaque.dhall
@@ -0,0 +1,18 @@
+{- This is a "referentially opaque" import (i.e. an import that is not
+ globally addressable), which cannot be imported by a "referentially
+ transparent" import (i.e. an import that is globally addressable).
+
+ This test file is used in a failing test to verify that referentially
+ transparent imports cannot import referentially opaque imports. In the test
+ suite this file is actually imported via its GitHub URL (not its local file
+ path), so it plays the role of the referentially transparent import. Then,
+ this file attempts to import a referentially opaque import (an environment
+ variable in this case) to verify that the import fails.
+
+ For this test file we need to select a referentially opaque import that
+ would succeed if imported on its own, so that a non-compliant implementation
+ doesn't fail this test for the wrong reason (i.e. due to the import not
+ being present). We thus use the `DHALL_TEST_VAR` environment variable, that
+ is expected to be set when running import tests.
+-}
+env:DHALL_TEST_VAR as Text
diff --git a/dhall/tests/import/data/simple.dhall b/dhall/tests/import/data/simple.dhall
new file mode 100644
index 0000000..00750ed
--- /dev/null
+++ b/dhall/tests/import/data/simple.dhall
@@ -0,0 +1 @@
+3
diff --git a/dhall/tests/import/data/simpleLocation.dhall b/dhall/tests/import/data/simpleLocation.dhall
new file mode 100644
index 0000000..1d3e43b
--- /dev/null
+++ b/dhall/tests/import/data/simpleLocation.dhall
@@ -0,0 +1 @@
+./simple.dhall as Location