183690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.org#!/usr/bin/env python 283690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.org 383690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.org# Copyright (c) 2011 Google Inc. All rights reserved. 483690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.org# Use of this source code is governed by a BSD-style license that can be 583690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.org# found in the LICENSE file. 683690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.org 783690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.org""" 883690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.orgVerifies file copies with a trailing slash in the destination directory. 983690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.org""" 1083690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.org 1183690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.orgimport TestGyp 1283690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.org 1383690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.orgtest = TestGyp.TestGyp() 1483690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.orgtest.run_gyp('copies-slash.gyp', chdir='src') 1583690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.orgtest.relocate('src', 'relocate/src') 1683690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.orgtest.build('copies-slash.gyp', chdir='relocate/src') 1783690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.org 1883690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.orgtest.built_file_must_match('copies-out-slash/directory/file3', 1983690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.org 'file3 contents\n', 2083690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.org chdir='relocate/src') 2183690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.orgtest.built_file_must_match('copies-out-slash/directory/file4', 2283690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.org 'file4 contents\n', 2383690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.org chdir='relocate/src') 2483690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.orgtest.built_file_must_match('copies-out-slash/directory/subdir/file5', 2583690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.org 'file5 contents\n', 2683690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.org chdir='relocate/src') 2783690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.org 2883690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.orgtest.built_file_must_match('copies-out-slash-2/directory/file3', 2983690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.org 'file3 contents\n', 3083690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.org chdir='relocate/src') 3183690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.orgtest.built_file_must_match('copies-out-slash-2/directory/file4', 3283690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.org 'file4 contents\n', 3383690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.org chdir='relocate/src') 3483690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.orgtest.built_file_must_match('copies-out-slash-2/directory/subdir/file5', 3583690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.org 'file5 contents\n', 3683690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.org chdir='relocate/src') 3783690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.org 3883690500c08123255c363ee1fe1d97f3b16b7578thakis@chromium.orgtest.pass_test() 39