diff options
Diffstat (limited to '')
-rw-r--r-- | dhall/tests/import/data/simple.dhall | 1 | ||||
-rw-r--r-- | dhall/tests/import/failure/alternativeEnv.txt | 7 | ||||
-rw-r--r-- | dhall/tests/import/failure/alternativeEnvMissing.txt | 7 | ||||
-rw-r--r-- | dhall/tests/import/failure/cycle.txt | 17 | ||||
-rw-r--r-- | dhall/tests/import/failure/importBoundary.txt | 7 | ||||
-rw-r--r-- | dhall/tests/import/failure/missing.txt | 7 | ||||
-rw-r--r-- | dhall/tests/import/failure/referentiallyInsane.txt | 13 | ||||
-rw-r--r-- | dhall/tests/import/failure/unit/EnvUnset.txt | 7 | ||||
-rw-r--r-- | dhall/tests/import/failure/unit/EnvUnsetAsText.txt | 7 | ||||
-rw-r--r-- | dhall/tests/import/failure/unit/FileMissing.dhall | 1 | ||||
-rw-r--r-- | dhall/tests/import/failure/unit/FileMissing.txt | 6 | ||||
-rw-r--r-- | dhall/tests/import/failure/unit/HashMismatch2.dhall | 2 | ||||
-rw-r--r-- | dhall/tests/import/failure/unit/HashMismatch2.txt | 9 |
13 files changed, 83 insertions, 8 deletions
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/failure/alternativeEnv.txt b/dhall/tests/import/failure/alternativeEnv.txt index 482b68c..bb862c3 100644 --- a/dhall/tests/import/failure/alternativeEnv.txt +++ b/dhall/tests/import/failure/alternativeEnv.txt @@ -1 +1,6 @@ -MissingEnvVar +Type error: error: error + --> <current file>:1:45 + | +1 | env:UNSET1 as Text ? env:UNSET2 ? missing ? env:UNSET3 + | ^^^^^^^^^^ MissingEnvVar + | diff --git a/dhall/tests/import/failure/alternativeEnvMissing.txt b/dhall/tests/import/failure/alternativeEnvMissing.txt index 4666330..1f26462 100644 --- a/dhall/tests/import/failure/alternativeEnvMissing.txt +++ b/dhall/tests/import/failure/alternativeEnvMissing.txt @@ -1 +1,6 @@ -Missing +Type error: error: error + --> <current file>:1:13 + | +1 | env:UNSET ? missing + | ^^^^^^^ Missing + | diff --git a/dhall/tests/import/failure/cycle.txt b/dhall/tests/import/failure/cycle.txt index f5a1abf..899484b 100644 --- a/dhall/tests/import/failure/cycle.txt +++ b/dhall/tests/import/failure/cycle.txt @@ -1 +1,16 @@ -ImportCycle([Local("./dhall-lang/tests/import/data/cycle.dhall"), Local("./dhall-lang/tests/import/failure/cycle.dhall")], Local("./dhall-lang/tests/import/data/cycle.dhall")) +Type error: error: error + --> <current file>:1:1 + | +1 | ../data/cycle.dhall + | ^^^^^^^^^^^^^^^^^^^ Type error: error: error + --> <current file>:1:1 + | +1 | ../failure/cycle.dhall + | ^^^^^^^^^^^^^^^^^^^^^^ Type error: error: error + --> <current file>:1:1 + | +1 | ../data/cycle.dhall + | ^^^^^^^^^^^^^^^^^^^ ImportCycle([Local("./dhall-lang/tests/import/data/cycle.dhall"), Local("./dhall-lang/tests/import/failure/cycle.dhall")], Local("./dhall-lang/tests/import/data/cycle.dhall")) + | + | + | diff --git a/dhall/tests/import/failure/importBoundary.txt b/dhall/tests/import/failure/importBoundary.txt index 56810e2..6ddb326 100644 --- a/dhall/tests/import/failure/importBoundary.txt +++ b/dhall/tests/import/failure/importBoundary.txt @@ -1,7 +1,12 @@ -Type error: error: unbound variable `x` +Type error: error: error + --> <current file>:1:15 + | +1 | \(x: Bool) -> ../data/importBoundary.dhall + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Type error: error: unbound variable `x` --> <current file>:1:1 | ... 3 | x | ^ not found in this scope | + | diff --git a/dhall/tests/import/failure/missing.txt b/dhall/tests/import/failure/missing.txt index 4666330..a15e9e0 100644 --- a/dhall/tests/import/failure/missing.txt +++ b/dhall/tests/import/failure/missing.txt @@ -1 +1,6 @@ -Missing +Type error: error: error + --> <current file>:1:1 + | +1 | missing + | ^^^^^^^ Missing + | diff --git a/dhall/tests/import/failure/referentiallyInsane.txt b/dhall/tests/import/failure/referentiallyInsane.txt index 9b5fe91..1c6852a 100644 --- a/dhall/tests/import/failure/referentiallyInsane.txt +++ b/dhall/tests/import/failure/referentiallyInsane.txt @@ -1 +1,12 @@ -SanityCheck +Type error: error: error + --> <current file>:6:1 + | + 1 | {- The following remote import attempts to import an environment variable, which + 2 | must be disallowed by the referential sanity check + 3 | + 4 | One reason for doing this is to protect against remote imports exfiltrating +... +12 | -} +13 | https://raw.githubusercontent.com/dhall-lang/dhall-lang/master/tests/import/data/referentiallyOpaque.dhall + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SanityCheck + | diff --git a/dhall/tests/import/failure/unit/EnvUnset.txt b/dhall/tests/import/failure/unit/EnvUnset.txt index 482b68c..12a8953 100644 --- a/dhall/tests/import/failure/unit/EnvUnset.txt +++ b/dhall/tests/import/failure/unit/EnvUnset.txt @@ -1 +1,6 @@ -MissingEnvVar +Type error: error: error + --> <current file>:1:1 + | +1 | env:DHALL_TEST_UNSET + | ^^^^^^^^^^^^^^^^^^^^ MissingEnvVar + | diff --git a/dhall/tests/import/failure/unit/EnvUnsetAsText.txt b/dhall/tests/import/failure/unit/EnvUnsetAsText.txt index 482b68c..6571560 100644 --- a/dhall/tests/import/failure/unit/EnvUnsetAsText.txt +++ b/dhall/tests/import/failure/unit/EnvUnsetAsText.txt @@ -1 +1,6 @@ -MissingEnvVar +Type error: error: error + --> <current file>:1:1 + | +1 | env:DHALL_TEST_UNSET as Text + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ MissingEnvVar + | diff --git a/dhall/tests/import/failure/unit/FileMissing.dhall b/dhall/tests/import/failure/unit/FileMissing.dhall new file mode 100644 index 0000000..cba1bcc --- /dev/null +++ b/dhall/tests/import/failure/unit/FileMissing.dhall @@ -0,0 +1 @@ +./not-a-file.dhall diff --git a/dhall/tests/import/failure/unit/FileMissing.txt b/dhall/tests/import/failure/unit/FileMissing.txt new file mode 100644 index 0000000..351909d --- /dev/null +++ b/dhall/tests/import/failure/unit/FileMissing.txt @@ -0,0 +1,6 @@ +Type error: error: error + --> <current file>:1:1 + | +1 | ./not-a-file.dhall + | ^^^^^^^^^^^^^^^^^^ No such file or directory (os error 2) + | diff --git a/dhall/tests/import/failure/unit/HashMismatch2.dhall b/dhall/tests/import/failure/unit/HashMismatch2.dhall new file mode 100644 index 0000000..5fae772 --- /dev/null +++ b/dhall/tests/import/failure/unit/HashMismatch2.dhall @@ -0,0 +1,2 @@ +-- This ensures that even if the file gets imported without hash first, the hash check is not skipped later +../../data/simple.dhall + ../../data/simple.dhall sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + ../../data/simple.dhall diff --git a/dhall/tests/import/failure/unit/HashMismatch2.txt b/dhall/tests/import/failure/unit/HashMismatch2.txt new file mode 100644 index 0000000..f03ab24 --- /dev/null +++ b/dhall/tests/import/failure/unit/HashMismatch2.txt @@ -0,0 +1,9 @@ +Type error: error: hash mismatch + --> <current file>:2:27 + | +1 | -- This ensures that even if the file gets imported without hash first, the hash check is not skipped later +2 | ../../data/simple.dhall + ../../data/simple.dhall sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + ../../data/simple.dhall + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ hash mismatch + | + = note: Expected sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + = note: Found sha256:15f52ecf91c94c1baac02d5a4964b2ed8fa401641a2c8a95e8306ec7c1e3b8d2 |