Net-Pcap-0.18-Adapt-a-test-to-libpcap-1.8.0.patch 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From 52607780c02ee90a93bd40e91c5263e55e7a351c Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
  3. Date: Wed, 5 Oct 2016 15:54:02 +0200
  4. Subject: [PATCH] Adapt a test to libpcap-1.8.0
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. libpcap-1.8.0 changed error message on invalid filter expression from
  9. "syntax error" to "syntax error in filter expression: syntax error".
  10. This patch adjust the t/09-error.t for that.
  11. CPAN RT#117831
  12. Signed-off-by: Petr Písař <ppisar@redhat.com>
  13. ---
  14. t/09-error.t | 2 +-
  15. 1 file changed, 1 insertion(+), 1 deletion(-)
  16. diff --git a/t/09-error.t b/t/09-error.t
  17. index bcd2a13..ef8f0b2 100644
  18. --- a/t/09-error.t
  19. +++ b/t/09-error.t
  20. @@ -22,7 +22,7 @@ is( $@, '', "compile() with an invalid filter string" );
  21. is( $res, -1, " - result must not be null: $res" );
  22. eval { $err = Net::Pcap::geterr($pcap) };
  23. is( $@, '', "geterr()" );
  24. -like( $err, '/^(?:parse|syntax) error$/', " - \$err must not be null: $err" );
  25. +like( $err, '/(?:parse|syntax) error$/', " - \$err must not be null: $err" );
  26. # Testing compile() with a valid filter
  27. eval { $res = Net::Pcap::compile($pcap, \$filter, "tcp", 0, $mask) };
  28. --
  29. 2.7.4