forked from lix-project/lix
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.
This commit is contained in:
parent
684e9be8b9
commit
e7c1113a37
1 changed files with 16 additions and 0 deletions
16
src/libstore/tests/downstream-placeholder.cc
Normal file
16
src/libstore/tests/downstream-placeholder.cc
Normal file
|
@ -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");
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue