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

Side by Side Diff: test/win/gyptest-command-quote.py

Issue 1454433002: Python 3 compatibility Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Rebase with master (4ec6c4e3a94bd04a6da2858163d40b2429b8aad1) 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
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright (c) 2012 Google Inc. All rights reserved. 3 # Copyright (c) 2012 Google Inc. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """ 7 """
8 8
9 Make sure the program in a command can be a called batch file, or an 9 Make sure the program in a command can be a called batch file, or an
10 application in the path. Specifically, this means not quoting something like 10 application in the path. Specifically, this means not quoting something like
11 "call x.bat", lest the shell look for a program named "call x.bat", rather 11 "call x.bat", lest the shell look for a program named "call x.bat", rather
12 than calling "x.bat". 12 than calling "x.bat".
13 """ 13 """
14 14
15 from __future__ import print_function
16
15 import TestGyp 17 import TestGyp
16 18
17 import sys 19 import sys
18 20
19 if sys.platform == 'win32': 21 if sys.platform == 'win32':
20 print "This test is currently disabled: https://crbug.com/483696." 22 print("This test is currently disabled: https://crbug.com/483696.")
21 sys.exit(0) 23 sys.exit(0)
22 24
23 test = TestGyp.TestGyp(formats=['msvs', 'ninja']) 25 test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
24 CHDIR = 'command-quote' 26 CHDIR = 'command-quote'
25 test.run_gyp('command-quote.gyp', chdir=CHDIR) 27 test.run_gyp('command-quote.gyp', chdir=CHDIR)
26 28
27 test.build('command-quote.gyp', 'test_batch', chdir=CHDIR) 29 test.build('command-quote.gyp', 'test_batch', chdir=CHDIR)
28 test.build('command-quote.gyp', 'test_call_separate', chdir=CHDIR) 30 test.build('command-quote.gyp', 'test_call_separate', chdir=CHDIR)
29 test.build('command-quote.gyp', 'test_with_double_quotes', chdir=CHDIR) 31 test.build('command-quote.gyp', 'test_with_double_quotes', chdir=CHDIR)
30 test.build('command-quote.gyp', 'test_with_single_quotes', chdir=CHDIR) 32 test.build('command-quote.gyp', 'test_with_single_quotes', chdir=CHDIR)
31 33
32 # We confirm that this fails because other generators don't handle spaces in 34 # We confirm that this fails because other generators don't handle spaces in
33 # inputs so it's preferable to not have it work here. 35 # inputs so it's preferable to not have it work here.
34 test.build('command-quote.gyp', 'test_with_spaces', chdir=CHDIR, status=1) 36 test.build('command-quote.gyp', 'test_with_spaces', chdir=CHDIR, status=1)
35 37
36 CHDIR = 'command-quote/subdir/and/another' 38 CHDIR = 'command-quote/subdir/and/another'
37 test.run_gyp('in-subdir.gyp', chdir=CHDIR) 39 test.run_gyp('in-subdir.gyp', chdir=CHDIR)
38 test.build('in-subdir.gyp', 'test_batch_depth', chdir=CHDIR) 40 test.build('in-subdir.gyp', 'test_batch_depth', chdir=CHDIR)
39 41
40 test.pass_test() 42 test.pass_test()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698