blob: a6f291e90ecc173af0dc2aca2bc13aa7b38d4de3 [file] [log] [blame]
David Rochberg7c79a812011-01-19 14:24:45 -05001#!/usr/bin/python
2# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5import subprocess
6import unittest
7
8import builder
9
10
11class BuilderTest(unittest.TestCase):
12 def testOutputOf(self):
13 self.assertRaises(subprocess.CalledProcessError,
14 builder._OutputOf, ['/bin/false'])
15
16 hello = 'hello, world'
17 self.assertEqual(hello + '\n',
18 builder._OutputOf(['/bin/echo', hello]))
19
20
21if __name__ == '__main__':
22 unittest.main()