gyptest-slash.py 1.4 KB

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