Home | History | Annotate | Download | only in copies
      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 """
      8 Verifies file copies with a trailing slash in the destination directory.
      9 """
     10 
     11 import TestGyp
     12 
     13 test = TestGyp.TestGyp()
     14 test.run_gyp('copies-slash.gyp', chdir='src')
     15 
     16 test.relocate('src', 'relocate/src')
     17 test.build('copies-slash.gyp', chdir='relocate/src')
     18 
     19 test.built_file_must_match('copies-out-slash/directory/file3',
     20                            'file3 contents\n',
     21                            chdir='relocate/src')
     22 test.built_file_must_match('copies-out-slash/directory/file4',
     23                            'file4 contents\n',
     24                            chdir='relocate/src')
     25 test.built_file_must_match('copies-out-slash/directory/subdir/file5',
     26                            'file5 contents\n',
     27                            chdir='relocate/src')
     28 
     29 test.built_file_must_match('copies-out-slash-2/directory/file3',
     30                            'file3 contents\n',
     31                            chdir='relocate/src')
     32 test.built_file_must_match('copies-out-slash-2/directory/file4',
     33                            'file4 contents\n',
     34                            chdir='relocate/src')
     35 test.built_file_must_match('copies-out-slash-2/directory/subdir/file5',
     36                            'file5 contents\n',
     37                            chdir='relocate/src')
     38 
     39 test.pass_test()
     40