OLD | NEW |
1 # -*- coding: utf-8; -*- | 1 # -*- coding: utf-8; -*- |
2 # | 2 # |
3 # Copyright (C) 2009 Google Inc. All rights reserved. | 3 # Copyright (C) 2009 Google Inc. All rights reserved. |
4 # Copyright (C) 2009 Torch Mobile Inc. | 4 # Copyright (C) 2009 Torch Mobile Inc. |
5 # Copyright (C) 2009 Apple Inc. All rights reserved. | 5 # Copyright (C) 2009 Apple Inc. All rights reserved. |
6 # Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.com) | 6 # Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.com) |
7 # | 7 # |
8 # Redistribution and use in source and binary forms, with or without | 8 # Redistribution and use in source and binary forms, with or without |
9 # modification, are permitted provided that the following conditions are | 9 # modification, are permitted provided that the following conditions are |
10 # met: | 10 # met: |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 # drawn from the _SKIPPED_FILES_WITHOUT_WARNING configuration | 349 # drawn from the _SKIPPED_FILES_WITHOUT_WARNING configuration |
350 # variable. | 350 # variable. |
351 path = os.path.join('LayoutTests', 'foo.txt') | 351 path = os.path.join('LayoutTests', 'foo.txt') |
352 self._assert_should_skip_without_warning(path, | 352 self._assert_should_skip_without_warning(path, |
353 is_checker_none=False, | 353 is_checker_none=False, |
354 expected=True) | 354 expected=True) |
355 | 355 |
356 def test_should_skip_without_warning__false(self): | 356 def test_should_skip_without_warning__false(self): |
357 """Test should_skip_without_warning() for False return values.""" | 357 """Test should_skip_without_warning() for False return values.""" |
358 paths = ['foo.txt', | 358 paths = ['foo.txt', |
| 359 os.path.join('LayoutTests', 'TestExpectations'), |
359 ] | 360 ] |
360 | 361 |
361 for path in paths: | 362 for path in paths: |
362 self._assert_should_skip_without_warning(path, | 363 self._assert_should_skip_without_warning(path, |
363 is_checker_none=False, | 364 is_checker_none=False, |
364 expected=False) | 365 expected=False) |
365 | 366 |
366 | 367 |
367 class CheckerDispatcherCarriageReturnTest(unittest.TestCase): | 368 class CheckerDispatcherCarriageReturnTest(unittest.TestCase): |
368 def test_should_check_and_strip_carriage_returns(self): | 369 def test_should_check_and_strip_carriage_returns(self): |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 """Test that carriage returns aren't stripped from files that are allowe
d to contain them.""" | 860 """Test that carriage returns aren't stripped from files that are allowe
d to contain them.""" |
860 file_path = 'carriage_returns_allowed.txt' | 861 file_path = 'carriage_returns_allowed.txt' |
861 lines = ['line1\r', 'line2\r'] | 862 lines = ['line1\r', 'line2\r'] |
862 line_numbers = [100] | 863 line_numbers = [100] |
863 self._processor.process(lines=lines, | 864 self._processor.process(lines=lines, |
864 file_path=file_path, | 865 file_path=file_path, |
865 line_numbers=line_numbers) | 866 line_numbers=line_numbers) |
866 # The carriage return checker should never have been invoked, and so | 867 # The carriage return checker should never have been invoked, and so |
867 # should not have saved off any lines. | 868 # should not have saved off any lines. |
868 self.assertFalse(hasattr(self.carriage_checker, 'lines')) | 869 self.assertFalse(hasattr(self.carriage_checker, 'lines')) |
OLD | NEW |