Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | #!/usr/bin/env python |
michael@0 | 2 | |
michael@0 | 3 | # Copyright (c) 2012 Google Inc. All rights reserved. |
michael@0 | 4 | # Use of this source code is governed by a BSD-style license that can be |
michael@0 | 5 | # found in the LICENSE file. |
michael@0 | 6 | |
michael@0 | 7 | """ |
michael@0 | 8 | Test variable expansion of '<!()' syntax commands. |
michael@0 | 9 | """ |
michael@0 | 10 | |
michael@0 | 11 | import os |
michael@0 | 12 | |
michael@0 | 13 | import TestGyp |
michael@0 | 14 | |
michael@0 | 15 | test = TestGyp.TestGyp(format='gypd') |
michael@0 | 16 | |
michael@0 | 17 | expect = test.read('commands.gyp.stdout').replace('\r', '') |
michael@0 | 18 | |
michael@0 | 19 | test.run_gyp('commands.gyp', |
michael@0 | 20 | '--debug', 'variables', |
michael@0 | 21 | stdout=expect, ignore_line_numbers=True) |
michael@0 | 22 | |
michael@0 | 23 | # Verify the commands.gypd against the checked-in expected contents. |
michael@0 | 24 | # |
michael@0 | 25 | # Normally, we should canonicalize line endings in the expected |
michael@0 | 26 | # contents file setting the Subversion svn:eol-style to native, |
michael@0 | 27 | # but that would still fail if multiple systems are sharing a single |
michael@0 | 28 | # workspace on a network-mounted file system. Consequently, we |
michael@0 | 29 | # massage the Windows line endings ('\r\n') in the output to the |
michael@0 | 30 | # checked-in UNIX endings ('\n'). |
michael@0 | 31 | |
michael@0 | 32 | contents = test.read('commands.gypd').replace('\r', '') |
michael@0 | 33 | expect = test.read('commands.gypd.golden').replace('\r', '') |
michael@0 | 34 | if not test.match(contents, expect): |
michael@0 | 35 | print "Unexpected contents of `commands.gypd'" |
michael@0 | 36 | test.diff(expect, contents, 'commands.gypd ') |
michael@0 | 37 | test.fail_test() |
michael@0 | 38 | |
michael@0 | 39 | test.pass_test() |