summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Scherer <misc@zarb.org>2013-08-23 12:58:10 +0200
committerMichael Scherer <misc@zarb.org>2013-08-23 12:58:10 +0200
commit64d35cb3b62224b9651287ab1179900d91a1939c (patch)
tree444737a814a9c46722a2e43f2fa38585beb472d8
parent4f69b63fec02b2a1a4abedc49eafa0d14d4807dc (diff)
downloadansible-64d35cb3b62224b9651287ab1179900d91a1939c.tar.gz
test that using non ordered range of char send a exception
-rw-r--r--test/TestInventory.py4
-rw-r--r--test/inventory/test_alpha_end_before_beg2
2 files changed, 6 insertions, 0 deletions
diff --git a/test/TestInventory.py b/test/TestInventory.py
index 53c8107467..f2035231d4 100644
--- a/test/TestInventory.py
+++ b/test/TestInventory.py
@@ -282,6 +282,10 @@ class TestInventory(unittest.TestCase):
def test_incorrect_format(self):
Inventory(os.path.join(self.test_dir, 'inventory','test_incorrect_format'))
+ @raises(errors.AnsibleError)
+ def test_alpha_end_before_beg(self):
+ Inventory(os.path.join(self.test_dir, 'inventory','test_alpha_end_before_beg'))
+
###################################################
### Inventory API tests
diff --git a/test/inventory/test_alpha_end_before_beg b/test/inventory/test_alpha_end_before_beg
new file mode 100644
index 0000000000..1b7a478d87
--- /dev/null
+++ b/test/inventory/test_alpha_end_before_beg
@@ -0,0 +1,2 @@
+[test]
+host[Z:T]