From 5e5e5c50cdcafb7df27cfe17a8bfe7e5da42b77e Mon Sep 17 00:00:00 2001
From: Jan Vansteenkiste <jan@vstone.eu>
Date: Wed, 22 Aug 2012 18:00:37 +0200
Subject: [PATCH] Added fixtures to test parsing negated addresses

---
 spec/fixtures/iptables/conversion_hash.rb | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/spec/fixtures/iptables/conversion_hash.rb b/spec/fixtures/iptables/conversion_hash.rb
index 580dc48..8fb77b0 100644
--- a/spec/fixtures/iptables/conversion_hash.rb
+++ b/spec/fixtures/iptables/conversion_hash.rb
@@ -89,6 +89,22 @@ ARGS_TO_HASH = {
       :destination => '2001:db8:4321::/48',
     },
   },
+  'source_destination_negate_source' => {
+    :line => '-A INPUT -s ! 1.1.1.1 -d 2.2.2.2 -m comment --comment "000 negated source address"',
+    :table => 'filter',
+    :params => {
+      :source => '! 1.1.1.1/32',
+      :destination => '2.2.2.2/32',
+    },
+  },
+  'source_destination_negate_destination' => {
+    :line => '-A INPUT -s 1.1.1.1 -d ! 2.2.2.2 -m comment --comment "000 negated destination address"',
+    :table => 'filter',
+    :params => {
+      :source => '1.1.1.1/32',
+      :destination => '! 2.2.2.2/32',
+    },
+  },
   'dport_range_1' => {
     :line => '-A INPUT -m multiport --dports 1:1024 -m comment --comment "000 allow foo"',
     :table => 'filter',
-- 
2.45.2