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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 "foo.js", | 467 "foo.js", |
468 "foo.mm", | 468 "foo.mm", |
469 "foo.php", | 469 "foo.php", |
470 "foo.pl", | 470 "foo.pl", |
471 "foo.pm", | 471 "foo.pm", |
472 "foo.rb", | 472 "foo.rb", |
473 "foo.sh", | 473 "foo.sh", |
474 "foo.txt", | 474 "foo.txt", |
475 "foo.xhtml", | 475 "foo.xhtml", |
476 "foo.y", | 476 "foo.y", |
477 os.path.join("Source", "WebCore", "inspector", "front-end", "inspecto
r.js"), | 477 os.path.join("Source", "WebCore", "inspector", "front-end", "Main.js"
), |
478 os.path.join("Tools", "Scripts", "check-webkit-style"), | 478 os.path.join("Tools", "Scripts", "check-webkit-style"), |
479 ] | 479 ] |
480 | 480 |
481 for path in paths: | 481 for path in paths: |
482 self.assert_checker_text(path) | 482 self.assert_checker_text(path) |
483 | 483 |
484 # Check checker attributes on a typical input. | 484 # Check checker attributes on a typical input. |
485 file_base = "foo" | 485 file_base = "foo" |
486 file_extension = "css" | 486 file_extension = "css" |
487 file_path = file_base + "." + file_extension | 487 file_path = file_base + "." + file_extension |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
809 """Test that carriage returns aren't stripped from files that are allowe
d to contain them.""" | 809 """Test that carriage returns aren't stripped from files that are allowe
d to contain them.""" |
810 file_path = 'carriage_returns_allowed.txt' | 810 file_path = 'carriage_returns_allowed.txt' |
811 lines = ['line1\r', 'line2\r'] | 811 lines = ['line1\r', 'line2\r'] |
812 line_numbers = [100] | 812 line_numbers = [100] |
813 self._processor.process(lines=lines, | 813 self._processor.process(lines=lines, |
814 file_path=file_path, | 814 file_path=file_path, |
815 line_numbers=line_numbers) | 815 line_numbers=line_numbers) |
816 # The carriage return checker should never have been invoked, and so | 816 # The carriage return checker should never have been invoked, and so |
817 # should not have saved off any lines. | 817 # should not have saved off any lines. |
818 self.assertFalse(hasattr(self.carriage_checker, 'lines')) | 818 self.assertFalse(hasattr(self.carriage_checker, 'lines')) |
OLD | NEW |