1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-17 07:52:43 +01:00

* Path hashing.

This commit is contained in:
Eelco Dolstra 2003-06-16 15:59:23 +00:00
parent a09e66da5a
commit 2f04e7102e
5 changed files with 178 additions and 8 deletions

View file

@ -19,6 +19,15 @@ void evalTest(Expr e)
}
struct MySink : DumpSink
{
virtual void operator () (const unsigned char * data, unsigned int len)
{
cout.write((char *) data, len);
}
};
void runTests()
{
/* Hashing. */
@ -36,6 +45,13 @@ void runTests()
abort();
} catch (BadRefError err) { };
/* Dumping. */
#if 0
MySink sink;
dumpPath("scratch", sink);
cout << (string) hashPath("scratch") << endl;
#endif
/* Set up the test environment. */