about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--third_party/nix/src/tests/lang/disabled/README.txt7
-rw-r--r--third_party/nix/src/tests/lang/disabled/eval-okay-context-introspection.nix (renamed from third_party/nix/src/tests/lang/eval-okay-context-introspection.nix)0
-rw-r--r--third_party/nix/src/tests/lang/disabled/eval-okay-context.nix (renamed from third_party/nix/src/tests/lang/eval-okay-context.nix)0
-rw-r--r--third_party/nix/src/tests/lang/disabled/eval-okay-path.nix (renamed from third_party/nix/src/tests/lang/eval-okay-path.nix)0
-rw-r--r--third_party/nix/src/tests/lang/disabled/eval-okay-search-path.nix (renamed from third_party/nix/src/tests/lang/eval-okay-search-path.nix)0
-rw-r--r--third_party/nix/src/tests/lang/disabled/eval-okay-tail-call-1.nix (renamed from third_party/nix/src/tests/lang/eval-okay-tail-call-1.nix)0
-rw-r--r--third_party/nix/src/tests/language-tests.cc21
7 files changed, 28 insertions, 0 deletions
diff --git a/third_party/nix/src/tests/lang/disabled/README.txt b/third_party/nix/src/tests/lang/disabled/README.txt
new file mode 100644
index 0000000000..3dbcbf4f0d
--- /dev/null
+++ b/third_party/nix/src/tests/lang/disabled/README.txt
@@ -0,0 +1,7 @@
+These tests are disabeld primarily because the DummyStore used for
+tests does not interact with real files on disk at the moment, but the
+tests expect it to.
+
+Once we have a solution for this (potentially just reading & hashing
+the files, but not writing them anywhere) these tests will be enabled
+again.
diff --git a/third_party/nix/src/tests/lang/eval-okay-context-introspection.nix b/third_party/nix/src/tests/lang/disabled/eval-okay-context-introspection.nix
index 43178bd2ee..43178bd2ee 100644
--- a/third_party/nix/src/tests/lang/eval-okay-context-introspection.nix
+++ b/third_party/nix/src/tests/lang/disabled/eval-okay-context-introspection.nix
diff --git a/third_party/nix/src/tests/lang/eval-okay-context.nix b/third_party/nix/src/tests/lang/disabled/eval-okay-context.nix
index 7b9531cfe9..7b9531cfe9 100644
--- a/third_party/nix/src/tests/lang/eval-okay-context.nix
+++ b/third_party/nix/src/tests/lang/disabled/eval-okay-context.nix
diff --git a/third_party/nix/src/tests/lang/eval-okay-path.nix b/third_party/nix/src/tests/lang/disabled/eval-okay-path.nix
index e67168cf3e..e67168cf3e 100644
--- a/third_party/nix/src/tests/lang/eval-okay-path.nix
+++ b/third_party/nix/src/tests/lang/disabled/eval-okay-path.nix
diff --git a/third_party/nix/src/tests/lang/eval-okay-search-path.nix b/third_party/nix/src/tests/lang/disabled/eval-okay-search-path.nix
index cca41f821f..cca41f821f 100644
--- a/third_party/nix/src/tests/lang/eval-okay-search-path.nix
+++ b/third_party/nix/src/tests/lang/disabled/eval-okay-search-path.nix
diff --git a/third_party/nix/src/tests/lang/eval-okay-tail-call-1.nix b/third_party/nix/src/tests/lang/disabled/eval-okay-tail-call-1.nix
index a3962ce3fd..a3962ce3fd 100644
--- a/third_party/nix/src/tests/lang/eval-okay-tail-call-1.nix
+++ b/third_party/nix/src/tests/lang/disabled/eval-okay-tail-call-1.nix
diff --git a/third_party/nix/src/tests/language-tests.cc b/third_party/nix/src/tests/language-tests.cc
index 7e53cd8f5e..daa2fa233e 100644
--- a/third_party/nix/src/tests/language-tests.cc
+++ b/third_party/nix/src/tests/language-tests.cc
@@ -187,4 +187,25 @@ INSTANTIATE_TEST_SUITE_P(Eval, EvalFailureTest,
                          testing::ValuesIn(TestFilesFor("eval-fail-")),
                          TestNameFor);
 
+class EvalSuccessTest : public testing::TestWithParam<std::filesystem::path> {};
+
+// Test pattern for files that should fail to evaluate.
+TEST_P(EvalSuccessTest, Fails) {
+  std::shared_ptr<Store> store = std::make_shared<DummyStore>();
+  EvalState state({}, ref<Store>(store));
+  auto path = GetParam();
+
+  Expr* expr;
+  EXPECT_NO_THROW(expr = state.parseExprFromFile(GetParam().string()))
+      << path.stem().string() << ": should parse successfully";
+
+  Value result;
+  state.eval(expr, result);
+  state.forceValue(result);
+}
+
+INSTANTIATE_TEST_SUITE_P(Eval, EvalSuccessTest,
+                         testing::ValuesIn(TestFilesFor("eval-okay-")),
+                         TestNameFor);
+
 }  // namespace nix::tests