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

Side by Side Diff: tests/patches_data.py

Issue 8066012: Share more data between checkout_test and patches_data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « tests/patch_test.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Samples patches to test patch.py.""" 5 """Samples patches to test patch.py."""
6 6
7 7
8 class RAW(object): 8 class RAW(object):
9 PATCH = ( 9 PATCH = (
10 'Index: chrome/file.cc\n' 10 'Index: chrome/file.cc\n'
11 '===================================================================\n' 11 '===================================================================\n'
12 '--- chrome/file.cc\t(revision 74690)\n' 12 '--- chrome/file.cc\t(revision 74690)\n'
13 '+++ chrome/file.cc\t(working copy)\n' 13 '+++ chrome/file.cc\t(working copy)\n'
14 '@@ -80,10 +80,13 @@\n' 14 '@@ -3,6 +3,7 @@ bb\n'
15 ' // Foo\n' 15 ' ccc\n'
16 ' // Bar\n' 16 ' dd\n'
17 ' void foo() {\n' 17 ' e\n'
18 '- return bar;\n' 18 '+FOO!\n'
19 '+ return foo;\n' 19 ' ff\n'
20 ' }\n' 20 ' ggg\n'
21 ' \n' 21 ' hh\n')
22 ' \n')
23 22
24 NEW = ( 23 NEW = (
25 '--- /dev/null\n' 24 '--- /dev/null\n'
26 '+++ foo\n' 25 '+++ foo\n'
27 '@@ -0,0 +1 @@\n' 26 '@@ -0,0 +1 @@\n'
28 '+bar\n') 27 '+bar\n')
29 28
30 NEW_NOT_NULL = ( 29 NEW_NOT_NULL = (
31 '--- file_a\n' 30 '--- file_a\n'
32 '+++ file_a\n' 31 '+++ file_a\n'
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 '+bar\n') 163 '+bar\n')
165 164
166 NEW_EXE = ( 165 NEW_EXE = (
167 'diff --git a/natsort_test.py b/natsort_test.py\n' 166 'diff --git a/natsort_test.py b/natsort_test.py\n'
168 'new file mode 100755\n' 167 'new file mode 100755\n'
169 '--- /dev/null\n' 168 '--- /dev/null\n'
170 '+++ b/natsort_test.py\n' 169 '+++ b/natsort_test.py\n'
171 '@@ -0,0 +1,1 @@\n' 170 '@@ -0,0 +1,1 @@\n'
172 '+#!/usr/bin/env python\n') 171 '+#!/usr/bin/env python\n')
173 172
173 # To make sure the subdirectory was created as needed.
174 NEW_SUBDIR = (
175 'diff --git a/new_dir/subdir/new_file b/new_dir/subdir/new_file\n'
176 'new file mode 100644\n'
177 '--- /dev/null\n'
178 '+++ b/new_dir/subdir/new_file\n'
179 '@@ -0,0 +1,2 @@\n'
180 '+A new file\n'
181 '+should exist.\n')
182
174 NEW_MODE = ( 183 NEW_MODE = (
175 'diff --git a/natsort_test.py b/natsort_test.py\n' 184 'diff --git a/natsort_test.py b/natsort_test.py\n'
176 'new file mode 100644\n' 185 'new file mode 100644\n'
177 '--- /dev/null\n' 186 '--- /dev/null\n'
178 '+++ b/natsort_test.py\n' 187 '+++ b/natsort_test.py\n'
179 '@@ -0,0 +1,1 @@\n' 188 '@@ -0,0 +1,1 @@\n'
180 '+#!/usr/bin/env python\n') 189 '+#!/usr/bin/env python\n')
181 190
182 MODE_EXE = ( 191 MODE_EXE = (
183 'diff --git a/git_cl/git-cl b/git_cl/git-cl\n' 192 'diff --git a/git_cl/git-cl b/git_cl/git-cl\n'
184 'old mode 100644\n' 193 'old mode 100644\n'
185 'new mode 100755\n') 194 'new mode 100755\n')
186 195
187 MODE_EXE_JUNK = ( 196 MODE_EXE_JUNK = (
188 'Index: Junk\n' 197 'Index: Junk\n'
189 'diff --git a/git_cl/git-cl b/git_cl/git-cl\n' 198 'diff --git a/git_cl/git-cl b/git_cl/git-cl\n'
190 'old mode 100644\n' 199 'old mode 100644\n'
191 'new mode 100755\n') 200 'new mode 100755\n')
OLDNEW
« no previous file with comments | « tests/patch_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698