Displaying 5 results from an estimated 5 matches for "node_add_child".
2019 Jan 17
1
[hivex PATCH] ruby: improve test functions
...c_200_write.rb b/ruby/tests/tc_200_write.rb
index 327d0a8..463283e 100644
--- a/ruby/tests/tc_200_write.rb
+++ b/ruby/tests/tc_200_write.rb
@@ -23,12 +23,12 @@ class TestWrite < MiniTest::Unit::TestCase
refute_nil (h)
root = h.root()
- assert (root)
+ refute_nil (root)
h.node_add_child(root, "A")
h.node_add_child(root, "B")
b = h.node_get_child(root, "B")
- assert (b)
+ refute_nil (b)
values = [
{ :key => "Key1", :type => 3, :value => "ABC" },
diff --git a/ruby/tests/tc_210_setvalue.r...
2014 Feb 03
1
[PATCH] hivex: python: value_value no longer generates Unicode strings
...rt sys
import os
import hivex
+if sys.version >= '3':
+ import codecs
+ def b(x):
+ return codecs.encode(x)
+else:
+ def b(x):
+ return x
+
srcdir = os.environ["srcdir"]
if not srcdir:
srcdir = "."
@@ -32,27 +40,27 @@ assert root
h.node_add_child (root, "B")
-b = h.node_get_child (root, "B")
-assert b
+B = h.node_get_child (root, "B")
+assert B
values = [
{ "key": "Key1", "t": 3, "value": "ABC" },
{ "key": "Key2", "t"...
2011 Dec 08
0
[hivex] [PATCH 1/8] Add test hive and generator script
...@@ -0,0 +1,37 @@
+#!/usr/bin/env python
+import os
+import hivex
+
+srcdir = os.environ.get("srcdir")
+if not srcdir:
+ srcdir = "."
+
+h = hivex.Hivex ("%s/../images/minimal" % srcdir,
+ write = True)
+assert h
+
+root = h.root ()
+assert root
+
+h.node_add_child (root, "ModerateValueParent")
+
+mvp = h.node_get_child (root, "ModerateValueParent")
+assert mvp
+
+moderate_value = "0123456789ABCDEF"
+
+values = [
+ { "key": "3Bytes", "t": 3, "value": moderate_value[:3] },
+ { "ke...
2010 Jul 07
1
[PATCH] hivex: add hivex_set_value api call and ocaml/perl bindings, tests
...bridge, MA 02139, USA.
+
+use strict;
+use warnings;
+use Test::More tests => 7;
+
+use Win::Hivex;
+
+my $srcdir = $ENV{srcdir} || ".";
+
+my $h = Win::Hivex->open ("$srcdir/../images/minimal", write => 1);
+ok ($h);
+
+my $root = $h->root ();
+ok ($root);
+
+$h->node_add_child ($root, "B");
+ok (1);
+
+my $b = $h->node_get_child ($root, "B");
+ok ($b);
+
+my $values = [
+ { key => "Key1", t => 3, value => "ABC" },
+ { key => "Key2", t => 3, value => "DEF" }
+ ];
+$h->node_set_val...
2010 Jul 03
1
[PATCH] hivex: add hivex_set_value api call and perl bindings, tests
...bridge, MA 02139, USA.
+
+use strict;
+use warnings;
+use Test::More tests => 7;
+
+use Win::Hivex;
+
+my $srcdir = $ENV{srcdir} || ".";
+
+my $h = Win::Hivex->open ("$srcdir/../images/minimal", write => 1);
+ok ($h);
+
+my $root = $h->root ();
+ok ($root);
+
+$h->node_add_child ($root, "B");
+ok (1);
+
+my $b = $h->node_get_child ($root, "B");
+ok ($b);
+
+my $values = [
+ { key => "Key1", t => 3, value => "ABC" },
+ { key => "Key2", t => 3, value => "DEF" }
+ ];
+$h->node_set_val...