Show More
@@ -1,468 +1,469 b'' | |||||
1 | test-abort-checkin.t |
|
1 | test-abort-checkin.t | |
2 | test-add.t |
|
2 | test-add.t | |
3 | test-addremove-similar.t |
|
3 | test-addremove-similar.t | |
4 | test-addremove.t |
|
4 | test-addremove.t | |
5 | test-amend-subrepo.t |
|
5 | test-amend-subrepo.t | |
6 | test-amend.t |
|
6 | test-amend.t | |
7 | test-ancestor.py |
|
7 | test-ancestor.py | |
8 | test-annotate.py |
|
8 | test-annotate.py | |
9 | test-annotate.t |
|
9 | test-annotate.t | |
10 | test-archive-symlinks.t |
|
10 | test-archive-symlinks.t | |
11 | test-atomictempfile.py |
|
11 | test-atomictempfile.py | |
12 | test-audit-path.t |
|
12 | test-audit-path.t | |
13 | test-audit-subrepo.t |
|
13 | test-audit-subrepo.t | |
14 | test-automv.t |
|
14 | test-automv.t | |
15 | test-backout.t |
|
15 | test-backout.t | |
16 | test-backwards-remove.t |
|
16 | test-backwards-remove.t | |
17 | test-basic.t |
|
17 | test-basic.t | |
18 | test-bheads.t |
|
18 | test-bheads.t | |
19 | test-bisect.t |
|
19 | test-bisect.t | |
20 | test-bisect2.t |
|
20 | test-bisect2.t | |
21 | test-bisect3.t |
|
21 | test-bisect3.t | |
22 | test-blackbox.t |
|
22 | test-blackbox.t | |
23 | test-bookmarks-current.t |
|
23 | test-bookmarks-current.t | |
24 | test-bookmarks-merge.t |
|
24 | test-bookmarks-merge.t | |
25 | test-bookmarks-rebase.t |
|
25 | test-bookmarks-rebase.t | |
26 | test-bookmarks-strip.t |
|
26 | test-bookmarks-strip.t | |
27 | test-bookmarks.t |
|
27 | test-bookmarks.t | |
28 | test-branch-change.t |
|
28 | test-branch-change.t | |
29 | test-branch-option.t |
|
29 | test-branch-option.t | |
30 | test-branch-tag-confict.t |
|
30 | test-branch-tag-confict.t | |
31 | test-branches.t |
|
31 | test-branches.t | |
32 | test-bundle-phases.t |
|
32 | test-bundle-phases.t | |
33 | test-bundle-type.t |
|
33 | test-bundle-type.t | |
34 | test-bundle-vs-outgoing.t |
|
34 | test-bundle-vs-outgoing.t | |
35 | test-bundle2-multiple-changegroups.t |
|
35 | test-bundle2-multiple-changegroups.t | |
36 | test-cappedreader.py |
|
36 | test-cappedreader.py | |
37 | test-casecollision.t |
|
37 | test-casecollision.t | |
38 | test-cat.t |
|
38 | test-cat.t | |
|
39 | test-cbor.py | |||
39 | test-censor.t |
|
40 | test-censor.t | |
40 | test-changelog-exec.t |
|
41 | test-changelog-exec.t | |
41 | test-check-commit.t |
|
42 | test-check-commit.t | |
42 | test-check-execute.t |
|
43 | test-check-execute.t | |
43 | test-check-interfaces.py |
|
44 | test-check-interfaces.py | |
44 | test-check-module-imports.t |
|
45 | test-check-module-imports.t | |
45 | test-check-pyflakes.t |
|
46 | test-check-pyflakes.t | |
46 | test-check-pylint.t |
|
47 | test-check-pylint.t | |
47 | test-check-shbang.t |
|
48 | test-check-shbang.t | |
48 | test-children.t |
|
49 | test-children.t | |
49 | test-clone-cgi.t |
|
50 | test-clone-cgi.t | |
50 | test-clone-pull-corruption.t |
|
51 | test-clone-pull-corruption.t | |
51 | test-clone-r.t |
|
52 | test-clone-r.t | |
52 | test-clone-update-order.t |
|
53 | test-clone-update-order.t | |
53 | test-command-template.t |
|
54 | test-command-template.t | |
54 | test-commit-amend.t |
|
55 | test-commit-amend.t | |
55 | test-commit-interactive.t |
|
56 | test-commit-interactive.t | |
56 | test-commit-multiple.t |
|
57 | test-commit-multiple.t | |
57 | test-commit-unresolved.t |
|
58 | test-commit-unresolved.t | |
58 | test-commit.t |
|
59 | test-commit.t | |
59 | test-committer.t |
|
60 | test-committer.t | |
60 | test-completion.t |
|
61 | test-completion.t | |
61 | test-config-env.py |
|
62 | test-config-env.py | |
62 | test-config.t |
|
63 | test-config.t | |
63 | test-conflict.t |
|
64 | test-conflict.t | |
64 | test-confused-revert.t |
|
65 | test-confused-revert.t | |
65 | test-contrib-check-code.t |
|
66 | test-contrib-check-code.t | |
66 | test-contrib-check-commit.t |
|
67 | test-contrib-check-commit.t | |
67 | test-convert-authormap.t |
|
68 | test-convert-authormap.t | |
68 | test-convert-clonebranches.t |
|
69 | test-convert-clonebranches.t | |
69 | test-convert-datesort.t |
|
70 | test-convert-datesort.t | |
70 | test-convert-filemap.t |
|
71 | test-convert-filemap.t | |
71 | test-convert-hg-sink.t |
|
72 | test-convert-hg-sink.t | |
72 | test-convert-hg-source.t |
|
73 | test-convert-hg-source.t | |
73 | test-convert-hg-startrev.t |
|
74 | test-convert-hg-startrev.t | |
74 | test-convert-splicemap.t |
|
75 | test-convert-splicemap.t | |
75 | test-convert-tagsbranch-topology.t |
|
76 | test-convert-tagsbranch-topology.t | |
76 | test-copy-move-merge.t |
|
77 | test-copy-move-merge.t | |
77 | test-copy.t |
|
78 | test-copy.t | |
78 | test-copytrace-heuristics.t |
|
79 | test-copytrace-heuristics.t | |
79 | test-debugbuilddag.t |
|
80 | test-debugbuilddag.t | |
80 | test-debugbundle.t |
|
81 | test-debugbundle.t | |
81 | test-debugextensions.t |
|
82 | test-debugextensions.t | |
82 | test-debugindexdot.t |
|
83 | test-debugindexdot.t | |
83 | test-debugrename.t |
|
84 | test-debugrename.t | |
84 | test-default-push.t |
|
85 | test-default-push.t | |
85 | test-diff-binary-file.t |
|
86 | test-diff-binary-file.t | |
86 | test-diff-change.t |
|
87 | test-diff-change.t | |
87 | test-diff-copy-depth.t |
|
88 | test-diff-copy-depth.t | |
88 | test-diff-hashes.t |
|
89 | test-diff-hashes.t | |
89 | test-diff-ignore-whitespace.t |
|
90 | test-diff-ignore-whitespace.t | |
90 | test-diff-indent-heuristic.t |
|
91 | test-diff-indent-heuristic.t | |
91 | test-diff-issue2761.t |
|
92 | test-diff-issue2761.t | |
92 | test-diff-newlines.t |
|
93 | test-diff-newlines.t | |
93 | test-diff-reverse.t |
|
94 | test-diff-reverse.t | |
94 | test-diff-subdir.t |
|
95 | test-diff-subdir.t | |
95 | test-diff-unified.t |
|
96 | test-diff-unified.t | |
96 | test-diff-upgrade.t |
|
97 | test-diff-upgrade.t | |
97 | test-diffdir.t |
|
98 | test-diffdir.t | |
98 | test-diffstat.t |
|
99 | test-diffstat.t | |
99 | test-directaccess.t |
|
100 | test-directaccess.t | |
100 | test-dirstate-backup.t |
|
101 | test-dirstate-backup.t | |
101 | test-dirstate-nonnormalset.t |
|
102 | test-dirstate-nonnormalset.t | |
102 | test-dirstate.t |
|
103 | test-dirstate.t | |
103 | test-doctest.py |
|
104 | test-doctest.py | |
104 | test-double-merge.t |
|
105 | test-double-merge.t | |
105 | test-drawdag.t |
|
106 | test-drawdag.t | |
106 | test-duplicateoptions.py |
|
107 | test-duplicateoptions.py | |
107 | test-editor-filename.t |
|
108 | test-editor-filename.t | |
108 | test-empty-dir.t |
|
109 | test-empty-dir.t | |
109 | test-empty-file.t |
|
110 | test-empty-file.t | |
110 | test-empty-group.t |
|
111 | test-empty-group.t | |
111 | test-empty.t |
|
112 | test-empty.t | |
112 | test-encode.t |
|
113 | test-encode.t | |
113 | test-encoding-func.py |
|
114 | test-encoding-func.py | |
114 | test-encoding.t |
|
115 | test-encoding.t | |
115 | test-eol-add.t |
|
116 | test-eol-add.t | |
116 | test-eol-clone.t |
|
117 | test-eol-clone.t | |
117 | test-eol-hook.t |
|
118 | test-eol-hook.t | |
118 | test-eol-tag.t |
|
119 | test-eol-tag.t | |
119 | test-eol-update.t |
|
120 | test-eol-update.t | |
120 | test-excessive-merge.t |
|
121 | test-excessive-merge.t | |
121 | test-exchange-obsmarkers-case-A1.t |
|
122 | test-exchange-obsmarkers-case-A1.t | |
122 | test-exchange-obsmarkers-case-A2.t |
|
123 | test-exchange-obsmarkers-case-A2.t | |
123 | test-exchange-obsmarkers-case-A3.t |
|
124 | test-exchange-obsmarkers-case-A3.t | |
124 | test-exchange-obsmarkers-case-A4.t |
|
125 | test-exchange-obsmarkers-case-A4.t | |
125 | test-exchange-obsmarkers-case-A5.t |
|
126 | test-exchange-obsmarkers-case-A5.t | |
126 | test-exchange-obsmarkers-case-A6.t |
|
127 | test-exchange-obsmarkers-case-A6.t | |
127 | test-exchange-obsmarkers-case-A7.t |
|
128 | test-exchange-obsmarkers-case-A7.t | |
128 | test-exchange-obsmarkers-case-B1.t |
|
129 | test-exchange-obsmarkers-case-B1.t | |
129 | test-exchange-obsmarkers-case-B2.t |
|
130 | test-exchange-obsmarkers-case-B2.t | |
130 | test-exchange-obsmarkers-case-B3.t |
|
131 | test-exchange-obsmarkers-case-B3.t | |
131 | test-exchange-obsmarkers-case-B4.t |
|
132 | test-exchange-obsmarkers-case-B4.t | |
132 | test-exchange-obsmarkers-case-B5.t |
|
133 | test-exchange-obsmarkers-case-B5.t | |
133 | test-exchange-obsmarkers-case-B6.t |
|
134 | test-exchange-obsmarkers-case-B6.t | |
134 | test-exchange-obsmarkers-case-B7.t |
|
135 | test-exchange-obsmarkers-case-B7.t | |
135 | test-exchange-obsmarkers-case-C1.t |
|
136 | test-exchange-obsmarkers-case-C1.t | |
136 | test-exchange-obsmarkers-case-C2.t |
|
137 | test-exchange-obsmarkers-case-C2.t | |
137 | test-exchange-obsmarkers-case-C3.t |
|
138 | test-exchange-obsmarkers-case-C3.t | |
138 | test-exchange-obsmarkers-case-C4.t |
|
139 | test-exchange-obsmarkers-case-C4.t | |
139 | test-exchange-obsmarkers-case-D1.t |
|
140 | test-exchange-obsmarkers-case-D1.t | |
140 | test-exchange-obsmarkers-case-D2.t |
|
141 | test-exchange-obsmarkers-case-D2.t | |
141 | test-exchange-obsmarkers-case-D3.t |
|
142 | test-exchange-obsmarkers-case-D3.t | |
142 | test-exchange-obsmarkers-case-D4.t |
|
143 | test-exchange-obsmarkers-case-D4.t | |
143 | test-execute-bit.t |
|
144 | test-execute-bit.t | |
144 | test-export.t |
|
145 | test-export.t | |
145 | test-extdata.t |
|
146 | test-extdata.t | |
146 | test-extdiff.t |
|
147 | test-extdiff.t | |
147 | test-extra-filelog-entry.t |
|
148 | test-extra-filelog-entry.t | |
148 | test-filebranch.t |
|
149 | test-filebranch.t | |
149 | test-fileset-generated.t |
|
150 | test-fileset-generated.t | |
150 | test-fix-topology.t |
|
151 | test-fix-topology.t | |
151 | test-flags.t |
|
152 | test-flags.t | |
152 | test-generaldelta.t |
|
153 | test-generaldelta.t | |
153 | test-getbundle.t |
|
154 | test-getbundle.t | |
154 | test-git-export.t |
|
155 | test-git-export.t | |
155 | test-glog-topological.t |
|
156 | test-glog-topological.t | |
156 | test-gpg.t |
|
157 | test-gpg.t | |
157 | test-graft.t |
|
158 | test-graft.t | |
158 | test-hg-parseurl.py |
|
159 | test-hg-parseurl.py | |
159 | test-hghave.t |
|
160 | test-hghave.t | |
160 | test-hgignore.t |
|
161 | test-hgignore.t | |
161 | test-hgk.t |
|
162 | test-hgk.t | |
162 | test-hgweb-bundle.t |
|
163 | test-hgweb-bundle.t | |
163 | test-hgweb-descend-empties.t |
|
164 | test-hgweb-descend-empties.t | |
164 | test-hgweb-empty.t |
|
165 | test-hgweb-empty.t | |
165 | test-hgweb-removed.t |
|
166 | test-hgweb-removed.t | |
166 | test-hgwebdir-paths.py |
|
167 | test-hgwebdir-paths.py | |
167 | test-hgwebdirsym.t |
|
168 | test-hgwebdirsym.t | |
168 | test-histedit-arguments.t |
|
169 | test-histedit-arguments.t | |
169 | test-histedit-base.t |
|
170 | test-histedit-base.t | |
170 | test-histedit-bookmark-motion.t |
|
171 | test-histedit-bookmark-motion.t | |
171 | test-histedit-commute.t |
|
172 | test-histedit-commute.t | |
172 | test-histedit-drop.t |
|
173 | test-histedit-drop.t | |
173 | test-histedit-edit.t |
|
174 | test-histedit-edit.t | |
174 | test-histedit-fold-non-commute.t |
|
175 | test-histedit-fold-non-commute.t | |
175 | test-histedit-fold.t |
|
176 | test-histedit-fold.t | |
176 | test-histedit-no-change.t |
|
177 | test-histedit-no-change.t | |
177 | test-histedit-non-commute-abort.t |
|
178 | test-histedit-non-commute-abort.t | |
178 | test-histedit-non-commute.t |
|
179 | test-histedit-non-commute.t | |
179 | test-histedit-obsolete.t |
|
180 | test-histedit-obsolete.t | |
180 | test-histedit-outgoing.t |
|
181 | test-histedit-outgoing.t | |
181 | test-histedit-templates.t |
|
182 | test-histedit-templates.t | |
182 | test-http-branchmap.t |
|
183 | test-http-branchmap.t | |
183 | test-http-bundle1.t |
|
184 | test-http-bundle1.t | |
184 | test-http-clone-r.t |
|
185 | test-http-clone-r.t | |
185 | test-http.t |
|
186 | test-http.t | |
186 | test-hybridencode.py |
|
187 | test-hybridencode.py | |
187 | test-identify.t |
|
188 | test-identify.t | |
188 | test-import-unknown.t |
|
189 | test-import-unknown.t | |
189 | test-import.t |
|
190 | test-import.t | |
190 | test-imports-checker.t |
|
191 | test-imports-checker.t | |
191 | test-incoming-outgoing.t |
|
192 | test-incoming-outgoing.t | |
192 | test-inherit-mode.t |
|
193 | test-inherit-mode.t | |
193 | test-issue1089.t |
|
194 | test-issue1089.t | |
194 | test-issue1102.t |
|
195 | test-issue1102.t | |
195 | test-issue1175.t |
|
196 | test-issue1175.t | |
196 | test-issue1306.t |
|
197 | test-issue1306.t | |
197 | test-issue1438.t |
|
198 | test-issue1438.t | |
198 | test-issue1502.t |
|
199 | test-issue1502.t | |
199 | test-issue1802.t |
|
200 | test-issue1802.t | |
200 | test-issue1877.t |
|
201 | test-issue1877.t | |
201 | test-issue1993.t |
|
202 | test-issue1993.t | |
202 | test-issue2137.t |
|
203 | test-issue2137.t | |
203 | test-issue3084.t |
|
204 | test-issue3084.t | |
204 | test-issue4074.t |
|
205 | test-issue4074.t | |
205 | test-issue522.t |
|
206 | test-issue522.t | |
206 | test-issue586.t |
|
207 | test-issue586.t | |
207 | test-issue612.t |
|
208 | test-issue612.t | |
208 | test-issue619.t |
|
209 | test-issue619.t | |
209 | test-issue660.t |
|
210 | test-issue660.t | |
210 | test-issue672.t |
|
211 | test-issue672.t | |
211 | test-issue842.t |
|
212 | test-issue842.t | |
212 | test-journal-exists.t |
|
213 | test-journal-exists.t | |
213 | test-journal-share.t |
|
214 | test-journal-share.t | |
214 | test-journal.t |
|
215 | test-journal.t | |
215 | test-largefiles-cache.t |
|
216 | test-largefiles-cache.t | |
216 | test-largefiles-misc.t |
|
217 | test-largefiles-misc.t | |
217 | test-largefiles-small-disk.t |
|
218 | test-largefiles-small-disk.t | |
218 | test-largefiles-update.t |
|
219 | test-largefiles-update.t | |
219 | test-largefiles.t |
|
220 | test-largefiles.t | |
220 | test-lfs-largefiles.t |
|
221 | test-lfs-largefiles.t | |
221 | test-linerange.py |
|
222 | test-linerange.py | |
222 | test-locate.t |
|
223 | test-locate.t | |
223 | test-lock-badness.t |
|
224 | test-lock-badness.t | |
224 | test-log-linerange.t |
|
225 | test-log-linerange.t | |
225 | test-log.t |
|
226 | test-log.t | |
226 | test-logexchange.t |
|
227 | test-logexchange.t | |
227 | test-lrucachedict.py |
|
228 | test-lrucachedict.py | |
228 | test-mactext.t |
|
229 | test-mactext.t | |
229 | test-mailmap.t |
|
230 | test-mailmap.t | |
230 | test-manifest-merging.t |
|
231 | test-manifest-merging.t | |
231 | test-manifest.py |
|
232 | test-manifest.py | |
232 | test-manifest.t |
|
233 | test-manifest.t | |
233 | test-match.py |
|
234 | test-match.py | |
234 | test-mdiff.py |
|
235 | test-mdiff.py | |
235 | test-merge-changedelete.t |
|
236 | test-merge-changedelete.t | |
236 | test-merge-closedheads.t |
|
237 | test-merge-closedheads.t | |
237 | test-merge-commit.t |
|
238 | test-merge-commit.t | |
238 | test-merge-criss-cross.t |
|
239 | test-merge-criss-cross.t | |
239 | test-merge-default.t |
|
240 | test-merge-default.t | |
240 | test-merge-force.t |
|
241 | test-merge-force.t | |
241 | test-merge-halt.t |
|
242 | test-merge-halt.t | |
242 | test-merge-internal-tools-pattern.t |
|
243 | test-merge-internal-tools-pattern.t | |
243 | test-merge-local.t |
|
244 | test-merge-local.t | |
244 | test-merge-remove.t |
|
245 | test-merge-remove.t | |
245 | test-merge-revert.t |
|
246 | test-merge-revert.t | |
246 | test-merge-revert2.t |
|
247 | test-merge-revert2.t | |
247 | test-merge-subrepos.t |
|
248 | test-merge-subrepos.t | |
248 | test-merge-symlinks.t |
|
249 | test-merge-symlinks.t | |
249 | test-merge-tools.t |
|
250 | test-merge-tools.t | |
250 | test-merge-types.t |
|
251 | test-merge-types.t | |
251 | test-merge1.t |
|
252 | test-merge1.t | |
252 | test-merge10.t |
|
253 | test-merge10.t | |
253 | test-merge2.t |
|
254 | test-merge2.t | |
254 | test-merge4.t |
|
255 | test-merge4.t | |
255 | test-merge5.t |
|
256 | test-merge5.t | |
256 | test-merge6.t |
|
257 | test-merge6.t | |
257 | test-merge7.t |
|
258 | test-merge7.t | |
258 | test-merge8.t |
|
259 | test-merge8.t | |
259 | test-merge9.t |
|
260 | test-merge9.t | |
260 | test-minifileset.py |
|
261 | test-minifileset.py | |
261 | test-minirst.py |
|
262 | test-minirst.py | |
262 | test-mq-git.t |
|
263 | test-mq-git.t | |
263 | test-mq-header-date.t |
|
264 | test-mq-header-date.t | |
264 | test-mq-header-from.t |
|
265 | test-mq-header-from.t | |
265 | test-mq-merge.t |
|
266 | test-mq-merge.t | |
266 | test-mq-pull-from-bundle.t |
|
267 | test-mq-pull-from-bundle.t | |
267 | test-mq-qclone-http.t |
|
268 | test-mq-qclone-http.t | |
268 | test-mq-qdelete.t |
|
269 | test-mq-qdelete.t | |
269 | test-mq-qdiff.t |
|
270 | test-mq-qdiff.t | |
270 | test-mq-qfold.t |
|
271 | test-mq-qfold.t | |
271 | test-mq-qgoto.t |
|
272 | test-mq-qgoto.t | |
272 | test-mq-qimport-fail-cleanup.t |
|
273 | test-mq-qimport-fail-cleanup.t | |
273 | test-mq-qnew.t |
|
274 | test-mq-qnew.t | |
274 | test-mq-qpush-exact.t |
|
275 | test-mq-qpush-exact.t | |
275 | test-mq-qqueue.t |
|
276 | test-mq-qqueue.t | |
276 | test-mq-qrefresh-interactive.t |
|
277 | test-mq-qrefresh-interactive.t | |
277 | test-mq-qrefresh-replace-log-message.t |
|
278 | test-mq-qrefresh-replace-log-message.t | |
278 | test-mq-qrefresh.t |
|
279 | test-mq-qrefresh.t | |
279 | test-mq-qrename.t |
|
280 | test-mq-qrename.t | |
280 | test-mq-qsave.t |
|
281 | test-mq-qsave.t | |
281 | test-mq-safety.t |
|
282 | test-mq-safety.t | |
282 | test-mq-subrepo.t |
|
283 | test-mq-subrepo.t | |
283 | test-mq-symlinks.t |
|
284 | test-mq-symlinks.t | |
284 | test-mv-cp-st-diff.t |
|
285 | test-mv-cp-st-diff.t | |
285 | test-narrow-archive.t |
|
286 | test-narrow-archive.t | |
286 | test-narrow-clone-no-ellipsis.t |
|
287 | test-narrow-clone-no-ellipsis.t | |
287 | test-narrow-clone-non-narrow-server.t |
|
288 | test-narrow-clone-non-narrow-server.t | |
288 | test-narrow-clone-nonlinear.t |
|
289 | test-narrow-clone-nonlinear.t | |
289 | test-narrow-clone.t |
|
290 | test-narrow-clone.t | |
290 | test-narrow-commit.t |
|
291 | test-narrow-commit.t | |
291 | test-narrow-copies.t |
|
292 | test-narrow-copies.t | |
292 | test-narrow-debugcommands.t |
|
293 | test-narrow-debugcommands.t | |
293 | test-narrow-debugrebuilddirstate.t |
|
294 | test-narrow-debugrebuilddirstate.t | |
294 | test-narrow-exchange-merges.t |
|
295 | test-narrow-exchange-merges.t | |
295 | test-narrow-exchange.t |
|
296 | test-narrow-exchange.t | |
296 | test-narrow-expanddirstate.t |
|
297 | test-narrow-expanddirstate.t | |
297 | test-narrow-merge.t |
|
298 | test-narrow-merge.t | |
298 | test-narrow-patch.t |
|
299 | test-narrow-patch.t | |
299 | test-narrow-patterns.t |
|
300 | test-narrow-patterns.t | |
300 | test-narrow-pull.t |
|
301 | test-narrow-pull.t | |
301 | test-narrow-rebase.t |
|
302 | test-narrow-rebase.t | |
302 | test-narrow-shallow-merges.t |
|
303 | test-narrow-shallow-merges.t | |
303 | test-narrow-shallow.t |
|
304 | test-narrow-shallow.t | |
304 | test-narrow-strip.t |
|
305 | test-narrow-strip.t | |
305 | test-narrow-update.t |
|
306 | test-narrow-update.t | |
306 | test-nested-repo.t |
|
307 | test-nested-repo.t | |
307 | test-newbranch.t |
|
308 | test-newbranch.t | |
308 | test-obshistory.t |
|
309 | test-obshistory.t | |
309 | test-obsmarker-template.t |
|
310 | test-obsmarker-template.t | |
310 | test-obsmarkers-effectflag.t |
|
311 | test-obsmarkers-effectflag.t | |
311 | test-obsolete-bundle-strip.t |
|
312 | test-obsolete-bundle-strip.t | |
312 | test-obsolete-changeset-exchange.t |
|
313 | test-obsolete-changeset-exchange.t | |
313 | test-obsolete-checkheads.t |
|
314 | test-obsolete-checkheads.t | |
314 | test-obsolete-distributed.t |
|
315 | test-obsolete-distributed.t | |
315 | test-obsolete-tag-cache.t |
|
316 | test-obsolete-tag-cache.t | |
316 | test-parents.t |
|
317 | test-parents.t | |
317 | test-parseindex2.py |
|
318 | test-parseindex2.py | |
318 | test-pathconflicts-merge.t |
|
319 | test-pathconflicts-merge.t | |
319 | test-pathconflicts-update.t |
|
320 | test-pathconflicts-update.t | |
320 | test-pathencode.py |
|
321 | test-pathencode.py | |
321 | test-pending.t |
|
322 | test-pending.t | |
322 | test-permissions.t |
|
323 | test-permissions.t | |
323 | test-phases.t |
|
324 | test-phases.t | |
324 | test-pull-branch.t |
|
325 | test-pull-branch.t | |
325 | test-pull-http.t |
|
326 | test-pull-http.t | |
326 | test-pull-permission.t |
|
327 | test-pull-permission.t | |
327 | test-pull-pull-corruption.t |
|
328 | test-pull-pull-corruption.t | |
328 | test-pull-r.t |
|
329 | test-pull-r.t | |
329 | test-pull-update.t |
|
330 | test-pull-update.t | |
330 | test-purge.t |
|
331 | test-purge.t | |
331 | test-push-checkheads-partial-C1.t |
|
332 | test-push-checkheads-partial-C1.t | |
332 | test-push-checkheads-partial-C2.t |
|
333 | test-push-checkheads-partial-C2.t | |
333 | test-push-checkheads-partial-C3.t |
|
334 | test-push-checkheads-partial-C3.t | |
334 | test-push-checkheads-partial-C4.t |
|
335 | test-push-checkheads-partial-C4.t | |
335 | test-push-checkheads-pruned-B1.t |
|
336 | test-push-checkheads-pruned-B1.t | |
336 | test-push-checkheads-pruned-B2.t |
|
337 | test-push-checkheads-pruned-B2.t | |
337 | test-push-checkheads-pruned-B3.t |
|
338 | test-push-checkheads-pruned-B3.t | |
338 | test-push-checkheads-pruned-B4.t |
|
339 | test-push-checkheads-pruned-B4.t | |
339 | test-push-checkheads-pruned-B5.t |
|
340 | test-push-checkheads-pruned-B5.t | |
340 | test-push-checkheads-pruned-B6.t |
|
341 | test-push-checkheads-pruned-B6.t | |
341 | test-push-checkheads-pruned-B7.t |
|
342 | test-push-checkheads-pruned-B7.t | |
342 | test-push-checkheads-pruned-B8.t |
|
343 | test-push-checkheads-pruned-B8.t | |
343 | test-push-checkheads-superceed-A1.t |
|
344 | test-push-checkheads-superceed-A1.t | |
344 | test-push-checkheads-superceed-A2.t |
|
345 | test-push-checkheads-superceed-A2.t | |
345 | test-push-checkheads-superceed-A3.t |
|
346 | test-push-checkheads-superceed-A3.t | |
346 | test-push-checkheads-superceed-A4.t |
|
347 | test-push-checkheads-superceed-A4.t | |
347 | test-push-checkheads-superceed-A5.t |
|
348 | test-push-checkheads-superceed-A5.t | |
348 | test-push-checkheads-superceed-A6.t |
|
349 | test-push-checkheads-superceed-A6.t | |
349 | test-push-checkheads-superceed-A7.t |
|
350 | test-push-checkheads-superceed-A7.t | |
350 | test-push-checkheads-superceed-A8.t |
|
351 | test-push-checkheads-superceed-A8.t | |
351 | test-push-checkheads-unpushed-D1.t |
|
352 | test-push-checkheads-unpushed-D1.t | |
352 | test-push-checkheads-unpushed-D2.t |
|
353 | test-push-checkheads-unpushed-D2.t | |
353 | test-push-checkheads-unpushed-D3.t |
|
354 | test-push-checkheads-unpushed-D3.t | |
354 | test-push-checkheads-unpushed-D4.t |
|
355 | test-push-checkheads-unpushed-D4.t | |
355 | test-push-checkheads-unpushed-D5.t |
|
356 | test-push-checkheads-unpushed-D5.t | |
356 | test-push-checkheads-unpushed-D6.t |
|
357 | test-push-checkheads-unpushed-D6.t | |
357 | test-push-checkheads-unpushed-D7.t |
|
358 | test-push-checkheads-unpushed-D7.t | |
358 | test-push-http.t |
|
359 | test-push-http.t | |
359 | test-push-warn.t |
|
360 | test-push-warn.t | |
360 | test-pushvars.t |
|
361 | test-pushvars.t | |
361 | test-rebase-abort.t |
|
362 | test-rebase-abort.t | |
362 | test-rebase-base-flag.t |
|
363 | test-rebase-base-flag.t | |
363 | test-rebase-bookmarks.t |
|
364 | test-rebase-bookmarks.t | |
364 | test-rebase-brute-force.t |
|
365 | test-rebase-brute-force.t | |
365 | test-rebase-cache.t |
|
366 | test-rebase-cache.t | |
366 | test-rebase-check-restore.t |
|
367 | test-rebase-check-restore.t | |
367 | test-rebase-collapse.t |
|
368 | test-rebase-collapse.t | |
368 | test-rebase-conflicts.t |
|
369 | test-rebase-conflicts.t | |
369 | test-rebase-dest.t |
|
370 | test-rebase-dest.t | |
370 | test-rebase-detach.t |
|
371 | test-rebase-detach.t | |
371 | test-rebase-emptycommit.t |
|
372 | test-rebase-emptycommit.t | |
372 | test-rebase-inmemory.t |
|
373 | test-rebase-inmemory.t | |
373 | test-rebase-interruptions.t |
|
374 | test-rebase-interruptions.t | |
374 | test-rebase-issue-noparam-single-rev.t |
|
375 | test-rebase-issue-noparam-single-rev.t | |
375 | test-rebase-legacy.t |
|
376 | test-rebase-legacy.t | |
376 | test-rebase-mq-skip.t |
|
377 | test-rebase-mq-skip.t | |
377 | test-rebase-mq.t |
|
378 | test-rebase-mq.t | |
378 | test-rebase-named-branches.t |
|
379 | test-rebase-named-branches.t | |
379 | test-rebase-newancestor.t |
|
380 | test-rebase-newancestor.t | |
380 | test-rebase-obsolete.t |
|
381 | test-rebase-obsolete.t | |
381 | test-rebase-parameters.t |
|
382 | test-rebase-parameters.t | |
382 | test-rebase-partial.t |
|
383 | test-rebase-partial.t | |
383 | test-rebase-pull.t |
|
384 | test-rebase-pull.t | |
384 | test-rebase-rename.t |
|
385 | test-rebase-rename.t | |
385 | test-rebase-scenario-global.t |
|
386 | test-rebase-scenario-global.t | |
386 | test-rebase-templates.t |
|
387 | test-rebase-templates.t | |
387 | test-rebase-transaction.t |
|
388 | test-rebase-transaction.t | |
388 | test-record.t |
|
389 | test-record.t | |
389 | test-relink.t |
|
390 | test-relink.t | |
390 | test-remove.t |
|
391 | test-remove.t | |
391 | test-rename-after-merge.t |
|
392 | test-rename-after-merge.t | |
392 | test-rename-dir-merge.t |
|
393 | test-rename-dir-merge.t | |
393 | test-rename-merge1.t |
|
394 | test-rename-merge1.t | |
394 | test-rename.t |
|
395 | test-rename.t | |
395 | test-repair-strip.t |
|
396 | test-repair-strip.t | |
396 | test-repo-compengines.t |
|
397 | test-repo-compengines.t | |
397 | test-resolve.t |
|
398 | test-resolve.t | |
398 | test-revert-flags.t |
|
399 | test-revert-flags.t | |
399 | test-revert-unknown.t |
|
400 | test-revert-unknown.t | |
400 | test-revlog-ancestry.py |
|
401 | test-revlog-ancestry.py | |
401 | test-revlog-group-emptyiter.t |
|
402 | test-revlog-group-emptyiter.t | |
402 | test-revlog-mmapindex.t |
|
403 | test-revlog-mmapindex.t | |
403 | test-revlog-packentry.t |
|
404 | test-revlog-packentry.t | |
404 | test-revset-dirstate-parents.t |
|
405 | test-revset-dirstate-parents.t | |
405 | test-revset-legacy-lookup.t |
|
406 | test-revset-legacy-lookup.t | |
406 | test-revset-outgoing.t |
|
407 | test-revset-outgoing.t | |
407 | test-rollback.t |
|
408 | test-rollback.t | |
408 | test-run-tests.py |
|
409 | test-run-tests.py | |
409 | test-run-tests.t |
|
410 | test-run-tests.t | |
410 | test-schemes.t |
|
411 | test-schemes.t | |
411 | test-serve.t |
|
412 | test-serve.t | |
412 | test-setdiscovery.t |
|
413 | test-setdiscovery.t | |
413 | test-share.t |
|
414 | test-share.t | |
414 | test-shelve.t |
|
415 | test-shelve.t | |
415 | test-show-stack.t |
|
416 | test-show-stack.t | |
416 | test-show-work.t |
|
417 | test-show-work.t | |
417 | test-show.t |
|
418 | test-show.t | |
418 | test-simple-update.t |
|
419 | test-simple-update.t | |
419 | test-simplemerge.py |
|
420 | test-simplemerge.py | |
420 | test-single-head.t |
|
421 | test-single-head.t | |
421 | test-sparse-clear.t |
|
422 | test-sparse-clear.t | |
422 | test-sparse-import.t |
|
423 | test-sparse-import.t | |
423 | test-sparse-merges.t |
|
424 | test-sparse-merges.t | |
424 | test-sparse-profiles.t |
|
425 | test-sparse-profiles.t | |
425 | test-sparse-requirement.t |
|
426 | test-sparse-requirement.t | |
426 | test-sparse-verbose-json.t |
|
427 | test-sparse-verbose-json.t | |
427 | test-ssh-clone-r.t |
|
428 | test-ssh-clone-r.t | |
428 | test-ssh-proto.t |
|
429 | test-ssh-proto.t | |
429 | test-sshserver.py |
|
430 | test-sshserver.py | |
430 | test-stack.t |
|
431 | test-stack.t | |
431 | test-status-rev.t |
|
432 | test-status-rev.t | |
432 | test-status-terse.t |
|
433 | test-status-terse.t | |
433 | test-strip-cross.t |
|
434 | test-strip-cross.t | |
434 | test-strip.t |
|
435 | test-strip.t | |
435 | test-subrepo-deep-nested-change.t |
|
436 | test-subrepo-deep-nested-change.t | |
436 | test-subrepo-missing.t |
|
437 | test-subrepo-missing.t | |
437 | test-subrepo-recursion.t |
|
438 | test-subrepo-recursion.t | |
438 | test-subrepo-relative-path.t |
|
439 | test-subrepo-relative-path.t | |
439 | test-subrepo.t |
|
440 | test-subrepo.t | |
440 | test-symlinks.t |
|
441 | test-symlinks.t | |
441 | test-tag.t |
|
442 | test-tag.t | |
442 | test-tags.t |
|
443 | test-tags.t | |
443 | test-template-engine.t |
|
444 | test-template-engine.t | |
444 | test-treemanifest.t |
|
445 | test-treemanifest.t | |
445 | test-unamend.t |
|
446 | test-unamend.t | |
446 | test-uncommit.t |
|
447 | test-uncommit.t | |
447 | test-unified-test.t |
|
448 | test-unified-test.t | |
448 | test-unrelated-pull.t |
|
449 | test-unrelated-pull.t | |
449 | test-up-local-change.t |
|
450 | test-up-local-change.t | |
450 | test-update-branches.t |
|
451 | test-update-branches.t | |
451 | test-update-dest.t |
|
452 | test-update-dest.t | |
452 | test-update-issue1456.t |
|
453 | test-update-issue1456.t | |
453 | test-update-names.t |
|
454 | test-update-names.t | |
454 | test-update-reverse.t |
|
455 | test-update-reverse.t | |
455 | test-upgrade-repo.t |
|
456 | test-upgrade-repo.t | |
456 | test-url-download.t |
|
457 | test-url-download.t | |
457 | test-url-rev.t |
|
458 | test-url-rev.t | |
458 | test-url.py |
|
459 | test-url.py | |
459 | test-username-newline.t |
|
460 | test-username-newline.t | |
460 | test-verify.t |
|
461 | test-verify.t | |
461 | test-walkrepo.py |
|
462 | test-walkrepo.py | |
462 | test-websub.t |
|
463 | test-websub.t | |
463 | test-win32text.t |
|
464 | test-win32text.t | |
464 | test-wireproto-clientreactor.py |
|
465 | test-wireproto-clientreactor.py | |
465 | test-wireproto-framing.py |
|
466 | test-wireproto-framing.py | |
466 | test-wireproto-serverreactor.py |
|
467 | test-wireproto-serverreactor.py | |
467 | test-wsgirequest.py |
|
468 | test-wsgirequest.py | |
468 | test-xdg.t |
|
469 | test-xdg.t |
@@ -1,210 +1,210 b'' | |||||
1 | from __future__ import absolute_import |
|
1 | from __future__ import absolute_import | |
2 |
|
2 | |||
3 | import io |
|
3 | import io | |
4 | import unittest |
|
4 | import unittest | |
5 |
|
5 | |||
6 | from mercurial.thirdparty import ( |
|
6 | from mercurial.thirdparty import ( | |
7 | cbor, |
|
7 | cbor, | |
8 | ) |
|
8 | ) | |
9 | from mercurial.utils import ( |
|
9 | from mercurial.utils import ( | |
10 | cborutil, |
|
10 | cborutil, | |
11 | ) |
|
11 | ) | |
12 |
|
12 | |||
13 | def loadit(it): |
|
13 | def loadit(it): | |
14 | return cbor.loads(b''.join(it)) |
|
14 | return cbor.loads(b''.join(it)) | |
15 |
|
15 | |||
16 | class BytestringTests(unittest.TestCase): |
|
16 | class BytestringTests(unittest.TestCase): | |
17 | def testsimple(self): |
|
17 | def testsimple(self): | |
18 | self.assertEqual( |
|
18 | self.assertEqual( | |
19 | list(cborutil.streamencode(b'foobar')), |
|
19 | list(cborutil.streamencode(b'foobar')), | |
20 | [b'\x46', b'foobar']) |
|
20 | [b'\x46', b'foobar']) | |
21 |
|
21 | |||
22 | self.assertEqual( |
|
22 | self.assertEqual( | |
23 | loadit(cborutil.streamencode(b'foobar')), |
|
23 | loadit(cborutil.streamencode(b'foobar')), | |
24 | b'foobar') |
|
24 | b'foobar') | |
25 |
|
25 | |||
26 | def testlong(self): |
|
26 | def testlong(self): | |
27 | source = b'x' * 1048576 |
|
27 | source = b'x' * 1048576 | |
28 |
|
28 | |||
29 | self.assertEqual(loadit(cborutil.streamencode(source)), source) |
|
29 | self.assertEqual(loadit(cborutil.streamencode(source)), source) | |
30 |
|
30 | |||
31 | def testfromiter(self): |
|
31 | def testfromiter(self): | |
32 | # This is the example from RFC 7049 Section 2.2.2. |
|
32 | # This is the example from RFC 7049 Section 2.2.2. | |
33 | source = [b'\xaa\xbb\xcc\xdd', b'\xee\xff\x99'] |
|
33 | source = [b'\xaa\xbb\xcc\xdd', b'\xee\xff\x99'] | |
34 |
|
34 | |||
35 | self.assertEqual( |
|
35 | self.assertEqual( | |
36 | list(cborutil.streamencodebytestringfromiter(source)), |
|
36 | list(cborutil.streamencodebytestringfromiter(source)), | |
37 | [ |
|
37 | [ | |
38 | b'\x5f', |
|
38 | b'\x5f', | |
39 | b'\x44', |
|
39 | b'\x44', | |
40 | b'\xaa\xbb\xcc\xdd', |
|
40 | b'\xaa\xbb\xcc\xdd', | |
41 | b'\x43', |
|
41 | b'\x43', | |
42 | b'\xee\xff\x99', |
|
42 | b'\xee\xff\x99', | |
43 | b'\xff', |
|
43 | b'\xff', | |
44 | ]) |
|
44 | ]) | |
45 |
|
45 | |||
46 | self.assertEqual( |
|
46 | self.assertEqual( | |
47 | loadit(cborutil.streamencodebytestringfromiter(source)), |
|
47 | loadit(cborutil.streamencodebytestringfromiter(source)), | |
48 | b''.join(source)) |
|
48 | b''.join(source)) | |
49 |
|
49 | |||
50 | def testfromiterlarge(self): |
|
50 | def testfromiterlarge(self): | |
51 | source = [b'a' * 16, b'b' * 128, b'c' * 1024, b'd' * 1048576] |
|
51 | source = [b'a' * 16, b'b' * 128, b'c' * 1024, b'd' * 1048576] | |
52 |
|
52 | |||
53 | self.assertEqual( |
|
53 | self.assertEqual( | |
54 | loadit(cborutil.streamencodebytestringfromiter(source)), |
|
54 | loadit(cborutil.streamencodebytestringfromiter(source)), | |
55 | b''.join(source)) |
|
55 | b''.join(source)) | |
56 |
|
56 | |||
57 | def testindefinite(self): |
|
57 | def testindefinite(self): | |
58 | source = b'\x00\x01\x02\x03' + b'\xff' * 16384 |
|
58 | source = b'\x00\x01\x02\x03' + b'\xff' * 16384 | |
59 |
|
59 | |||
60 | it = cborutil.streamencodeindefinitebytestring(source, chunksize=2) |
|
60 | it = cborutil.streamencodeindefinitebytestring(source, chunksize=2) | |
61 |
|
61 | |||
62 | self.assertEqual(next(it), b'\x5f') |
|
62 | self.assertEqual(next(it), b'\x5f') | |
63 | self.assertEqual(next(it), b'\x42') |
|
63 | self.assertEqual(next(it), b'\x42') | |
64 | self.assertEqual(next(it), b'\x00\x01') |
|
64 | self.assertEqual(next(it), b'\x00\x01') | |
65 | self.assertEqual(next(it), b'\x42') |
|
65 | self.assertEqual(next(it), b'\x42') | |
66 | self.assertEqual(next(it), b'\x02\x03') |
|
66 | self.assertEqual(next(it), b'\x02\x03') | |
67 | self.assertEqual(next(it), b'\x42') |
|
67 | self.assertEqual(next(it), b'\x42') | |
68 | self.assertEqual(next(it), b'\xff\xff') |
|
68 | self.assertEqual(next(it), b'\xff\xff') | |
69 |
|
69 | |||
70 | dest = b''.join(cborutil.streamencodeindefinitebytestring( |
|
70 | dest = b''.join(cborutil.streamencodeindefinitebytestring( | |
71 | source, chunksize=42)) |
|
71 | source, chunksize=42)) | |
72 |
self.assertEqual(cbor.loads(dest), |
|
72 | self.assertEqual(cbor.loads(dest), source) | |
73 |
|
73 | |||
74 | def testreadtoiter(self): |
|
74 | def testreadtoiter(self): | |
75 | source = io.BytesIO(b'\x5f\x44\xaa\xbb\xcc\xdd\x43\xee\xff\x99\xff') |
|
75 | source = io.BytesIO(b'\x5f\x44\xaa\xbb\xcc\xdd\x43\xee\xff\x99\xff') | |
76 |
|
76 | |||
77 | it = cborutil.readindefinitebytestringtoiter(source) |
|
77 | it = cborutil.readindefinitebytestringtoiter(source) | |
78 | self.assertEqual(next(it), b'\xaa\xbb\xcc\xdd') |
|
78 | self.assertEqual(next(it), b'\xaa\xbb\xcc\xdd') | |
79 | self.assertEqual(next(it), b'\xee\xff\x99') |
|
79 | self.assertEqual(next(it), b'\xee\xff\x99') | |
80 |
|
80 | |||
81 | with self.assertRaises(StopIteration): |
|
81 | with self.assertRaises(StopIteration): | |
82 | next(it) |
|
82 | next(it) | |
83 |
|
83 | |||
84 | class IntTests(unittest.TestCase): |
|
84 | class IntTests(unittest.TestCase): | |
85 | def testsmall(self): |
|
85 | def testsmall(self): | |
86 | self.assertEqual(list(cborutil.streamencode(0)), [b'\x00']) |
|
86 | self.assertEqual(list(cborutil.streamencode(0)), [b'\x00']) | |
87 | self.assertEqual(list(cborutil.streamencode(1)), [b'\x01']) |
|
87 | self.assertEqual(list(cborutil.streamencode(1)), [b'\x01']) | |
88 | self.assertEqual(list(cborutil.streamencode(2)), [b'\x02']) |
|
88 | self.assertEqual(list(cborutil.streamencode(2)), [b'\x02']) | |
89 | self.assertEqual(list(cborutil.streamencode(3)), [b'\x03']) |
|
89 | self.assertEqual(list(cborutil.streamencode(3)), [b'\x03']) | |
90 | self.assertEqual(list(cborutil.streamencode(4)), [b'\x04']) |
|
90 | self.assertEqual(list(cborutil.streamencode(4)), [b'\x04']) | |
91 |
|
91 | |||
92 | def testnegativesmall(self): |
|
92 | def testnegativesmall(self): | |
93 | self.assertEqual(list(cborutil.streamencode(-1)), [b'\x20']) |
|
93 | self.assertEqual(list(cborutil.streamencode(-1)), [b'\x20']) | |
94 | self.assertEqual(list(cborutil.streamencode(-2)), [b'\x21']) |
|
94 | self.assertEqual(list(cborutil.streamencode(-2)), [b'\x21']) | |
95 | self.assertEqual(list(cborutil.streamencode(-3)), [b'\x22']) |
|
95 | self.assertEqual(list(cborutil.streamencode(-3)), [b'\x22']) | |
96 | self.assertEqual(list(cborutil.streamencode(-4)), [b'\x23']) |
|
96 | self.assertEqual(list(cborutil.streamencode(-4)), [b'\x23']) | |
97 | self.assertEqual(list(cborutil.streamencode(-5)), [b'\x24']) |
|
97 | self.assertEqual(list(cborutil.streamencode(-5)), [b'\x24']) | |
98 |
|
98 | |||
99 | def testrange(self): |
|
99 | def testrange(self): | |
100 | for i in range(-70000, 70000, 10): |
|
100 | for i in range(-70000, 70000, 10): | |
101 | self.assertEqual( |
|
101 | self.assertEqual( | |
102 | b''.join(cborutil.streamencode(i)), |
|
102 | b''.join(cborutil.streamencode(i)), | |
103 | cbor.dumps(i)) |
|
103 | cbor.dumps(i)) | |
104 |
|
104 | |||
105 | class ArrayTests(unittest.TestCase): |
|
105 | class ArrayTests(unittest.TestCase): | |
106 | def testempty(self): |
|
106 | def testempty(self): | |
107 | self.assertEqual(list(cborutil.streamencode([])), [b'\x80']) |
|
107 | self.assertEqual(list(cborutil.streamencode([])), [b'\x80']) | |
108 | self.assertEqual(loadit(cborutil.streamencode([])), []) |
|
108 | self.assertEqual(loadit(cborutil.streamencode([])), []) | |
109 |
|
109 | |||
110 | def testbasic(self): |
|
110 | def testbasic(self): | |
111 | source = [b'foo', b'bar', 1, -10] |
|
111 | source = [b'foo', b'bar', 1, -10] | |
112 |
|
112 | |||
113 | self.assertEqual(list(cborutil.streamencode(source)), [ |
|
113 | self.assertEqual(list(cborutil.streamencode(source)), [ | |
114 | b'\x84', b'\x43', b'foo', b'\x43', b'bar', b'\x01', b'\x29']) |
|
114 | b'\x84', b'\x43', b'foo', b'\x43', b'bar', b'\x01', b'\x29']) | |
115 |
|
115 | |||
116 | def testemptyfromiter(self): |
|
116 | def testemptyfromiter(self): | |
117 | self.assertEqual(b''.join(cborutil.streamencodearrayfromiter([])), |
|
117 | self.assertEqual(b''.join(cborutil.streamencodearrayfromiter([])), | |
118 | b'\x9f\xff') |
|
118 | b'\x9f\xff') | |
119 |
|
119 | |||
120 | def testfromiter1(self): |
|
120 | def testfromiter1(self): | |
121 | source = [b'foo'] |
|
121 | source = [b'foo'] | |
122 |
|
122 | |||
123 | self.assertEqual(list(cborutil.streamencodearrayfromiter(source)), [ |
|
123 | self.assertEqual(list(cborutil.streamencodearrayfromiter(source)), [ | |
124 | b'\x9f', |
|
124 | b'\x9f', | |
125 | b'\x43', b'foo', |
|
125 | b'\x43', b'foo', | |
126 | b'\xff', |
|
126 | b'\xff', | |
127 | ]) |
|
127 | ]) | |
128 |
|
128 | |||
129 | dest = b''.join(cborutil.streamencodearrayfromiter(source)) |
|
129 | dest = b''.join(cborutil.streamencodearrayfromiter(source)) | |
130 | self.assertEqual(cbor.loads(dest), source) |
|
130 | self.assertEqual(cbor.loads(dest), source) | |
131 |
|
131 | |||
132 | def testtuple(self): |
|
132 | def testtuple(self): | |
133 | source = (b'foo', None, 42) |
|
133 | source = (b'foo', None, 42) | |
134 |
|
134 | |||
135 | self.assertEqual(cbor.loads(b''.join(cborutil.streamencode(source))), |
|
135 | self.assertEqual(cbor.loads(b''.join(cborutil.streamencode(source))), | |
136 | list(source)) |
|
136 | list(source)) | |
137 |
|
137 | |||
138 | class SetTests(unittest.TestCase): |
|
138 | class SetTests(unittest.TestCase): | |
139 | def testempty(self): |
|
139 | def testempty(self): | |
140 | self.assertEqual(list(cborutil.streamencode(set())), [ |
|
140 | self.assertEqual(list(cborutil.streamencode(set())), [ | |
141 | b'\xd9\x01\x02', |
|
141 | b'\xd9\x01\x02', | |
142 | b'\x80', |
|
142 | b'\x80', | |
143 | ]) |
|
143 | ]) | |
144 |
|
144 | |||
145 | def testset(self): |
|
145 | def testset(self): | |
146 | source = {b'foo', None, 42} |
|
146 | source = {b'foo', None, 42} | |
147 |
|
147 | |||
148 | self.assertEqual(cbor.loads(b''.join(cborutil.streamencode(source))), |
|
148 | self.assertEqual(cbor.loads(b''.join(cborutil.streamencode(source))), | |
149 | source) |
|
149 | source) | |
150 |
|
150 | |||
151 | class BoolTests(unittest.TestCase): |
|
151 | class BoolTests(unittest.TestCase): | |
152 | def testbasic(self): |
|
152 | def testbasic(self): | |
153 | self.assertEqual(list(cborutil.streamencode(True)), [b'\xf5']) |
|
153 | self.assertEqual(list(cborutil.streamencode(True)), [b'\xf5']) | |
154 | self.assertEqual(list(cborutil.streamencode(False)), [b'\xf4']) |
|
154 | self.assertEqual(list(cborutil.streamencode(False)), [b'\xf4']) | |
155 |
|
155 | |||
156 | self.assertIs(loadit(cborutil.streamencode(True)), True) |
|
156 | self.assertIs(loadit(cborutil.streamencode(True)), True) | |
157 | self.assertIs(loadit(cborutil.streamencode(False)), False) |
|
157 | self.assertIs(loadit(cborutil.streamencode(False)), False) | |
158 |
|
158 | |||
159 | class NoneTests(unittest.TestCase): |
|
159 | class NoneTests(unittest.TestCase): | |
160 | def testbasic(self): |
|
160 | def testbasic(self): | |
161 | self.assertEqual(list(cborutil.streamencode(None)), [b'\xf6']) |
|
161 | self.assertEqual(list(cborutil.streamencode(None)), [b'\xf6']) | |
162 |
|
162 | |||
163 | self.assertIs(loadit(cborutil.streamencode(None)), None) |
|
163 | self.assertIs(loadit(cborutil.streamencode(None)), None) | |
164 |
|
164 | |||
165 | class MapTests(unittest.TestCase): |
|
165 | class MapTests(unittest.TestCase): | |
166 | def testempty(self): |
|
166 | def testempty(self): | |
167 | self.assertEqual(list(cborutil.streamencode({})), [b'\xa0']) |
|
167 | self.assertEqual(list(cborutil.streamencode({})), [b'\xa0']) | |
168 | self.assertEqual(loadit(cborutil.streamencode({})), {}) |
|
168 | self.assertEqual(loadit(cborutil.streamencode({})), {}) | |
169 |
|
169 | |||
170 | def testemptyindefinite(self): |
|
170 | def testemptyindefinite(self): | |
171 | self.assertEqual(list(cborutil.streamencodemapfromiter([])), [ |
|
171 | self.assertEqual(list(cborutil.streamencodemapfromiter([])), [ | |
172 | b'\xbf', b'\xff']) |
|
172 | b'\xbf', b'\xff']) | |
173 |
|
173 | |||
174 | self.assertEqual(loadit(cborutil.streamencodemapfromiter([])), {}) |
|
174 | self.assertEqual(loadit(cborutil.streamencodemapfromiter([])), {}) | |
175 |
|
175 | |||
176 | def testone(self): |
|
176 | def testone(self): | |
177 | source = {b'foo': b'bar'} |
|
177 | source = {b'foo': b'bar'} | |
178 | self.assertEqual(list(cborutil.streamencode(source)), [ |
|
178 | self.assertEqual(list(cborutil.streamencode(source)), [ | |
179 | b'\xa1', b'\x43', b'foo', b'\x43', b'bar']) |
|
179 | b'\xa1', b'\x43', b'foo', b'\x43', b'bar']) | |
180 |
|
180 | |||
181 | self.assertEqual(loadit(cborutil.streamencode(source)), source) |
|
181 | self.assertEqual(loadit(cborutil.streamencode(source)), source) | |
182 |
|
182 | |||
183 | def testmultiple(self): |
|
183 | def testmultiple(self): | |
184 | source = { |
|
184 | source = { | |
185 | b'foo': b'bar', |
|
185 | b'foo': b'bar', | |
186 | b'baz': b'value1', |
|
186 | b'baz': b'value1', | |
187 | } |
|
187 | } | |
188 |
|
188 | |||
189 | self.assertEqual(loadit(cborutil.streamencode(source)), source) |
|
189 | self.assertEqual(loadit(cborutil.streamencode(source)), source) | |
190 |
|
190 | |||
191 | self.assertEqual( |
|
191 | self.assertEqual( | |
192 | loadit(cborutil.streamencodemapfromiter(source.items())), |
|
192 | loadit(cborutil.streamencodemapfromiter(source.items())), | |
193 | source) |
|
193 | source) | |
194 |
|
194 | |||
195 | def testcomplex(self): |
|
195 | def testcomplex(self): | |
196 | source = { |
|
196 | source = { | |
197 | b'key': 1, |
|
197 | b'key': 1, | |
198 | 2: -10, |
|
198 | 2: -10, | |
199 | } |
|
199 | } | |
200 |
|
200 | |||
201 | self.assertEqual(loadit(cborutil.streamencode(source)), |
|
201 | self.assertEqual(loadit(cborutil.streamencode(source)), | |
202 | source) |
|
202 | source) | |
203 |
|
203 | |||
204 | self.assertEqual( |
|
204 | self.assertEqual( | |
205 | loadit(cborutil.streamencodemapfromiter(source.items())), |
|
205 | loadit(cborutil.streamencodemapfromiter(source.items())), | |
206 | source) |
|
206 | source) | |
207 |
|
207 | |||
208 | if __name__ == '__main__': |
|
208 | if __name__ == '__main__': | |
209 | import silenttestrunner |
|
209 | import silenttestrunner | |
210 | silenttestrunner.main(__name__) |
|
210 | silenttestrunner.main(__name__) |
General Comments 0
You need to be logged in to leave comments.
Login now