Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: client/tests/trace_inputs/tricky_filename.py

Issue 1860863002: Update copyright notice from Swarming to LUCI; add AUTHORS and CONTRIBUTORS. (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: . Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « client/tests/trace_inputs/touch_only.py ('k') | client/tests/trace_inputs_smoke_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # coding=utf-8 2 # coding=utf-8
3 # Copyright 2012 The Swarming Authors. All rights reserved. 3 # Copyright 2012 The LUCI Authors. All rights reserved.
4 # Use of this source code is governed under the Apache License, Version 2.0 that 4 # Use of this source code is governed by the Apache v2.0 license that can be
5 # can be found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 import sys 7 import sys
8 8
9 9
10 def main(): 10 def main():
11 """Creates a file name with whitespaces and comma in it.""" 11 """Creates a file name with whitespaces and comma in it."""
12 # We could test ?><:*|"' and chr(1 to 32) on linux. 12 # We could test ?><:*|"' and chr(1 to 32) on linux.
13 # We could test ?<>*|"' on OSX. 13 # We could test ?<>*|"' on OSX.
14 # On Windows, skip the Chinese characters for now as the log parsing code is 14 # On Windows, skip the Chinese characters for now as the log parsing code is
15 # using the current code page to generate the log. 15 # using the current code page to generate the log.
16 if sys.platform == 'win32': 16 if sys.platform == 'win32':
17 filename = u'foo, bar, ~p#o,,ué^t%t .txt' 17 filename = u'foo, bar, ~p#o,,ué^t%t .txt'
18 else: 18 else:
19 filename = u'foo, bar, ~p#o,,ué^t%t 和平.txt' 19 filename = u'foo, bar, ~p#o,,ué^t%t 和平.txt'
20 with open(filename, 'w') as f: 20 with open(filename, 'w') as f:
21 f.write('Bingo!') 21 f.write('Bingo!')
22 return 0 22 return 0
23 23
24 24
25 if __name__ == '__main__': 25 if __name__ == '__main__':
26 sys.exit(main()) 26 sys.exit(main())
OLDNEW
« no previous file with comments | « client/tests/trace_inputs/touch_only.py ('k') | client/tests/trace_inputs_smoke_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698