summaryrefslogtreecommitdiff
path: root/dhall/tests/import/failure/unit
diff options
context:
space:
mode:
authorBasile Henry2020-11-03 23:32:51 +0100
committerBasile Henry2020-11-03 23:32:51 +0100
commita56cd6021705ebfd310bc902c4f549bea9b06a5b (patch)
tree8cd7429e654d31b9fbc68a97d71db92e7571c08a /dhall/tests/import/failure/unit
parent559f64fd866fc74e930ddf8984fa11199a57ca2c (diff)
parentf87ffe7a590c9e0a3e0a57854c739a0f89c3784d (diff)
Merge remote-tracking branch 'upstream/master' into text-replace
Diffstat (limited to 'dhall/tests/import/failure/unit')
-rw-r--r--dhall/tests/import/failure/unit/EnvUnset.txt7
-rw-r--r--dhall/tests/import/failure/unit/EnvUnsetAsText.txt7
-rw-r--r--dhall/tests/import/failure/unit/FileMissing.dhall1
-rw-r--r--dhall/tests/import/failure/unit/FileMissing.txt6
-rw-r--r--dhall/tests/import/failure/unit/HashMismatch2.dhall2
-rw-r--r--dhall/tests/import/failure/unit/HashMismatch2.txt9
6 files changed, 30 insertions, 2 deletions
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