Add user-defined extradata to tree dump
[tedtools.git] / sfxtest.c
index f374036..393aff5 100644 (file)
--- a/sfxtest.c
+++ b/sfxtest.c
@@ -257,9 +257,16 @@ main(int argn, char *argv[]) {
                }
 
                if ( dump ) {
-                       SFSWriteDump(&info, "./sfxtest.dump");
+                       int             n = 0xDEAFBEAF;
+                       u_int32_t       nz;
+                       void            *pn;
+
+                       SFSWriteDump(&info, "./sfxtest.dump", &n, sizeof(n) );
                        SFSFree(&info,NULL);
-                       SFSReadDump(&info, "./sfxtest.dump");
+                       SFSReadDump(&info, "./sfxtest.dump", &pn, &nz);
+
+                       tassert(*(int*)pn == n);
+                       tassert(sizeof(n) == nz);
                }
 
                if (list) {