tests/ndrdump: Add a test for --hex-input
authorGarming Sam <garming@catalyst.net.nz>
Thu, 8 Dec 2016 21:50:38 +0000 (10:50 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 14 Feb 2017 12:39:01 +0000 (13:39 +0100)
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Feb 14 13:39:01 CET 2017 on sn-devel-144

python/samba/tests/blackbox/ndrdump.py
source4/librpc/tests/dns-decode_dns_name_packet-hex.dat [new file with mode: 0644]

index fca9a93153360695e0d8f4b6f9beece87a7f70e5..f0cd5f750ec72eb80aadfe540764f76aca53666a 100644 (file)
@@ -47,3 +47,7 @@ class NdrDumpTests(BlackboxTestCase):
 
     def test_ndrdump_with_validate(self):
         self.check_run("ndrdump --validate samr samr_CreateUser in %s" % (self.data_path("samr-CreateUser-in.dat")))
+
+    def test_ndrdump_with_hex(self):
+        self.check_run("ndrdump dns decode_dns_name_packet in --hex-input %s" %
+                       self.data_path("dns-decode_dns_name_packet-hex.dat"))
diff --git a/source4/librpc/tests/dns-decode_dns_name_packet-hex.dat b/source4/librpc/tests/dns-decode_dns_name_packet-hex.dat
new file mode 100644 (file)
index 0000000..c095bcc
--- /dev/null
@@ -0,0 +1,7 @@
+[0000] EC EF 28 00 00 01 00 00   00 01 00 00 09 73 61 6D   ..(..... .....sam
+[0010] 62 61 32 30 30 33 07 65   78 61 6D 70 6C 65 03 63   ba2003.e xample.c
+[0020] 6F 6D 00 00 06 00 01 0F   63 6E 61 6D 65 64 6F 74   om...... cnamedot
+[0030] 70 72 65 66 69 78 30 C0   0C 00 05 00 01 00 00 03   prefix0. ........
+[0040] 84 00 13 00 0F 62 6E 61   6D 65 64 6F 74 70 72 65   .....bna medotpre
+[0050] 66 69 78 32 C0 0C                                   fix2..
+