aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/tests/path-with-outputs.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/tests/path-with-outputs.cc')
-rw-r--r--src/libstore/tests/path-with-outputs.cc46
1 files changed, 0 insertions, 46 deletions
diff --git a/src/libstore/tests/path-with-outputs.cc b/src/libstore/tests/path-with-outputs.cc
deleted file mode 100644
index 350ea7ffd..000000000
--- a/src/libstore/tests/path-with-outputs.cc
+++ /dev/null
@@ -1,46 +0,0 @@
-#include "path-with-outputs.hh"
-
-#include <gtest/gtest.h>
-
-namespace nix {
-
-TEST(parseOutputsSpec, basic)
-{
- {
- auto [prefix, outputsSpec] = parseOutputsSpec("foo");
- ASSERT_EQ(prefix, "foo");
- ASSERT_TRUE(std::get_if<DefaultOutputs>(&outputsSpec));
- }
-
- {
- auto [prefix, outputsSpec] = parseOutputsSpec("foo^*");
- ASSERT_EQ(prefix, "foo");
- ASSERT_TRUE(std::get_if<AllOutputs>(&outputsSpec));
- }
-
- {
- auto [prefix, outputsSpec] = parseOutputsSpec("foo^out");
- ASSERT_EQ(prefix, "foo");
- ASSERT_TRUE(std::get<OutputNames>(outputsSpec) == OutputNames({"out"}));
- }
-
- {
- auto [prefix, outputsSpec] = parseOutputsSpec("foo^out,bin");
- ASSERT_EQ(prefix, "foo");
- ASSERT_TRUE(std::get<OutputNames>(outputsSpec) == OutputNames({"out", "bin"}));
- }
-
- {
- auto [prefix, outputsSpec] = parseOutputsSpec("foo^bar^out,bin");
- ASSERT_EQ(prefix, "foo^bar");
- ASSERT_TRUE(std::get<OutputNames>(outputsSpec) == OutputNames({"out", "bin"}));
- }
-
- {
- auto [prefix, outputsSpec] = parseOutputsSpec("foo^&*()");
- ASSERT_EQ(prefix, "foo^&*()");
- ASSERT_TRUE(std::get_if<DefaultOutputs>(&outputsSpec));
- }
-}
-
-}