about summary refs log tree commit diff
path: root/src/test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/test.cc')
-rw-r--r--src/test.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test.cc b/src/test.cc
index 79468182ea3c..b37a16a1fe0c 100644
--- a/src/test.cc
+++ b/src/test.cc
@@ -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. */