OLD | NEW |
1 # Copyright (C) 2009 Google Inc. All rights reserved. | 1 # Copyright (C) 2009 Google Inc. All rights reserved. |
2 # Copyright (C) 2012 Intel Corporation. All rights reserved. | 2 # Copyright (C) 2012 Intel Corporation. All rights reserved. |
3 # | 3 # |
4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
6 # met: | 6 # met: |
7 # | 7 # |
8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
(...skipping 12 matching lines...) Expand all Loading... |
23 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
24 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 | 29 |
30 import optparse | 30 import optparse |
31 import unittest | 31 import unittest |
32 | 32 |
33 from webkitpy.common.system.outputcapture import OutputCapture | 33 from webkitpy.common.system.output_capture import OutputCapture |
34 from webkitpy.tool.commands.queries import PrintBaselines, PrintExpectations | 34 from webkitpy.tool.commands.queries import PrintBaselines, PrintExpectations |
35 from webkitpy.tool.mock_tool import MockWebKitPatch | 35 from webkitpy.tool.mock_tool import MockWebKitPatch |
36 | 36 |
37 | 37 |
38 class PrintExpectationsTest(unittest.TestCase): | 38 class PrintExpectationsTest(unittest.TestCase): |
39 | 39 |
40 def run_test(self, tests, expected_stdout, platform='test-win-win7', **kwarg
s): | 40 def run_test(self, tests, expected_stdout, platform='test-win-win7', **kwarg
s): |
41 options_defaults = { | 41 options_defaults = { |
42 'all': False, 'csv': False, 'full': False, 'platform': platform, | 42 'all': False, 'csv': False, 'full': False, 'platform': platform, |
43 'include_keyword': [], 'exclude_keyword': [], 'paths': False, | 43 'include_keyword': [], 'exclude_keyword': [], 'paths': False, |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 | 165 |
166 def test_csv(self): | 166 def test_csv(self): |
167 command = PrintBaselines() | 167 command = PrintBaselines() |
168 self.capture_output() | 168 self.capture_output() |
169 options = optparse.Values({'all': False, 'platform': '*win7', 'csv': Tru
e, 'include_virtual_tests': False}) | 169 options = optparse.Values({'all': False, 'platform': '*win7', 'csv': Tru
e, 'include_virtual_tests': False}) |
170 command.execute(options, ['passes/text.html'], self.tool) | 170 command.execute(options, ['passes/text.html'], self.tool) |
171 stdout, _, _ = self.restore_output() | 171 stdout, _, _ = self.restore_output() |
172 self.assertMultiLineEqual(stdout, | 172 self.assertMultiLineEqual(stdout, |
173 ('test-win-win7,passes/text.html,None,png,pass
es/text-expected.png,None\n' | 173 ('test-win-win7,passes/text.html,None,png,pass
es/text-expected.png,None\n' |
174 'test-win-win7,passes/text.html,None,txt,pass
es/text-expected.txt,None\n')) | 174 'test-win-win7,passes/text.html,None,txt,pass
es/text-expected.txt,None\n')) |
OLD | NEW |