1b8fa6e8f445416533cae5cfe77f5997c1cbf0ca2bradnelson@google.com#!/usr/bin/env python
2b8fa6e8f445416533cae5cfe77f5997c1cbf0ca2bradnelson@google.com
33afe3277af466c60b6d35a56f578c09a4c5f4c98sbc@chromium.org# Copyright (c) 2012 Google Inc. All rights reserved.
4b8fa6e8f445416533cae5cfe77f5997c1cbf0ca2bradnelson@google.com# Use of this source code is governed by a BSD-style license that can be
5b8fa6e8f445416533cae5cfe77f5997c1cbf0ca2bradnelson@google.com# found in the LICENSE file.
6b8fa6e8f445416533cae5cfe77f5997c1cbf0ca2bradnelson@google.com
7b8fa6e8f445416533cae5cfe77f5997c1cbf0ca2bradnelson@google.com"""
8b8fa6e8f445416533cae5cfe77f5997c1cbf0ca2bradnelson@google.comTest variable expansion of '<|(list.txt ...)' syntax commands.
9b8fa6e8f445416533cae5cfe77f5997c1cbf0ca2bradnelson@google.com"""
10b8fa6e8f445416533cae5cfe77f5997c1cbf0ca2bradnelson@google.com
11b8fa6e8f445416533cae5cfe77f5997c1cbf0ca2bradnelson@google.comimport os
12b8fa6e8f445416533cae5cfe77f5997c1cbf0ca2bradnelson@google.comimport sys
13b8fa6e8f445416533cae5cfe77f5997c1cbf0ca2bradnelson@google.com
14b8fa6e8f445416533cae5cfe77f5997c1cbf0ca2bradnelson@google.comimport TestGyp
15b8fa6e8f445416533cae5cfe77f5997c1cbf0ca2bradnelson@google.com
16f6352e8f02fe8c707032c1e26753253c23467857thakis@chromium.orgtest = TestGyp.TestGyp()
17b8fa6e8f445416533cae5cfe77f5997c1cbf0ca2bradnelson@google.com
18f6352e8f02fe8c707032c1e26753253c23467857thakis@chromium.orgCHDIR = 'src'
19f6352e8f02fe8c707032c1e26753253c23467857thakis@chromium.orgtest.run_gyp('filelist2.gyp', chdir=CHDIR)
20b8fa6e8f445416533cae5cfe77f5997c1cbf0ca2bradnelson@google.com
21f6352e8f02fe8c707032c1e26753253c23467857thakis@chromium.orgtest.build('filelist2.gyp', 'foo', chdir=CHDIR)
22f6352e8f02fe8c707032c1e26753253c23467857thakis@chromium.orgcontents = test.read('src/dummy_foo').replace('\r', '')
23b8fa6e8f445416533cae5cfe77f5997c1cbf0ca2bradnelson@google.comexpect = 'John\nJacob\nJingleheimer\nSchmidt\n'
24b8fa6e8f445416533cae5cfe77f5997c1cbf0ca2bradnelson@google.comif not test.match(contents, expect):
25f6352e8f02fe8c707032c1e26753253c23467857thakis@chromium.org  print "Unexpected contents of `src/dummy_foo'"
26f6352e8f02fe8c707032c1e26753253c23467857thakis@chromium.org  test.diff(expect, contents, 'src/dummy_foo')
27b8fa6e8f445416533cae5cfe77f5997c1cbf0ca2bradnelson@google.com  test.fail_test()
28072660db6ec1fafc1e0997439b5015913f0b9aa5scottmg@chromium.org
29072660db6ec1fafc1e0997439b5015913f0b9aa5scottmg@chromium.orgtest.pass_test()
30