From: Aurelien Aptel Date: Wed, 18 May 2016 12:23:56 +0000 (+0200) Subject: pidl/ws: fix failing tests X-Git-Tag: tdb-1.3.10~763 X-Git-Url: http://git.samba.org/samba.git/?a=commitdiff_plain;h=0757c57d9941b0df8e92c92fc2dde69399336512;p=vlendec%2Fsamba-autobuild%2F.git pidl/ws: fix failing tests This commit fixes 2 test failures in Pidl test suite. - commit 02cd7808 changed the error the test was expecting => update expected output in the test - commit c76b65e changed whitespaces in the output => revert to the old output in the generator Signed-off-by: Aurelien Aptel Reviewed-by: Stefan Metzmacher Reviewed-by: David Disseldorp --- diff --git a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm index d2b9f64de5b..72a144f09f7 100644 --- a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm +++ b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm @@ -1293,9 +1293,8 @@ sub DumpHfList($) foreach (sort {$a->{INDEX} cmp $b->{INDEX}} values %{$self->{conformance}->{header_fields}}) { - $res .= "\t{ &$_->{INDEX}, - { ".make_str($_->{NAME}).", ".make_str($_->{FILTER}).", $_->{FT_TYPE}, $_->{BASE_TYPE}, $_->{VALSSTRING}, $_->{MASK}, ".make_str_or_null($_->{BLURB}).", HFILL }}, -"; + $res .= "\t{ &$_->{INDEX},\n". + "\t { ".make_str($_->{NAME}).", ".make_str($_->{FILTER}).", $_->{FT_TYPE}, $_->{BASE_TYPE}, $_->{VALSSTRING}, $_->{MASK}, ".make_str_or_null($_->{BLURB}).", HFILL }},\n"; } return $res."\t};\n"; diff --git a/pidl/tests/wireshark-conf.pl b/pidl/tests/wireshark-conf.pl index a8e33dfecd4..fff89f6fe0e 100755 --- a/pidl/tests/wireshark-conf.pl +++ b/pidl/tests/wireshark-conf.pl @@ -60,7 +60,7 @@ is_deeply(parse_conf("FIELD_DESCRIPTION foo my description\n"), 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", +test_warnings("nofile:1: CODE END outside CODE section\n", sub { parse_conf("CODE END\n"); } ); is_deeply(parse_conf("TYPE winreg_String dissect_myminregstring(); FT_STRING BASE_DEC 0 0 2\n"), { types => { winreg_String => {