Make sure all files have trailing newline (#5076)

* Make sure all files have trailing newline.

* Adjust tests.
This commit is contained in:
Felix Fontein 2022-08-05 21:08:41 +02:00 committed by GitHub
parent 79b201ae49
commit fa6c009ff0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
195 changed files with 236 additions and 173 deletions

View file

@ -5,4 +5,4 @@ options:
"option": "up",
"state": "present",
"value": "route add -net 224.0.0.0 netmask 240.0.0.0 dev aggi"
}
}

View file

@ -14,4 +14,4 @@ options:
"option": "up",
"state": "present",
"value": "route add -net 224.0.0.0 netmask 240.0.0.0 dev aggi"
}
}

View file

@ -14,4 +14,4 @@ options:
"option": "up",
"state": "absent",
"value": null
}
}

View file

@ -14,4 +14,4 @@ options:
"option": "up",
"state": "present",
"value": "route add -net 224.0.0.0 netmask 240.0.0.0 dev aggi"
}
}

View file

@ -5,4 +5,4 @@ options:
"option": "method",
"state": "present",
"value": "dhcp"
}
}

View file

@ -5,4 +5,4 @@ options:
"option": "mtu",
"state": "present",
"value": "1350"
}
}

View file

@ -5,4 +5,4 @@ options:
"option": "slaves",
"state": "present",
"value": "int1 int3"
}
}

View file

@ -5,4 +5,4 @@ options:
"option": "up",
"state": "present",
"value": "route add -net 224.0.0.0 netmask 240.0.0.0 dev aggi"
}
}

View file

@ -14,4 +14,4 @@ options:
"option": "up",
"state": "present",
"value": "route add -net 224.0.0.0 netmask 240.0.0.0 dev aggi"
}
}

View file

@ -14,4 +14,4 @@ options:
"option": "up",
"state": "absent",
"value": null
}
}

View file

@ -14,4 +14,4 @@ options:
"option": "up",
"state": "present",
"value": "route add -net 224.0.0.0 netmask 240.0.0.0 dev aggi"
}
}

View file

@ -6,4 +6,4 @@ options:
"option": "address",
"state": "present",
"value": "fc00::42"
}
}

View file

@ -6,4 +6,4 @@ options:
"option": "post-up",
"state": "present",
"value": "XXXX_ipv6"
}
}

View file

@ -6,4 +6,4 @@ options:
"option": "pre-up",
"state": "present",
"value": "XXXX_ipv6"
}
}

View file

@ -5,4 +5,4 @@ options:
"option": "method",
"state": "present",
"value": "dhcp"
}
}

View file

@ -5,4 +5,4 @@ options:
"option": "mtu",
"state": "present",
"value": "1350"
}
}

View file

@ -5,4 +5,4 @@ options:
"option": "slaves",
"state": "present",
"value": "int1 int3"
}
}

View file

@ -6,4 +6,4 @@ options:
"option": "address",
"state": "present",
"value": "192.168.0.42"
}
}

View file

@ -6,4 +6,4 @@ options:
"option": "post-up",
"state": "present",
"value": "XXXX_ipv4"
}
}

View file

@ -6,4 +6,4 @@ options:
"option": "pre-up",
"state": "present",
"value": "XXXX_ipv4"
}
}

View file

@ -6,4 +6,4 @@ options:
"option": "address",
"state": "present",
"value": "fc00::42"
}
}

View file

@ -6,4 +6,4 @@ options:
"option": "post-up",
"state": "present",
"value": "XXXX_ipv6"
}
}

View file

@ -6,4 +6,4 @@ options:
"option": "pre-up",
"state": "present",
"value": "XXXX_ipv6"
}
}

View file

@ -5,4 +5,4 @@ options:
"option": "mtu",
"state": "absent",
"value": "1350"
}
}

View file

@ -5,4 +5,4 @@ options:
"option": "mtu",
"state": "present",
"value": "1350"
}
}

View file

@ -6,4 +6,4 @@ options:
"option": "address",
"state": "present",
"value": "192.168.0.42"
}
}

View file

@ -6,4 +6,4 @@ options:
"option": "post-up",
"state": "present",
"value": "XXXX_ipv4"
}
}

View file

@ -6,4 +6,4 @@ options:
"option": "pre-up",
"state": "present",
"value": "XXXX_ipv4"
}
}

View file

@ -6,4 +6,4 @@ options:
"option": "address",
"state": "present",
"value": "fc00::42"
}
}

View file

@ -6,4 +6,4 @@ options:
"option": "post-up",
"state": "present",
"value": "XXXX_ipv6"
}
}

View file

@ -6,4 +6,4 @@ options:
"option": "pre-up",
"state": "present",
"value": "XXXX_ipv6"
}
}

View file

@ -5,4 +5,4 @@ options:
"option": "method",
"state": "present",
"value": "dhcp"
}
}

View file

@ -5,4 +5,4 @@ options:
"option": "mtu",
"state": "absent",
"value": "1350"
}
}

View file

@ -5,4 +5,4 @@ options:
"option": "mtu",
"state": "present",
"value": "1350"
}
}

View file

@ -77,6 +77,8 @@ class TestInterfacesFileModule(unittest.TestCase):
def compareStringWithFile(self, string, path):
# self.assertEqual("","_",msg=path)
testfilepath = os.path.join(golden_output_path, path)
if string and not string.endswith('\n'):
string += '\n'
goldenstring = string
if not os.path.isfile(testfilepath):
f = io.open(testfilepath, 'wb')