1# Copyright (c) 2014 The Chromium Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5import unittest 6 7from tracing_build import check_common 8 9 10class CheckCommonUnitTest(unittest.TestCase): 11 12 def testFilesSorted(self): 13 error = check_common.CheckListedFilesSorted('foo.gyp', 'tracing_pdf_files', 14 ['/dir/file.pdf', 15 '/dir/another_file.pdf']) 16 expected_error = '''In group tracing_pdf_files from file foo.gyp,\ 17 filenames aren't sorted. 18 19First mismatch: 20 /dir/file.pdf 21 22Current listing: 23 /dir/file.pdf 24 /dir/another_file.pdf 25 26Correct listing: 27 /dir/another_file.pdf 28 /dir/file.pdf\n\n''' 29 assert error == expected_error 30