1#!/usr/bin/env python 2 3# Copyright (c) 2011 Google Inc. All rights reserved. 4# Use of this source code is governed by a BSD-style license that can be 5# found in the LICENSE file. 6 7""" 8Verifies file copies with a trailing slash in the destination directory. 9""" 10 11import TestGyp 12 13test = TestGyp.TestGyp() 14test.run_gyp('copies-slash.gyp', chdir='src') 15 16test.relocate('src', 'relocate/src') 17test.build('copies-slash.gyp', chdir='relocate/src') 18 19test.built_file_must_match('copies-out-slash/directory/file3', 20 'file3 contents\n', 21 chdir='relocate/src') 22test.built_file_must_match('copies-out-slash/directory/file4', 23 'file4 contents\n', 24 chdir='relocate/src') 25test.built_file_must_match('copies-out-slash/directory/subdir/file5', 26 'file5 contents\n', 27 chdir='relocate/src') 28 29test.built_file_must_match('copies-out-slash-2/directory/file3', 30 'file3 contents\n', 31 chdir='relocate/src') 32test.built_file_must_match('copies-out-slash-2/directory/file4', 33 'file4 contents\n', 34 chdir='relocate/src') 35test.built_file_must_match('copies-out-slash-2/directory/subdir/file5', 36 'file5 contents\n', 37 chdir='relocate/src') 38 39test.pass_test() 40