diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2023-05-17 17:31:33 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2023-05-17 17:31:33 -0400 |
commit | e7c1113a37e6a8fd0dc2dde0d070dbef276a0481 (patch) | |
tree | fb11f2ba40efb16ab2b7c03938d3ca509191adb2 /src/libstore/tests | |
parent | 684e9be8b9356f92b7882d74cba9d146fb71f850 (diff) |
Add test for `downstreamPlaceholder`
This is good in general, but in particular ensures when we heavily
refactor it in the next commit there is less likelihood for an
unintentional change in behavior to sneak in.
Diffstat (limited to 'src/libstore/tests')
-rw-r--r-- | src/libstore/tests/downstream-placeholder.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/libstore/tests/downstream-placeholder.cc b/src/libstore/tests/downstream-placeholder.cc new file mode 100644 index 000000000..7b8e2c649 --- /dev/null +++ b/src/libstore/tests/downstream-placeholder.cc @@ -0,0 +1,16 @@ +#include <gtest/gtest.h> + +#include "derivations.hh" + +namespace nix { + +TEST(Derivation, downstreamPlaceholder) { + ASSERT_EQ( + downstreamPlaceholder( + (const Store &)*(const Store *)nullptr, // argument is unused + StorePath { "g1w7hy3qg1w7hy3qg1w7hy3qg1w7hy3q-foo.drv" }, + "out"), + "/0c6rn30q4frawknapgwq386zq358m8r6msvywcvc89n6m5p2dgbz"); +} + +} |