Update from samba tree revision 21237 to 21471
============================ Samba log start ============
------------------------------------------------------------------------
r21253 | jelmer | 2007-02-09 00:54:31 +0100 (Fri, 09 Feb 2007) | 7 lines
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/TODO
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/Header.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Util.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
A /branches/SAMBA_4_0/source/pidl/tests/header.pl
M /branches/SAMBA_4_0/source/pidl/tests/samba-ndr.pl
A /branches/SAMBA_4_0/source/pidl/tests/wireshark-conf.pl
Merge some pidl fixes:
* Add tests for wireshark dissector generator
* Add tests for the header code
* Some cleanups
* Fix handling of elements without [in] or [out]
------------------------------------------------------------------------
r21254 | jelmer | 2007-02-09 01:18:06 +0100 (Fri, 09 Feb 2007) | 2 lines
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/tests/header.pl
Fix running the testsuite outside pidl/
------------------------------------------------------------------------
r21260 | jelmer | 2007-02-09 10:44:11 +0100 (Fri, 09 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/tests/header.pl
Fix regex.
------------------------------------------------------------------------
r21297 | jelmer | 2007-02-12 13:12:12 +0100 (Mon, 12 Feb 2007) | 5 lines
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/.bzrignore
M /branches/SAMBA_4_0/source/configure.ac
D /branches/SAMBA_4_0/source/gtk
M /branches/SAMBA_4_0/source/headermap.txt
M /branches/SAMBA_4_0/source/include/core.h
M /branches/SAMBA_4_0/source/lib/events/config.mk
M /branches/SAMBA_4_0/source/lib/events/events.h
M /branches/SAMBA_4_0/source/lib/registry/config.mk
M /branches/SAMBA_4_0/source/lib/registry/registry.h
M /branches/SAMBA_4_0/source/lib/talloc/talloc.h
M /branches/SAMBA_4_0/source/libcli/util/nt_status.h
M /branches/SAMBA_4_0/source/librpc/config.mk
M /branches/SAMBA_4_0/source/main.mk
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/Header.pm
M /branches/SAMBA_4_0/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/translation/C.po
Remove the GTK+ tools and library from the main repository. They are now maintained separately in bzr at http://people.samba.org/bzr/jelmer/samba-gtk
This also adds some more headers to the list that is installed and a couple of extra #include lines so these
headers can be used externally without problems.
------------------------------------------------------------------------
r21332 | jelmer | 2007-02-14 13:44:50 +0100 (Wed, 14 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
M /branches/SAMBA_4_0/source/pidl/tests/samba-ndr.pl
Fix bug in pidl that prevented value(0) from working. Bug reported by metze.
------------------------------------------------------------------------
r21338 | jelmer | 2007-02-14 15:23:59 +0100 (Wed, 14 Feb 2007) | 6 lines
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
A /branches/SAMBA_4_0/source/pidl/tests/samba3-cli.pl
Fix handling of top-level arrays for the Samba 3 client code. This doesn't
fix the winreg code yet (as that's an array on top of a pointer), but at least
it gets us closer.
Also added a couple of tests for the Samba 3 client code.
------------------------------------------------------------------------
r21340 | jelmer | 2007-02-14 15:42:42 +0100 (Wed, 14 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
Fix warning undef
------------------------------------------------------------------------
r21384 | jelmer | 2007-02-16 15:13:14 +0100 (Fri, 16 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
Change warning to pidl warning, fix uppercasing.
------------------------------------------------------------------------
r21411 | jelmer | 2007-02-18 00:38:57 +0100 (Sun, 18 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
A /branches/SAMBA_4_0/source/pidl/tests/wireshark-ndr.pl
Add some simple tests for the wireshark NDR generator.
------------------------------------------------------------------------
r21427 | jelmer | 2007-02-18 13:54:03 +0100 (Sun, 18 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
M /branches/SAMBA_4_0/source/pidl/tests/samba-ndr.pl
Add tests for Needed*(), in preparation of refactoring.
------------------------------------------------------------------------
r21428 | jelmer | 2007-02-18 14:44:01 +0100 (Sun, 18 Feb 2007) | 2 lines
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
M /branches/SAMBA_4_0/source/pidl/tests/ndr.pl
M /branches/SAMBA_4_0/source/pidl/tests/samba-ndr.pl
Handle representation types in Needed().
------------------------------------------------------------------------
r21430 | jelmer | 2007-02-18 17:21:28 +0100 (Sun, 18 Feb 2007) | 10 lines
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/TODO
M /branches/SAMBA_4_0/source/pidl/idl.yp
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Expr.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/IDL.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/Header.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
M /branches/SAMBA_4_0/source/pidl/tests/Util.pm
M /branches/SAMBA_4_0/source/pidl/tests/header.pl
M /branches/SAMBA_4_0/source/pidl/tests/ndr_deprecations.pl
M /branches/SAMBA_4_0/source/pidl/tests/ndr_tagtype.pl
M /branches/SAMBA_4_0/source/pidl/tests/parse_idl.pl
M /branches/SAMBA_4_0/source/pidl/tests/samba-ndr.pl
Support tagged types without typedef. This means:
struct foo {
...
};
in IDL will now work. This is the first step towards nested types and
using typedefs for partial types (such as "typedef int *bar;"), a requirement
for complex uses of represent_as().
------------------------------------------------------------------------
r21431 | jelmer | 2007-02-18 17:46:59 +0100 (Sun, 18 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Dump.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
A /branches/SAMBA_4_0/source/pidl/tests/dump.pl
More tests, work on support in wireshark for tagged types.
------------------------------------------------------------------------
r21432 | jelmer | 2007-02-18 17:54:54 +0100 (Sun, 18 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/TDR.pm
Handle properties on tagged types in TDR.
------------------------------------------------------------------------
r21433 | jelmer | 2007-02-18 19:44:56 +0100 (Sun, 18 Feb 2007) | 9 lines
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/lib/registry/regf.idl
M /branches/SAMBA_4_0/source/librpc/config.mk
D /branches/SAMBA_4_0/source/librpc/idl/dcom.idl
M /branches/SAMBA_4_0/source/librpc/idl/oxidresolver.idl
M /branches/SAMBA_4_0/source/librpc/idl/remact.idl
D /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/ODL.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
D /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/COM
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/EJS.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/Header.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/SWIG.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/TDR.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Typelist.pm
M /branches/SAMBA_4_0/source/pidl/pidl
A /branches/SAMBA_4_0/source/pidl/tests/tdr.pl
M /branches/SAMBA_4_0/source/script/build_idl.sh
M /branches/SAMBA_4_0/source/torture/rpc/oxidresolve.c
M /branches/SAMBA_4_0/source/torture/rpc/remact.c
Get rid of the COM support code - it's not used and unmaintained. We can
always bring it back if we need to. This code was getting in the way while
refactoring.
Add some tests for TDR.
Get rid of typedef in lib/registry/tdr_regf.idl and fix the
TDR code to be able to deal with it.
------------------------------------------------------------------------
r21437 | jelmer | 2007-02-19 00:48:16 +0100 (Mon, 19 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Typelist.pm
A /branches/SAMBA_4_0/source/pidl/tests/typelist.pl
Cherrypick typelib tests.
------------------------------------------------------------------------
r21440 | jelmer | 2007-02-19 00:57:26 +0100 (Mon, 19 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
M /branches/SAMBA_4_0/source/pidl/tests/samba-ndr.pl
Support different variables in environments.
------------------------------------------------------------------------
r21442 | jelmer | 2007-02-19 01:48:05 +0100 (Mon, 19 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
Allow more flexible data structure names.
------------------------------------------------------------------------
r21443 | jelmer | 2007-02-19 02:51:46 +0100 (Mon, 19 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
Refactor some of the NDR code in preparation of nested data structure support.
------------------------------------------------------------------------
r21455 | jelmer | 2007-02-19 20:42:51 +0100 (Mon, 19 Feb 2007) | 5 lines
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
M /branches/SAMBA_4_0/source/pidl/tests/samba-ndr.pl
Fix a bug in our handling of conformant arrays. The conformant array was
always pushed, even if just the buffers part of a struct had to be pushed.
Pull was not affected.
------------------------------------------------------------------------
r21456 | jelmer | 2007-02-19 22:37:54 +0100 (Mon, 19 Feb 2007) | 6 lines
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
Allow anonymous and non-anonymous nested structures/unions/enums/bitmaps to be
used in the Samba 4 NDR parser.
This doesn't actually work yet as Parse::Pidl::NDR doesn't handle nested
data structures yet, but it's a first step.
------------------------------------------------------------------------
r21457 | jelmer | 2007-02-19 23:10:23 +0100 (Mon, 19 Feb 2007) | 3 lines
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm
M /branches/SAMBA_4_0/source/pidl/tests/ndr.pl
Cope with anonymous nested types in the NDR layer. This doesn't handled
named nested types yet, as these have to be registered.
------------------------------------------------------------------------
r21458 | jelmer | 2007-02-20 00:11:01 +0100 (Tue, 20 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
Prepare for generating separate primitives/deferred code.
------------------------------------------------------------------------
r21459 | jelmer | 2007-02-20 02:27:48 +0100 (Tue, 20 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
M /branches/SAMBA_4_0/source/pidl/tests/samba-ndr.pl
Remove name argument, more refactoring.
------------------------------------------------------------------------
------------------------------------------------------------------------
============================ Samba log end ==============
svn path=/trunk/; revision=20876
2007-02-20 19:13:42 +00:00
|
|
|
#!/usr/bin/perl
|
|
|
|
# (C) 2007 Jelmer Vernooij <jelmer@samba.org>
|
|
|
|
# Published under the GNU General Public License
|
|
|
|
# test parsing wireshark conformance files
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
|
2007-02-27 20:32:15 +00:00
|
|
|
use Test::More tests => 45;
|
Update from samba tree revision 21237 to 21471
============================ Samba log start ============
------------------------------------------------------------------------
r21253 | jelmer | 2007-02-09 00:54:31 +0100 (Fri, 09 Feb 2007) | 7 lines
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/TODO
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/Header.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Util.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
A /branches/SAMBA_4_0/source/pidl/tests/header.pl
M /branches/SAMBA_4_0/source/pidl/tests/samba-ndr.pl
A /branches/SAMBA_4_0/source/pidl/tests/wireshark-conf.pl
Merge some pidl fixes:
* Add tests for wireshark dissector generator
* Add tests for the header code
* Some cleanups
* Fix handling of elements without [in] or [out]
------------------------------------------------------------------------
r21254 | jelmer | 2007-02-09 01:18:06 +0100 (Fri, 09 Feb 2007) | 2 lines
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/tests/header.pl
Fix running the testsuite outside pidl/
------------------------------------------------------------------------
r21260 | jelmer | 2007-02-09 10:44:11 +0100 (Fri, 09 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/tests/header.pl
Fix regex.
------------------------------------------------------------------------
r21297 | jelmer | 2007-02-12 13:12:12 +0100 (Mon, 12 Feb 2007) | 5 lines
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/.bzrignore
M /branches/SAMBA_4_0/source/configure.ac
D /branches/SAMBA_4_0/source/gtk
M /branches/SAMBA_4_0/source/headermap.txt
M /branches/SAMBA_4_0/source/include/core.h
M /branches/SAMBA_4_0/source/lib/events/config.mk
M /branches/SAMBA_4_0/source/lib/events/events.h
M /branches/SAMBA_4_0/source/lib/registry/config.mk
M /branches/SAMBA_4_0/source/lib/registry/registry.h
M /branches/SAMBA_4_0/source/lib/talloc/talloc.h
M /branches/SAMBA_4_0/source/libcli/util/nt_status.h
M /branches/SAMBA_4_0/source/librpc/config.mk
M /branches/SAMBA_4_0/source/main.mk
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/Header.pm
M /branches/SAMBA_4_0/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/translation/C.po
Remove the GTK+ tools and library from the main repository. They are now maintained separately in bzr at http://people.samba.org/bzr/jelmer/samba-gtk
This also adds some more headers to the list that is installed and a couple of extra #include lines so these
headers can be used externally without problems.
------------------------------------------------------------------------
r21332 | jelmer | 2007-02-14 13:44:50 +0100 (Wed, 14 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
M /branches/SAMBA_4_0/source/pidl/tests/samba-ndr.pl
Fix bug in pidl that prevented value(0) from working. Bug reported by metze.
------------------------------------------------------------------------
r21338 | jelmer | 2007-02-14 15:23:59 +0100 (Wed, 14 Feb 2007) | 6 lines
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
A /branches/SAMBA_4_0/source/pidl/tests/samba3-cli.pl
Fix handling of top-level arrays for the Samba 3 client code. This doesn't
fix the winreg code yet (as that's an array on top of a pointer), but at least
it gets us closer.
Also added a couple of tests for the Samba 3 client code.
------------------------------------------------------------------------
r21340 | jelmer | 2007-02-14 15:42:42 +0100 (Wed, 14 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
Fix warning undef
------------------------------------------------------------------------
r21384 | jelmer | 2007-02-16 15:13:14 +0100 (Fri, 16 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
Change warning to pidl warning, fix uppercasing.
------------------------------------------------------------------------
r21411 | jelmer | 2007-02-18 00:38:57 +0100 (Sun, 18 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
A /branches/SAMBA_4_0/source/pidl/tests/wireshark-ndr.pl
Add some simple tests for the wireshark NDR generator.
------------------------------------------------------------------------
r21427 | jelmer | 2007-02-18 13:54:03 +0100 (Sun, 18 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
M /branches/SAMBA_4_0/source/pidl/tests/samba-ndr.pl
Add tests for Needed*(), in preparation of refactoring.
------------------------------------------------------------------------
r21428 | jelmer | 2007-02-18 14:44:01 +0100 (Sun, 18 Feb 2007) | 2 lines
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
M /branches/SAMBA_4_0/source/pidl/tests/ndr.pl
M /branches/SAMBA_4_0/source/pidl/tests/samba-ndr.pl
Handle representation types in Needed().
------------------------------------------------------------------------
r21430 | jelmer | 2007-02-18 17:21:28 +0100 (Sun, 18 Feb 2007) | 10 lines
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/TODO
M /branches/SAMBA_4_0/source/pidl/idl.yp
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Expr.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/IDL.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/Header.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
M /branches/SAMBA_4_0/source/pidl/tests/Util.pm
M /branches/SAMBA_4_0/source/pidl/tests/header.pl
M /branches/SAMBA_4_0/source/pidl/tests/ndr_deprecations.pl
M /branches/SAMBA_4_0/source/pidl/tests/ndr_tagtype.pl
M /branches/SAMBA_4_0/source/pidl/tests/parse_idl.pl
M /branches/SAMBA_4_0/source/pidl/tests/samba-ndr.pl
Support tagged types without typedef. This means:
struct foo {
...
};
in IDL will now work. This is the first step towards nested types and
using typedefs for partial types (such as "typedef int *bar;"), a requirement
for complex uses of represent_as().
------------------------------------------------------------------------
r21431 | jelmer | 2007-02-18 17:46:59 +0100 (Sun, 18 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Dump.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
A /branches/SAMBA_4_0/source/pidl/tests/dump.pl
More tests, work on support in wireshark for tagged types.
------------------------------------------------------------------------
r21432 | jelmer | 2007-02-18 17:54:54 +0100 (Sun, 18 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/TDR.pm
Handle properties on tagged types in TDR.
------------------------------------------------------------------------
r21433 | jelmer | 2007-02-18 19:44:56 +0100 (Sun, 18 Feb 2007) | 9 lines
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/lib/registry/regf.idl
M /branches/SAMBA_4_0/source/librpc/config.mk
D /branches/SAMBA_4_0/source/librpc/idl/dcom.idl
M /branches/SAMBA_4_0/source/librpc/idl/oxidresolver.idl
M /branches/SAMBA_4_0/source/librpc/idl/remact.idl
D /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/ODL.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
D /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/COM
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/EJS.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/Header.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/SWIG.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/TDR.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Typelist.pm
M /branches/SAMBA_4_0/source/pidl/pidl
A /branches/SAMBA_4_0/source/pidl/tests/tdr.pl
M /branches/SAMBA_4_0/source/script/build_idl.sh
M /branches/SAMBA_4_0/source/torture/rpc/oxidresolve.c
M /branches/SAMBA_4_0/source/torture/rpc/remact.c
Get rid of the COM support code - it's not used and unmaintained. We can
always bring it back if we need to. This code was getting in the way while
refactoring.
Add some tests for TDR.
Get rid of typedef in lib/registry/tdr_regf.idl and fix the
TDR code to be able to deal with it.
------------------------------------------------------------------------
r21437 | jelmer | 2007-02-19 00:48:16 +0100 (Mon, 19 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Typelist.pm
A /branches/SAMBA_4_0/source/pidl/tests/typelist.pl
Cherrypick typelib tests.
------------------------------------------------------------------------
r21440 | jelmer | 2007-02-19 00:57:26 +0100 (Mon, 19 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
M /branches/SAMBA_4_0/source/pidl/tests/samba-ndr.pl
Support different variables in environments.
------------------------------------------------------------------------
r21442 | jelmer | 2007-02-19 01:48:05 +0100 (Mon, 19 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
Allow more flexible data structure names.
------------------------------------------------------------------------
r21443 | jelmer | 2007-02-19 02:51:46 +0100 (Mon, 19 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
Refactor some of the NDR code in preparation of nested data structure support.
------------------------------------------------------------------------
r21455 | jelmer | 2007-02-19 20:42:51 +0100 (Mon, 19 Feb 2007) | 5 lines
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
M /branches/SAMBA_4_0/source/pidl/tests/samba-ndr.pl
Fix a bug in our handling of conformant arrays. The conformant array was
always pushed, even if just the buffers part of a struct had to be pushed.
Pull was not affected.
------------------------------------------------------------------------
r21456 | jelmer | 2007-02-19 22:37:54 +0100 (Mon, 19 Feb 2007) | 6 lines
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
Allow anonymous and non-anonymous nested structures/unions/enums/bitmaps to be
used in the Samba 4 NDR parser.
This doesn't actually work yet as Parse::Pidl::NDR doesn't handle nested
data structures yet, but it's a first step.
------------------------------------------------------------------------
r21457 | jelmer | 2007-02-19 23:10:23 +0100 (Mon, 19 Feb 2007) | 3 lines
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm
M /branches/SAMBA_4_0/source/pidl/tests/ndr.pl
Cope with anonymous nested types in the NDR layer. This doesn't handled
named nested types yet, as these have to be registered.
------------------------------------------------------------------------
r21458 | jelmer | 2007-02-20 00:11:01 +0100 (Tue, 20 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
Prepare for generating separate primitives/deferred code.
------------------------------------------------------------------------
r21459 | jelmer | 2007-02-20 02:27:48 +0100 (Tue, 20 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
M /branches/SAMBA_4_0/source/pidl/tests/samba-ndr.pl
Remove name argument, more refactoring.
------------------------------------------------------------------------
------------------------------------------------------------------------
============================ Samba log end ==============
svn path=/trunk/; revision=20876
2007-02-20 19:13:42 +00:00
|
|
|
use FindBin qw($RealBin);
|
|
|
|
use lib "$RealBin";
|
|
|
|
use Util;
|
|
|
|
use Parse::Pidl::Util qw(MyDumper);
|
2007-02-27 20:32:15 +00:00
|
|
|
use Parse::Pidl::Wireshark::Conformance qw(ReadConformanceFH valid_ft_type valid_base_type);
|
Update from samba tree revision 21237 to 21471
============================ Samba log start ============
------------------------------------------------------------------------
r21253 | jelmer | 2007-02-09 00:54:31 +0100 (Fri, 09 Feb 2007) | 7 lines
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/TODO
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/Header.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Util.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
A /branches/SAMBA_4_0/source/pidl/tests/header.pl
M /branches/SAMBA_4_0/source/pidl/tests/samba-ndr.pl
A /branches/SAMBA_4_0/source/pidl/tests/wireshark-conf.pl
Merge some pidl fixes:
* Add tests for wireshark dissector generator
* Add tests for the header code
* Some cleanups
* Fix handling of elements without [in] or [out]
------------------------------------------------------------------------
r21254 | jelmer | 2007-02-09 01:18:06 +0100 (Fri, 09 Feb 2007) | 2 lines
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/tests/header.pl
Fix running the testsuite outside pidl/
------------------------------------------------------------------------
r21260 | jelmer | 2007-02-09 10:44:11 +0100 (Fri, 09 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/tests/header.pl
Fix regex.
------------------------------------------------------------------------
r21297 | jelmer | 2007-02-12 13:12:12 +0100 (Mon, 12 Feb 2007) | 5 lines
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/.bzrignore
M /branches/SAMBA_4_0/source/configure.ac
D /branches/SAMBA_4_0/source/gtk
M /branches/SAMBA_4_0/source/headermap.txt
M /branches/SAMBA_4_0/source/include/core.h
M /branches/SAMBA_4_0/source/lib/events/config.mk
M /branches/SAMBA_4_0/source/lib/events/events.h
M /branches/SAMBA_4_0/source/lib/registry/config.mk
M /branches/SAMBA_4_0/source/lib/registry/registry.h
M /branches/SAMBA_4_0/source/lib/talloc/talloc.h
M /branches/SAMBA_4_0/source/libcli/util/nt_status.h
M /branches/SAMBA_4_0/source/librpc/config.mk
M /branches/SAMBA_4_0/source/main.mk
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/Header.pm
M /branches/SAMBA_4_0/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/translation/C.po
Remove the GTK+ tools and library from the main repository. They are now maintained separately in bzr at http://people.samba.org/bzr/jelmer/samba-gtk
This also adds some more headers to the list that is installed and a couple of extra #include lines so these
headers can be used externally without problems.
------------------------------------------------------------------------
r21332 | jelmer | 2007-02-14 13:44:50 +0100 (Wed, 14 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
M /branches/SAMBA_4_0/source/pidl/tests/samba-ndr.pl
Fix bug in pidl that prevented value(0) from working. Bug reported by metze.
------------------------------------------------------------------------
r21338 | jelmer | 2007-02-14 15:23:59 +0100 (Wed, 14 Feb 2007) | 6 lines
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
A /branches/SAMBA_4_0/source/pidl/tests/samba3-cli.pl
Fix handling of top-level arrays for the Samba 3 client code. This doesn't
fix the winreg code yet (as that's an array on top of a pointer), but at least
it gets us closer.
Also added a couple of tests for the Samba 3 client code.
------------------------------------------------------------------------
r21340 | jelmer | 2007-02-14 15:42:42 +0100 (Wed, 14 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
Fix warning undef
------------------------------------------------------------------------
r21384 | jelmer | 2007-02-16 15:13:14 +0100 (Fri, 16 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
Change warning to pidl warning, fix uppercasing.
------------------------------------------------------------------------
r21411 | jelmer | 2007-02-18 00:38:57 +0100 (Sun, 18 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
A /branches/SAMBA_4_0/source/pidl/tests/wireshark-ndr.pl
Add some simple tests for the wireshark NDR generator.
------------------------------------------------------------------------
r21427 | jelmer | 2007-02-18 13:54:03 +0100 (Sun, 18 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
M /branches/SAMBA_4_0/source/pidl/tests/samba-ndr.pl
Add tests for Needed*(), in preparation of refactoring.
------------------------------------------------------------------------
r21428 | jelmer | 2007-02-18 14:44:01 +0100 (Sun, 18 Feb 2007) | 2 lines
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
M /branches/SAMBA_4_0/source/pidl/tests/ndr.pl
M /branches/SAMBA_4_0/source/pidl/tests/samba-ndr.pl
Handle representation types in Needed().
------------------------------------------------------------------------
r21430 | jelmer | 2007-02-18 17:21:28 +0100 (Sun, 18 Feb 2007) | 10 lines
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/TODO
M /branches/SAMBA_4_0/source/pidl/idl.yp
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Expr.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/IDL.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/Header.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
M /branches/SAMBA_4_0/source/pidl/tests/Util.pm
M /branches/SAMBA_4_0/source/pidl/tests/header.pl
M /branches/SAMBA_4_0/source/pidl/tests/ndr_deprecations.pl
M /branches/SAMBA_4_0/source/pidl/tests/ndr_tagtype.pl
M /branches/SAMBA_4_0/source/pidl/tests/parse_idl.pl
M /branches/SAMBA_4_0/source/pidl/tests/samba-ndr.pl
Support tagged types without typedef. This means:
struct foo {
...
};
in IDL will now work. This is the first step towards nested types and
using typedefs for partial types (such as "typedef int *bar;"), a requirement
for complex uses of represent_as().
------------------------------------------------------------------------
r21431 | jelmer | 2007-02-18 17:46:59 +0100 (Sun, 18 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Dump.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
A /branches/SAMBA_4_0/source/pidl/tests/dump.pl
More tests, work on support in wireshark for tagged types.
------------------------------------------------------------------------
r21432 | jelmer | 2007-02-18 17:54:54 +0100 (Sun, 18 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/TDR.pm
Handle properties on tagged types in TDR.
------------------------------------------------------------------------
r21433 | jelmer | 2007-02-18 19:44:56 +0100 (Sun, 18 Feb 2007) | 9 lines
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/lib/registry/regf.idl
M /branches/SAMBA_4_0/source/librpc/config.mk
D /branches/SAMBA_4_0/source/librpc/idl/dcom.idl
M /branches/SAMBA_4_0/source/librpc/idl/oxidresolver.idl
M /branches/SAMBA_4_0/source/librpc/idl/remact.idl
D /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/ODL.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
D /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/COM
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/EJS.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/Header.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/SWIG.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/TDR.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Typelist.pm
M /branches/SAMBA_4_0/source/pidl/pidl
A /branches/SAMBA_4_0/source/pidl/tests/tdr.pl
M /branches/SAMBA_4_0/source/script/build_idl.sh
M /branches/SAMBA_4_0/source/torture/rpc/oxidresolve.c
M /branches/SAMBA_4_0/source/torture/rpc/remact.c
Get rid of the COM support code - it's not used and unmaintained. We can
always bring it back if we need to. This code was getting in the way while
refactoring.
Add some tests for TDR.
Get rid of typedef in lib/registry/tdr_regf.idl and fix the
TDR code to be able to deal with it.
------------------------------------------------------------------------
r21437 | jelmer | 2007-02-19 00:48:16 +0100 (Mon, 19 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Typelist.pm
A /branches/SAMBA_4_0/source/pidl/tests/typelist.pl
Cherrypick typelib tests.
------------------------------------------------------------------------
r21440 | jelmer | 2007-02-19 00:57:26 +0100 (Mon, 19 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
M /branches/SAMBA_4_0/source/pidl/tests/samba-ndr.pl
Support different variables in environments.
------------------------------------------------------------------------
r21442 | jelmer | 2007-02-19 01:48:05 +0100 (Mon, 19 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
Allow more flexible data structure names.
------------------------------------------------------------------------
r21443 | jelmer | 2007-02-19 02:51:46 +0100 (Mon, 19 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
Refactor some of the NDR code in preparation of nested data structure support.
------------------------------------------------------------------------
r21455 | jelmer | 2007-02-19 20:42:51 +0100 (Mon, 19 Feb 2007) | 5 lines
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
M /branches/SAMBA_4_0/source/pidl/tests/samba-ndr.pl
Fix a bug in our handling of conformant arrays. The conformant array was
always pushed, even if just the buffers part of a struct had to be pushed.
Pull was not affected.
------------------------------------------------------------------------
r21456 | jelmer | 2007-02-19 22:37:54 +0100 (Mon, 19 Feb 2007) | 6 lines
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
Allow anonymous and non-anonymous nested structures/unions/enums/bitmaps to be
used in the Samba 4 NDR parser.
This doesn't actually work yet as Parse::Pidl::NDR doesn't handle nested
data structures yet, but it's a first step.
------------------------------------------------------------------------
r21457 | jelmer | 2007-02-19 23:10:23 +0100 (Mon, 19 Feb 2007) | 3 lines
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm
M /branches/SAMBA_4_0/source/pidl/tests/ndr.pl
Cope with anonymous nested types in the NDR layer. This doesn't handled
named nested types yet, as these have to be registered.
------------------------------------------------------------------------
r21458 | jelmer | 2007-02-20 00:11:01 +0100 (Tue, 20 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
Prepare for generating separate primitives/deferred code.
------------------------------------------------------------------------
r21459 | jelmer | 2007-02-20 02:27:48 +0100 (Tue, 20 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
M /branches/SAMBA_4_0/source/pidl/tests/samba-ndr.pl
Remove name argument, more refactoring.
------------------------------------------------------------------------
------------------------------------------------------------------------
============================ Samba log end ==============
svn path=/trunk/; revision=20876
2007-02-20 19:13:42 +00:00
|
|
|
|
|
|
|
sub parse_conf($)
|
|
|
|
{
|
|
|
|
my $str = shift;
|
|
|
|
open(TMP, "+>", undef) or die("unable to open temp file");
|
|
|
|
print TMP $str;
|
|
|
|
seek(TMP, 0, 0);
|
|
|
|
my $data = {};
|
|
|
|
ReadConformanceFH(*TMP, $data, "nofile") or return undef;
|
|
|
|
close(TMP);
|
|
|
|
return $data;
|
|
|
|
}
|
|
|
|
|
|
|
|
ok(parse_conf("\n"), undef);
|
|
|
|
ok(parse_conf(" \n"), undef);
|
|
|
|
ok(parse_conf("CODE START\nCODE END\n"));
|
|
|
|
test_warnings("nofile:1: Expecting CODE END\n", sub { is(parse_conf("CODE START\n"), undef); });
|
|
|
|
ok(parse_conf("#foobar\n"), undef);
|
|
|
|
test_warnings("nofile:1: Unknown command `foobar'\n",
|
|
|
|
sub { ok(parse_conf("foobar\n"), undef); });
|
|
|
|
|
|
|
|
test_warnings("nofile:1: incomplete HF_RENAME command\n",
|
|
|
|
sub { parse_conf("HF_RENAME\n"); });
|
|
|
|
|
|
|
|
|
|
|
|
is_deeply(parse_conf("HF_RENAME foo bar\n")->{hf_renames}->{foo},
|
|
|
|
{ OLDNAME => "foo", NEWNAME => "bar", POS => {FILE => "nofile", LINE => 1}, USED => 0});
|
|
|
|
|
|
|
|
is_deeply(parse_conf("NOEMIT\n"), { "noemit_dissector" => 1 });
|
|
|
|
is_deeply(parse_conf("NOEMIT foo\n"), { "noemit" => { "foo" => 1 } });
|
|
|
|
|
|
|
|
test_warnings("nofile:1: incomplete MANUAL command\n",
|
|
|
|
sub { parse_conf("MANUAL\n"); } );
|
|
|
|
|
|
|
|
is_deeply(parse_conf("MANUAL foo\n"), { manual => {foo => 1}});
|
|
|
|
|
|
|
|
test_warnings("nofile:1: incomplete FIELD_DESCRIPTION command\n",
|
|
|
|
sub { parse_conf("FIELD_DESCRIPTION foo\n"); });
|
|
|
|
|
|
|
|
is_deeply(parse_conf("FIELD_DESCRIPTION foo \"my description\"\n"),
|
|
|
|
{ fielddescription => { foo => { DESCRIPTION => "\"my description\"", POS => { FILE => "nofile", LINE => 1}, USED => 0 }}});
|
|
|
|
|
|
|
|
is_deeply(parse_conf("FIELD_DESCRIPTION foo my description\n"),
|
|
|
|
{ fielddescription => { foo => { DESCRIPTION => "my", POS => { FILE => "nofile", LINE => 1}, USED => 0 }}});
|
|
|
|
|
|
|
|
is_deeply(parse_conf("CODE START\ndata\nCODE END\n"), { override => "data\n" });
|
|
|
|
is_deeply(parse_conf("CODE START\ndata\nmore data\nCODE END\n"), { override => "data\nmore data\n" });
|
|
|
|
test_warnings("nofile:1: Unknown command `CODE'\n",
|
|
|
|
sub { parse_conf("CODE END\n"); } );
|
2007-02-27 20:32:15 +00:00
|
|
|
|
|
|
|
is_deeply(parse_conf("TYPE winreg_String dissect_myminregstring FT_STRING BASE_DEC 0 0 2\n"), { types => { winreg_String => {
|
|
|
|
NAME => "winreg_String",
|
|
|
|
POS => { FILE => "nofile", LINE => 1 },
|
|
|
|
USED => 0,
|
|
|
|
DISSECTOR_NAME => "dissect_myminregstring",
|
|
|
|
FT_TYPE => "FT_STRING",
|
|
|
|
BASE_TYPE => "BASE_DEC",
|
|
|
|
MASK => 0,
|
|
|
|
VALSSTRING => 0,
|
|
|
|
ALIGNMENT => 2}}});
|
|
|
|
|
|
|
|
ok(valid_ft_type("FT_UINT32"));
|
|
|
|
ok(not valid_ft_type("BLA"));
|
|
|
|
ok(not valid_ft_type("ft_uint32"));
|
|
|
|
ok(valid_ft_type("FT_BLA"));
|
|
|
|
|
|
|
|
ok(valid_base_type("BASE_DEC"));
|
|
|
|
ok(valid_base_type("BASE_HEX"));
|
|
|
|
ok(not valid_base_type("base_dec"));
|
|
|
|
ok(not valid_base_type("BLA"));
|
|
|
|
ok(not valid_base_type("BASEDEC"));
|
|
|
|
|
|
|
|
test_errors("nofile:1: incomplete TYPE command\n",
|
|
|
|
sub { parse_conf("TYPE mytype dissector\n"); });
|
|
|
|
|
|
|
|
test_warnings("nofile:1: dissector name does not contain `dissect'\n",
|
|
|
|
sub { parse_conf("TYPE winreg_String myminregstring FT_STRING BASE_DEC 0 0 2\n"); });
|
|
|
|
|
|
|
|
test_warnings("nofile:1: invalid FT_TYPE `BLA'\n",
|
|
|
|
sub { parse_conf("TYPE winreg_String dissect_myminregstring BLA BASE_DEC 0 0 2\n"); });
|
|
|
|
|
|
|
|
test_warnings("nofile:1: invalid BASE_TYPE `BLOE'\n",
|
|
|
|
sub { parse_conf("TYPE winreg_String dissect_myminregstring FT_UINT32 BLOE 0 0 2\n"); });
|
|
|
|
|
|
|
|
is_deeply(parse_conf("TFS hf_bla \"True string\" \"False String\"\n"),
|
|
|
|
{ tfs => { hf_bla => {
|
|
|
|
TRUE_STRING => "\"True string\"",
|
|
|
|
FALSE_STRING => "\"False String\"" } } });
|
|
|
|
|
|
|
|
test_errors("nofile:1: incomplete TFS command\n",
|
|
|
|
sub { parse_conf("TFS hf_bla \"Trues\""); } );
|
|
|
|
|
|
|
|
test_errors("nofile:1: incomplete PARAM_VALUE command\n",
|
|
|
|
sub { parse_conf("PARAM_VALUE\n"); });
|
|
|
|
|
|
|
|
is_deeply(parse_conf("PARAM_VALUE Life 42\n"),
|
|
|
|
{ dissectorparams => {
|
|
|
|
Life => {
|
|
|
|
DISSECTOR => "Life",
|
|
|
|
POS => { FILE => "nofile", LINE => 1 },
|
|
|
|
PARAM => 42,
|
|
|
|
USED => 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
is_deeply(parse_conf("STRIP_PREFIX bla_\n"),
|
|
|
|
{ strip_prefixes => [ "bla_" ] });
|
|
|
|
|
|
|
|
is_deeply(parse_conf("STRIP_PREFIX bla_\nSTRIP_PREFIX bloe\n"),
|
|
|
|
{ strip_prefixes => [ "bla_", "bloe" ] });
|
|
|
|
|
|
|
|
is_deeply(parse_conf("PROTOCOL atsvc \"Scheduling jobs on remote machines\" \"at\" \"atsvc\"\n"),
|
|
|
|
{ protocols => {
|
|
|
|
atsvc => {
|
|
|
|
LONGNAME => "\"Scheduling jobs on remote machines\"",
|
|
|
|
SHORTNAME => "\"at\"",
|
|
|
|
FILTERNAME => "\"atsvc\""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
is_deeply(parse_conf("IMPORT bla\n"), {
|
|
|
|
imports => {
|
|
|
|
bla => {
|
|
|
|
NAME => "bla",
|
|
|
|
DATA => "",
|
|
|
|
USED => 0,
|
|
|
|
POS => { FILE => "nofile", LINE => 1 }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
is_deeply(parse_conf("IMPORT bla fn1 fn2 fn3\n"), {
|
|
|
|
imports => {
|
|
|
|
bla => {
|
|
|
|
NAME => "bla",
|
|
|
|
DATA => "fn1 fn2 fn3",
|
|
|
|
USED => 0,
|
|
|
|
POS => { FILE => "nofile", LINE => 1 }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
test_errors("nofile:1: no dissectorname specified\n",
|
|
|
|
sub { parse_conf("IMPORT\n"); } );
|
|
|
|
|
|
|
|
test_errors("nofile:1: incomplete HF_FIELD command\n",
|
|
|
|
sub { parse_conf("HF_FIELD hf_idx\n"); });
|