Index: builder_test.py |
diff --git a/builder_test.py b/builder_test.py |
new file mode 100755 |
index 0000000000000000000000000000000000000000..a6f291e90ecc173af0dc2aca2bc13aa7b38d4de3 |
--- /dev/null |
+++ b/builder_test.py |
@@ -0,0 +1,22 @@ |
+#!/usr/bin/python |
+# Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
+# Use of this source code is governed by a BSD-style license that can be |
+# found in the LICENSE file. |
+import subprocess |
+import unittest |
+ |
+import builder |
+ |
+ |
+class BuilderTest(unittest.TestCase): |
+ def testOutputOf(self): |
+ self.assertRaises(subprocess.CalledProcessError, |
+ builder._OutputOf, ['/bin/false']) |
+ |
+ hello = 'hello, world' |
+ self.assertEqual(hello + '\n', |
+ builder._OutputOf(['/bin/echo', hello])) |
+ |
+ |
+if __name__ == '__main__': |
+ unittest.main() |