OLD | NEW |
---|---|
(Empty) | |
1 #!/usr/bin/env python | |
2 | |
3 # Copyright (c) 2009 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 that copying files preserves file attributes. | |
9 """ | |
10 | |
11 import TestGyp | |
12 | |
13 import os | |
14 | |
15 test = TestGyp.TestGyp() | |
16 | |
17 test.run_gyp('copies-attribs.gyp', chdir='src') | |
18 | |
19 test.build('copies-attribs.gyp', chdir='src') | |
20 | |
21 out_path = test.built_file_path('executable-file.sh', chdir='src') | |
22 test.must_contain(out_path, | |
23 '#!/bin/bash\n' | |
24 '\n' | |
25 'echo echo echo echo cho ho o o\n') | |
26 | |
27 in_stat = os.stat('src/executable-file.sh') | |
28 out_stat = os.stat(out_path) | |
29 | |
30 if in_stat.st_mode != out_stat.st_mode: | |
Mark Mentovai
2013/11/06 02:50:40
Fix me too.
Nico
2013/11/06 02:58:16
Done.
| |
31 test.fail_test() | |
32 | |
33 test.pass_test() | |
OLD | NEW |