commit 13e8347293a7ace684f3f75d53c1ce73b26b5b44
Author: Michal Srb <msrb(a)redhat.com>
Date: Fri May 1 21:01:18 2015 +0200
[test] Add test for builddep
test/builddep/compat | 8 ++++++++
test/builddep_test.py | 19 +++++++++++++++++++
2 files changed, 27 insertions(+), 0 deletions(-)
---
diff --git a/test/builddep/compat b/test/builddep/compat
new file mode 100644
index 0000000..b393898
--- /dev/null
+++ b/test/builddep/compat
@@ -0,0 +1,8 @@
+<!-- Build dependencies generated by XMvn -->
+<dependencies>
+ <dependency>
+ <groupId>org.codehaus.groovy</groupId>
+ <artifactId>groovy</artifactId>
+ <version>1.8.9</version>
+ </dependency>
+</dependencies>
diff --git a/test/builddep_test.py b/test/builddep_test.py
new file mode 100644
index 0000000..20aa78c
--- /dev/null
+++ b/test/builddep_test.py
@@ -0,0 +1,19 @@
+import unittest
+from test_common import javautils_script
+
+
+class TestBuilddep(unittest.TestCase):
+
+ cmd = "builddep"
+ p = "../test/builddep/"
+
+ @javautils_script(cmd, [p + "compat"])
+ def test_compat(self, stdout, stderr, return_value):
+ self.assertEqual(return_value, 0)
+ sout = [x for x in stdout.split('\n') if x]
+ want = ("mvn(org.codehaus.groovy:groovy:1.8.9)",)
+ self.assertEqual(set(want), set(sout))
+
+
+if __name__ == '__main__':
+ unittest.main()
Show replies by date