Fossil SCM

Merged wrap-run_in_checkout branch down to trunk.

wyoung 2018-09-03 07:06 trunk merge
Commit 49e86fe0a88eaf90cdb4de4e697adcb5c0d2cfd0edf88a7e6dc3e69265252988
--- test/commit-warning.test
+++ test/commit-warning.test
@@ -161,146 +161,146 @@
161161
# be fragile as development progresses.
162162
#
163163
# Unless the real goal of this test is to document a collection
164164
# of source files that MUST NEVER BE TEXT.
165165
#
166
-run_in_checkout {
166
+test_block_in_checkout pre-commit-warnings-fossil-1 {
167167
fossil test-commit-warning --no-settings
168
-}
169
-
170
-test pre-commit-warnings-fossil-1 {[normalize_result] eq \
171
- [subst -nocommands -novariables [string trim {
172
-1\tart/branching.odp\tbinary data
173
-1\tart/concept1.dia\tbinary data
174
-1\tart/concept2.dia\tbinary data
175
-1\tcompat/zlib/contrib/blast/test.pk\tbinary data
176
-1\tcompat/zlib/contrib/dotzlib/DotZLib.build\tCR/LF line endings
177
-1\tcompat/zlib/contrib/dotzlib/DotZLib.chm\tbinary data
178
-1\tcompat/zlib/contrib/dotzlib/DotZLib.sln\tCR/LF line endings
179
-1\tcompat/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs\tCR/LF line endings
180
-1\tcompat/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs\tinvalid UTF-8
181
-1\tcompat/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs\tinvalid UTF-8
182
-1\tcompat/zlib/contrib/dotzlib/DotZLib/CodecBase.cs\tinvalid UTF-8
183
-1\tcompat/zlib/contrib/dotzlib/DotZLib/Deflater.cs\tinvalid UTF-8
184
-1\tcompat/zlib/contrib/dotzlib/DotZLib/DotZLib.cs\tinvalid UTF-8
185
-1\tcompat/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj\tCR/LF line endings
186
-1\tcompat/zlib/contrib/dotzlib/DotZLib/GZipStream.cs\tinvalid UTF-8
187
-1\tcompat/zlib/contrib/dotzlib/DotZLib/Inflater.cs\tinvalid UTF-8
188
-1\tcompat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs\tCR/LF line endings
189
-1\tcompat/zlib/contrib/dotzlib/LICENSE_1_0.txt\tCR/LF line endings
190
-1\tcompat/zlib/contrib/dotzlib/readme.txt\tCR/LF line endings
191
-1\tcompat/zlib/contrib/gcc_gvmat64/gvmat64.S\tCR/LF line endings
192
-1\tcompat/zlib/contrib/masmx64/bld_ml64.bat\tCR/LF line endings
193
-1\tcompat/zlib/contrib/masmx64/gvmat64.asm\tCR/LF line endings
194
-1\tcompat/zlib/contrib/masmx64/inffas8664.c\tCR/LF line endings
195
-1\tcompat/zlib/contrib/masmx64/inffasx64.asm\tCR/LF line endings
196
-1\tcompat/zlib/contrib/masmx64/readme.txt\tCR/LF line endings
197
-1\tcompat/zlib/contrib/masmx86/bld_ml32.bat\tCR/LF line endings
198
-1\tcompat/zlib/contrib/masmx86/inffas32.asm\tCR/LF line endings
199
-1\tcompat/zlib/contrib/masmx86/match686.asm\tCR/LF line endings
200
-1\tcompat/zlib/contrib/masmx86/readme.txt\tCR/LF line endings
201
-1\tcompat/zlib/contrib/puff/zeros.raw\tbinary data
202
-1\tcompat/zlib/contrib/testzlib/testzlib.c\tCR/LF line endings
203
-1\tcompat/zlib/contrib/testzlib/testzlib.txt\tCR/LF line endings
204
-1\tcompat/zlib/contrib/vstudio/readme.txt\tCR/LF line endings
205
-1\tcompat/zlib/contrib/vstudio/vc10/miniunz.vcxproj\tCR/LF line endings
206
-1\tcompat/zlib/contrib/vstudio/vc10/miniunz.vcxproj.filters\tCR/LF line endings
207
-1\tcompat/zlib/contrib/vstudio/vc10/minizip.vcxproj\tCR/LF line endings
208
-1\tcompat/zlib/contrib/vstudio/vc10/minizip.vcxproj.filters\tCR/LF line endings
209
-1\tcompat/zlib/contrib/vstudio/vc10/testzlib.vcxproj\tCR/LF line endings
210
-1\tcompat/zlib/contrib/vstudio/vc10/testzlib.vcxproj.filters\tCR/LF line endings
211
-1\tcompat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj\tCR/LF line endings
212
-1\tcompat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.filters\tCR/LF line endings
213
-1\tcompat/zlib/contrib/vstudio/vc10/zlib.rc\tCR/LF line endings
214
-1\tcompat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj\tCR/LF line endings
215
-1\tcompat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.filters\tCR/LF line endings
216
-1\tcompat/zlib/contrib/vstudio/vc10/zlibvc.def\tCR/LF line endings
217
-1\tcompat/zlib/contrib/vstudio/vc10/zlibvc.sln\tCR/LF line endings
218
-1\tcompat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj\tCR/LF line endings
219
-1\tcompat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.filters\tCR/LF line endings
220
-1\tcompat/zlib/contrib/vstudio/vc11/miniunz.vcxproj\tCR/LF line endings
221
-1\tcompat/zlib/contrib/vstudio/vc11/minizip.vcxproj\tCR/LF line endings
222
-1\tcompat/zlib/contrib/vstudio/vc11/testzlib.vcxproj\tCR/LF line endings
223
-1\tcompat/zlib/contrib/vstudio/vc11/testzlibdll.vcxproj\tCR/LF line endings
224
-1\tcompat/zlib/contrib/vstudio/vc11/zlib.rc\tCR/LF line endings
225
-1\tcompat/zlib/contrib/vstudio/vc11/zlibstat.vcxproj\tCR/LF line endings
226
-1\tcompat/zlib/contrib/vstudio/vc11/zlibvc.def\tCR/LF line endings
227
-1\tcompat/zlib/contrib/vstudio/vc11/zlibvc.sln\tCR/LF line endings
228
-1\tcompat/zlib/contrib/vstudio/vc11/zlibvc.vcxproj\tCR/LF line endings
229
-1\tcompat/zlib/contrib/vstudio/vc12/zlibvc.def\tCR/LF line endings
230
-1\tcompat/zlib/contrib/vstudio/vc14/zlibvc.def\tCR/LF line endings
231
-1\tcompat/zlib/contrib/vstudio/vc9/miniunz.vcproj\tCR/LF line endings
232
-1\tcompat/zlib/contrib/vstudio/vc9/minizip.vcproj\tCR/LF line endings
233
-1\tcompat/zlib/contrib/vstudio/vc9/testzlib.vcproj\tCR/LF line endings
234
-1\tcompat/zlib/contrib/vstudio/vc9/testzlibdll.vcproj\tCR/LF line endings
235
-1\tcompat/zlib/contrib/vstudio/vc9/zlib.rc\tCR/LF line endings
236
-1\tcompat/zlib/contrib/vstudio/vc9/zlibstat.vcproj\tCR/LF line endings
237
-1\tcompat/zlib/contrib/vstudio/vc9/zlibvc.def\tCR/LF line endings
238
-1\tcompat/zlib/contrib/vstudio/vc9/zlibvc.sln\tCR/LF line endings
239
-1\tcompat/zlib/contrib/vstudio/vc9/zlibvc.vcproj\tCR/LF line endings
240
-1\tcompat/zlib/win32/zlib.def\tCR/LF line endings
241
-1\tcompat/zlib/zlib.3.pdf\tbinary data
242
-1\tcompat/zlib/zlib.map\tCR/LF line endings
243
-1\tsetup/fossil.iss\tCR/LF line endings
244
-1\tskins/blitz/arrow_project.png\tbinary data
245
-1\tskins/blitz/dir.png\tbinary data
246
-1\tskins/blitz/file.png\tbinary data
247
-1\tskins/blitz/fossil_100.png\tbinary data
248
-1\tskins/blitz/fossil_80_reversed_darkcyan.png\tbinary data
249
-1\tskins/blitz/fossil_80_reversed_darkcyan_text.png\tbinary data
250
-1\tskins/blitz/rss_20.png\tbinary data
251
-1\tskins/bootstrap/css.txt\tlong lines
252
-1\ttest/th1-docs-input.txt\tCR/LF line endings
253
-1\ttest/th1-hooks-input.txt\tCR/LF line endings
254
-1\ttest/utf16be.txt\tUnicode
255
-1\ttest/utf16le.txt\tUnicode
256
-1\twin/buildmsvc.bat\tCR/LF line endings
257
-1\twin/fossil.ico\tbinary data
258
-1\twin/fossil.rc\tinvalid UTF-8
259
-1\twww/CollRev1.gif\tbinary data
260
-1\twww/CollRev2.gif\tbinary data
261
-1\twww/CollRev3.gif\tbinary data
262
-1\twww/CollRev4.gif\tbinary data
263
-1\twww/apple-touch-icon.png\tbinary data
264
-1\twww/background.jpg\tbinary data
265
-1\twww/branch01.gif\tbinary data
266
-1\twww/branch02.gif\tbinary data
267
-1\twww/branch03.gif\tbinary data
268
-1\twww/branch04.gif\tbinary data
269
-1\twww/branch05.gif\tbinary data
270
-1\twww/build-icons/linux.gif\tbinary data
271
-1\twww/build-icons/linux64.gif\tbinary data
272
-1\twww/build-icons/mac.gif\tbinary data
273
-1\twww/build-icons/openbsd.gif\tbinary data
274
-1\twww/build-icons/src.gif\tbinary data
275
-1\twww/build-icons/win32.gif\tbinary data
276
-1\twww/concept1.gif\tbinary data
277
-1\twww/concept2.gif\tbinary data
278
-1\twww/copyright-release.pdf\tbinary data
279
-1\twww/delta1.gif\tbinary data
280
-1\twww/delta2.gif\tbinary data
281
-1\twww/delta3.gif\tbinary data
282
-1\twww/delta4.gif\tbinary data
283
-1\twww/delta5.gif\tbinary data
284
-1\twww/delta6.gif\tbinary data
285
-1\twww/encode1.gif\tbinary data
286
-1\twww/encode10.gif\tbinary data
287
-1\twww/encode2.gif\tbinary data
288
-1\twww/encode3.gif\tbinary data
289
-1\twww/encode4.gif\tbinary data
290
-1\twww/encode5.gif\tbinary data
291
-1\twww/encode6.gif\tbinary data
292
-1\twww/encode7.gif\tbinary data
293
-1\twww/encode8.gif\tbinary data
294
-1\twww/encode9.gif\tbinary data
295
-1\twww/fossil.gif\tbinary data
296
-1\twww/fossil2.gif\tbinary data
297
-1\twww/fossil3.gif\tbinary data
298
-1\twww/fossil_logo_small.gif\tbinary data
299
-1\twww/fossil_logo_small2.gif\tbinary data
300
-1\twww/fossil_logo_small3.gif\tbinary data
301
-1\twww/xkcd-git.gif\tbinary data
302
-1}]]}
168
+} {
169
+ test pre-commit-warnings-fossil-1 {[normalize_result] eq \
170
+ [subst -nocommands -novariables [string trim {
171
+ 1\tart/branching.odp\tbinary data
172
+ 1\tart/concept1.dia\tbinary data
173
+ 1\tart/concept2.dia\tbinary data
174
+ 1\tcompat/zlib/contrib/blast/test.pk\tbinary data
175
+ 1\tcompat/zlib/contrib/dotzlib/DotZLib.build\tCR/LF line endings
176
+ 1\tcompat/zlib/contrib/dotzlib/DotZLib.chm\tbinary data
177
+ 1\tcompat/zlib/contrib/dotzlib/DotZLib.sln\tCR/LF line endings
178
+ 1\tcompat/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs\tCR/LF line endings
179
+ 1\tcompat/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs\tinvalid UTF-8
180
+ 1\tcompat/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs\tinvalid UTF-8
181
+ 1\tcompat/zlib/contrib/dotzlib/DotZLib/CodecBase.cs\tinvalid UTF-8
182
+ 1\tcompat/zlib/contrib/dotzlib/DotZLib/Deflater.cs\tinvalid UTF-8
183
+ 1\tcompat/zlib/contrib/dotzlib/DotZLib/DotZLib.cs\tinvalid UTF-8
184
+ 1\tcompat/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj\tCR/LF line endings
185
+ 1\tcompat/zlib/contrib/dotzlib/DotZLib/GZipStream.cs\tinvalid UTF-8
186
+ 1\tcompat/zlib/contrib/dotzlib/DotZLib/Inflater.cs\tinvalid UTF-8
187
+ 1\tcompat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs\tCR/LF line endings
188
+ 1\tcompat/zlib/contrib/dotzlib/LICENSE_1_0.txt\tCR/LF line endings
189
+ 1\tcompat/zlib/contrib/dotzlib/readme.txt\tCR/LF line endings
190
+ 1\tcompat/zlib/contrib/gcc_gvmat64/gvmat64.S\tCR/LF line endings
191
+ 1\tcompat/zlib/contrib/masmx64/bld_ml64.bat\tCR/LF line endings
192
+ 1\tcompat/zlib/contrib/masmx64/gvmat64.asm\tCR/LF line endings
193
+ 1\tcompat/zlib/contrib/masmx64/inffas8664.c\tCR/LF line endings
194
+ 1\tcompat/zlib/contrib/masmx64/inffasx64.asm\tCR/LF line endings
195
+ 1\tcompat/zlib/contrib/masmx64/readme.txt\tCR/LF line endings
196
+ 1\tcompat/zlib/contrib/masmx86/bld_ml32.bat\tCR/LF line endings
197
+ 1\tcompat/zlib/contrib/masmx86/inffas32.asm\tCR/LF line endings
198
+ 1\tcompat/zlib/contrib/masmx86/match686.asm\tCR/LF line endings
199
+ 1\tcompat/zlib/contrib/masmx86/readme.txt\tCR/LF line endings
200
+ 1\tcompat/zlib/contrib/puff/zeros.raw\tbinary data
201
+ 1\tcompat/zlib/contrib/testzlib/testzlib.c\tCR/LF line endings
202
+ 1\tcompat/zlib/contrib/testzlib/testzlib.txt\tCR/LF line endings
203
+ 1\tcompat/zlib/contrib/vstudio/readme.txt\tCR/LF line endings
204
+ 1\tcompat/zlib/contrib/vstudio/vc10/miniunz.vcxproj\tCR/LF line endings
205
+ 1\tcompat/zlib/contrib/vstudio/vc10/miniunz.vcxproj.filters\tCR/LF line endings
206
+ 1\tcompat/zlib/contrib/vstudio/vc10/minizip.vcxproj\tCR/LF line endings
207
+ 1\tcompat/zlib/contrib/vstudio/vc10/minizip.vcxproj.filters\tCR/LF line endings
208
+ 1\tcompat/zlib/contrib/vstudio/vc10/testzlib.vcxproj\tCR/LF line endings
209
+ 1\tcompat/zlib/contrib/vstudio/vc10/testzlib.vcxproj.filters\tCR/LF line endings
210
+ 1\tcompat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj\tCR/LF line endings
211
+ 1\tcompat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.filters\tCR/LF line endings
212
+ 1\tcompat/zlib/contrib/vstudio/vc10/zlib.rc\tCR/LF line endings
213
+ 1\tcompat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj\tCR/LF line endings
214
+ 1\tcompat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.filters\tCR/LF line endings
215
+ 1\tcompat/zlib/contrib/vstudio/vc10/zlibvc.def\tCR/LF line endings
216
+ 1\tcompat/zlib/contrib/vstudio/vc10/zlibvc.sln\tCR/LF line endings
217
+ 1\tcompat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj\tCR/LF line endings
218
+ 1\tcompat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.filters\tCR/LF line endings
219
+ 1\tcompat/zlib/contrib/vstudio/vc11/miniunz.vcxproj\tCR/LF line endings
220
+ 1\tcompat/zlib/contrib/vstudio/vc11/minizip.vcxproj\tCR/LF line endings
221
+ 1\tcompat/zlib/contrib/vstudio/vc11/testzlib.vcxproj\tCR/LF line endings
222
+ 1\tcompat/zlib/contrib/vstudio/vc11/testzlibdll.vcxproj\tCR/LF line endings
223
+ 1\tcompat/zlib/contrib/vstudio/vc11/zlib.rc\tCR/LF line endings
224
+ 1\tcompat/zlib/contrib/vstudio/vc11/zlibstat.vcxproj\tCR/LF line endings
225
+ 1\tcompat/zlib/contrib/vstudio/vc11/zlibvc.def\tCR/LF line endings
226
+ 1\tcompat/zlib/contrib/vstudio/vc11/zlibvc.sln\tCR/LF line endings
227
+ 1\tcompat/zlib/contrib/vstudio/vc11/zlibvc.vcxproj\tCR/LF line endings
228
+ 1\tcompat/zlib/contrib/vstudio/vc12/zlibvc.def\tCR/LF line endings
229
+ 1\tcompat/zlib/contrib/vstudio/vc14/zlibvc.def\tCR/LF line endings
230
+ 1\tcompat/zlib/contrib/vstudio/vc9/miniunz.vcproj\tCR/LF line endings
231
+ 1\tcompat/zlib/contrib/vstudio/vc9/minizip.vcproj\tCR/LF line endings
232
+ 1\tcompat/zlib/contrib/vstudio/vc9/testzlib.vcproj\tCR/LF line endings
233
+ 1\tcompat/zlib/contrib/vstudio/vc9/testzlibdll.vcproj\tCR/LF line endings
234
+ 1\tcompat/zlib/contrib/vstudio/vc9/zlib.rc\tCR/LF line endings
235
+ 1\tcompat/zlib/contrib/vstudio/vc9/zlibstat.vcproj\tCR/LF line endings
236
+ 1\tcompat/zlib/contrib/vstudio/vc9/zlibvc.def\tCR/LF line endings
237
+ 1\tcompat/zlib/contrib/vstudio/vc9/zlibvc.sln\tCR/LF line endings
238
+ 1\tcompat/zlib/contrib/vstudio/vc9/zlibvc.vcproj\tCR/LF line endings
239
+ 1\tcompat/zlib/win32/zlib.def\tCR/LF line endings
240
+ 1\tcompat/zlib/zlib.3.pdf\tbinary data
241
+ 1\tcompat/zlib/zlib.map\tCR/LF line endings
242
+ 1\tsetup/fossil.iss\tCR/LF line endings
243
+ 1\tskins/blitz/arrow_project.png\tbinary data
244
+ 1\tskins/blitz/dir.png\tbinary data
245
+ 1\tskins/blitz/file.png\tbinary data
246
+ 1\tskins/blitz/fossil_100.png\tbinary data
247
+ 1\tskins/blitz/fossil_80_reversed_darkcyan.png\tbinary data
248
+ 1\tskins/blitz/fossil_80_reversed_darkcyan_text.png\tbinary data
249
+ 1\tskins/blitz/rss_20.png\tbinary data
250
+ 1\tskins/bootstrap/css.txt\tlong lines
251
+ 1\ttest/th1-docs-input.txt\tCR/LF line endings
252
+ 1\ttest/th1-hooks-input.txt\tCR/LF line endings
253
+ 1\ttest/utf16be.txt\tUnicode
254
+ 1\ttest/utf16le.txt\tUnicode
255
+ 1\twin/buildmsvc.bat\tCR/LF line endings
256
+ 1\twin/fossil.ico\tbinary data
257
+ 1\twin/fossil.rc\tinvalid UTF-8
258
+ 1\twww/CollRev1.gif\tbinary data
259
+ 1\twww/CollRev2.gif\tbinary data
260
+ 1\twww/CollRev3.gif\tbinary data
261
+ 1\twww/CollRev4.gif\tbinary data
262
+ 1\twww/apple-touch-icon.png\tbinary data
263
+ 1\twww/background.jpg\tbinary data
264
+ 1\twww/branch01.gif\tbinary data
265
+ 1\twww/branch02.gif\tbinary data
266
+ 1\twww/branch03.gif\tbinary data
267
+ 1\twww/branch04.gif\tbinary data
268
+ 1\twww/branch05.gif\tbinary data
269
+ 1\twww/build-icons/linux.gif\tbinary data
270
+ 1\twww/build-icons/linux64.gif\tbinary data
271
+ 1\twww/build-icons/mac.gif\tbinary data
272
+ 1\twww/build-icons/openbsd.gif\tbinary data
273
+ 1\twww/build-icons/src.gif\tbinary data
274
+ 1\twww/build-icons/win32.gif\tbinary data
275
+ 1\twww/concept1.gif\tbinary data
276
+ 1\twww/concept2.gif\tbinary data
277
+ 1\twww/copyright-release.pdf\tbinary data
278
+ 1\twww/delta1.gif\tbinary data
279
+ 1\twww/delta2.gif\tbinary data
280
+ 1\twww/delta3.gif\tbinary data
281
+ 1\twww/delta4.gif\tbinary data
282
+ 1\twww/delta5.gif\tbinary data
283
+ 1\twww/delta6.gif\tbinary data
284
+ 1\twww/encode1.gif\tbinary data
285
+ 1\twww/encode10.gif\tbinary data
286
+ 1\twww/encode2.gif\tbinary data
287
+ 1\twww/encode3.gif\tbinary data
288
+ 1\twww/encode4.gif\tbinary data
289
+ 1\twww/encode5.gif\tbinary data
290
+ 1\twww/encode6.gif\tbinary data
291
+ 1\twww/encode7.gif\tbinary data
292
+ 1\twww/encode8.gif\tbinary data
293
+ 1\twww/encode9.gif\tbinary data
294
+ 1\twww/fossil.gif\tbinary data
295
+ 1\twww/fossil2.gif\tbinary data
296
+ 1\twww/fossil3.gif\tbinary data
297
+ 1\twww/fossil_logo_small.gif\tbinary data
298
+ 1\twww/fossil_logo_small2.gif\tbinary data
299
+ 1\twww/fossil_logo_small3.gif\tbinary data
300
+ 1\twww/xkcd-git.gif\tbinary data
301
+ 1}]]}
302
+}
303303
304304
###############################################################################
305305
306306
test_cleanup
307307
--- test/commit-warning.test
+++ test/commit-warning.test
@@ -161,146 +161,146 @@
161 # be fragile as development progresses.
162 #
163 # Unless the real goal of this test is to document a collection
164 # of source files that MUST NEVER BE TEXT.
165 #
166 run_in_checkout {
167 fossil test-commit-warning --no-settings
168 }
169
170 test pre-commit-warnings-fossil-1 {[normalize_result] eq \
171 [subst -nocommands -novariables [string trim {
172 1\tart/branching.odp\tbinary data
173 1\tart/concept1.dia\tbinary data
174 1\tart/concept2.dia\tbinary data
175 1\tcompat/zlib/contrib/blast/test.pk\tbinary data
176 1\tcompat/zlib/contrib/dotzlib/DotZLib.build\tCR/LF line endings
177 1\tcompat/zlib/contrib/dotzlib/DotZLib.chm\tbinary data
178 1\tcompat/zlib/contrib/dotzlib/DotZLib.sln\tCR/LF line endings
179 1\tcompat/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs\tCR/LF line endings
180 1\tcompat/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs\tinvalid UTF-8
181 1\tcompat/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs\tinvalid UTF-8
182 1\tcompat/zlib/contrib/dotzlib/DotZLib/CodecBase.cs\tinvalid UTF-8
183 1\tcompat/zlib/contrib/dotzlib/DotZLib/Deflater.cs\tinvalid UTF-8
184 1\tcompat/zlib/contrib/dotzlib/DotZLib/DotZLib.cs\tinvalid UTF-8
185 1\tcompat/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj\tCR/LF line endings
186 1\tcompat/zlib/contrib/dotzlib/DotZLib/GZipStream.cs\tinvalid UTF-8
187 1\tcompat/zlib/contrib/dotzlib/DotZLib/Inflater.cs\tinvalid UTF-8
188 1\tcompat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs\tCR/LF line endings
189 1\tcompat/zlib/contrib/dotzlib/LICENSE_1_0.txt\tCR/LF line endings
190 1\tcompat/zlib/contrib/dotzlib/readme.txt\tCR/LF line endings
191 1\tcompat/zlib/contrib/gcc_gvmat64/gvmat64.S\tCR/LF line endings
192 1\tcompat/zlib/contrib/masmx64/bld_ml64.bat\tCR/LF line endings
193 1\tcompat/zlib/contrib/masmx64/gvmat64.asm\tCR/LF line endings
194 1\tcompat/zlib/contrib/masmx64/inffas8664.c\tCR/LF line endings
195 1\tcompat/zlib/contrib/masmx64/inffasx64.asm\tCR/LF line endings
196 1\tcompat/zlib/contrib/masmx64/readme.txt\tCR/LF line endings
197 1\tcompat/zlib/contrib/masmx86/bld_ml32.bat\tCR/LF line endings
198 1\tcompat/zlib/contrib/masmx86/inffas32.asm\tCR/LF line endings
199 1\tcompat/zlib/contrib/masmx86/match686.asm\tCR/LF line endings
200 1\tcompat/zlib/contrib/masmx86/readme.txt\tCR/LF line endings
201 1\tcompat/zlib/contrib/puff/zeros.raw\tbinary data
202 1\tcompat/zlib/contrib/testzlib/testzlib.c\tCR/LF line endings
203 1\tcompat/zlib/contrib/testzlib/testzlib.txt\tCR/LF line endings
204 1\tcompat/zlib/contrib/vstudio/readme.txt\tCR/LF line endings
205 1\tcompat/zlib/contrib/vstudio/vc10/miniunz.vcxproj\tCR/LF line endings
206 1\tcompat/zlib/contrib/vstudio/vc10/miniunz.vcxproj.filters\tCR/LF line endings
207 1\tcompat/zlib/contrib/vstudio/vc10/minizip.vcxproj\tCR/LF line endings
208 1\tcompat/zlib/contrib/vstudio/vc10/minizip.vcxproj.filters\tCR/LF line endings
209 1\tcompat/zlib/contrib/vstudio/vc10/testzlib.vcxproj\tCR/LF line endings
210 1\tcompat/zlib/contrib/vstudio/vc10/testzlib.vcxproj.filters\tCR/LF line endings
211 1\tcompat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj\tCR/LF line endings
212 1\tcompat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.filters\tCR/LF line endings
213 1\tcompat/zlib/contrib/vstudio/vc10/zlib.rc\tCR/LF line endings
214 1\tcompat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj\tCR/LF line endings
215 1\tcompat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.filters\tCR/LF line endings
216 1\tcompat/zlib/contrib/vstudio/vc10/zlibvc.def\tCR/LF line endings
217 1\tcompat/zlib/contrib/vstudio/vc10/zlibvc.sln\tCR/LF line endings
218 1\tcompat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj\tCR/LF line endings
219 1\tcompat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.filters\tCR/LF line endings
220 1\tcompat/zlib/contrib/vstudio/vc11/miniunz.vcxproj\tCR/LF line endings
221 1\tcompat/zlib/contrib/vstudio/vc11/minizip.vcxproj\tCR/LF line endings
222 1\tcompat/zlib/contrib/vstudio/vc11/testzlib.vcxproj\tCR/LF line endings
223 1\tcompat/zlib/contrib/vstudio/vc11/testzlibdll.vcxproj\tCR/LF line endings
224 1\tcompat/zlib/contrib/vstudio/vc11/zlib.rc\tCR/LF line endings
225 1\tcompat/zlib/contrib/vstudio/vc11/zlibstat.vcxproj\tCR/LF line endings
226 1\tcompat/zlib/contrib/vstudio/vc11/zlibvc.def\tCR/LF line endings
227 1\tcompat/zlib/contrib/vstudio/vc11/zlibvc.sln\tCR/LF line endings
228 1\tcompat/zlib/contrib/vstudio/vc11/zlibvc.vcxproj\tCR/LF line endings
229 1\tcompat/zlib/contrib/vstudio/vc12/zlibvc.def\tCR/LF line endings
230 1\tcompat/zlib/contrib/vstudio/vc14/zlibvc.def\tCR/LF line endings
231 1\tcompat/zlib/contrib/vstudio/vc9/miniunz.vcproj\tCR/LF line endings
232 1\tcompat/zlib/contrib/vstudio/vc9/minizip.vcproj\tCR/LF line endings
233 1\tcompat/zlib/contrib/vstudio/vc9/testzlib.vcproj\tCR/LF line endings
234 1\tcompat/zlib/contrib/vstudio/vc9/testzlibdll.vcproj\tCR/LF line endings
235 1\tcompat/zlib/contrib/vstudio/vc9/zlib.rc\tCR/LF line endings
236 1\tcompat/zlib/contrib/vstudio/vc9/zlibstat.vcproj\tCR/LF line endings
237 1\tcompat/zlib/contrib/vstudio/vc9/zlibvc.def\tCR/LF line endings
238 1\tcompat/zlib/contrib/vstudio/vc9/zlibvc.sln\tCR/LF line endings
239 1\tcompat/zlib/contrib/vstudio/vc9/zlibvc.vcproj\tCR/LF line endings
240 1\tcompat/zlib/win32/zlib.def\tCR/LF line endings
241 1\tcompat/zlib/zlib.3.pdf\tbinary data
242 1\tcompat/zlib/zlib.map\tCR/LF line endings
243 1\tsetup/fossil.iss\tCR/LF line endings
244 1\tskins/blitz/arrow_project.png\tbinary data
245 1\tskins/blitz/dir.png\tbinary data
246 1\tskins/blitz/file.png\tbinary data
247 1\tskins/blitz/fossil_100.png\tbinary data
248 1\tskins/blitz/fossil_80_reversed_darkcyan.png\tbinary data
249 1\tskins/blitz/fossil_80_reversed_darkcyan_text.png\tbinary data
250 1\tskins/blitz/rss_20.png\tbinary data
251 1\tskins/bootstrap/css.txt\tlong lines
252 1\ttest/th1-docs-input.txt\tCR/LF line endings
253 1\ttest/th1-hooks-input.txt\tCR/LF line endings
254 1\ttest/utf16be.txt\tUnicode
255 1\ttest/utf16le.txt\tUnicode
256 1\twin/buildmsvc.bat\tCR/LF line endings
257 1\twin/fossil.ico\tbinary data
258 1\twin/fossil.rc\tinvalid UTF-8
259 1\twww/CollRev1.gif\tbinary data
260 1\twww/CollRev2.gif\tbinary data
261 1\twww/CollRev3.gif\tbinary data
262 1\twww/CollRev4.gif\tbinary data
263 1\twww/apple-touch-icon.png\tbinary data
264 1\twww/background.jpg\tbinary data
265 1\twww/branch01.gif\tbinary data
266 1\twww/branch02.gif\tbinary data
267 1\twww/branch03.gif\tbinary data
268 1\twww/branch04.gif\tbinary data
269 1\twww/branch05.gif\tbinary data
270 1\twww/build-icons/linux.gif\tbinary data
271 1\twww/build-icons/linux64.gif\tbinary data
272 1\twww/build-icons/mac.gif\tbinary data
273 1\twww/build-icons/openbsd.gif\tbinary data
274 1\twww/build-icons/src.gif\tbinary data
275 1\twww/build-icons/win32.gif\tbinary data
276 1\twww/concept1.gif\tbinary data
277 1\twww/concept2.gif\tbinary data
278 1\twww/copyright-release.pdf\tbinary data
279 1\twww/delta1.gif\tbinary data
280 1\twww/delta2.gif\tbinary data
281 1\twww/delta3.gif\tbinary data
282 1\twww/delta4.gif\tbinary data
283 1\twww/delta5.gif\tbinary data
284 1\twww/delta6.gif\tbinary data
285 1\twww/encode1.gif\tbinary data
286 1\twww/encode10.gif\tbinary data
287 1\twww/encode2.gif\tbinary data
288 1\twww/encode3.gif\tbinary data
289 1\twww/encode4.gif\tbinary data
290 1\twww/encode5.gif\tbinary data
291 1\twww/encode6.gif\tbinary data
292 1\twww/encode7.gif\tbinary data
293 1\twww/encode8.gif\tbinary data
294 1\twww/encode9.gif\tbinary data
295 1\twww/fossil.gif\tbinary data
296 1\twww/fossil2.gif\tbinary data
297 1\twww/fossil3.gif\tbinary data
298 1\twww/fossil_logo_small.gif\tbinary data
299 1\twww/fossil_logo_small2.gif\tbinary data
300 1\twww/fossil_logo_small3.gif\tbinary data
301 1\twww/xkcd-git.gif\tbinary data
302 1}]]}
303
304 ###############################################################################
305
306 test_cleanup
307
--- test/commit-warning.test
+++ test/commit-warning.test
@@ -161,146 +161,146 @@
161 # be fragile as development progresses.
162 #
163 # Unless the real goal of this test is to document a collection
164 # of source files that MUST NEVER BE TEXT.
165 #
166 test_block_in_checkout pre-commit-warnings-fossil-1 {
167 fossil test-commit-warning --no-settings
168 } {
169 test pre-commit-warnings-fossil-1 {[normalize_result] eq \
170 [subst -nocommands -novariables [string trim {
171 1\tart/branching.odp\tbinary data
172 1\tart/concept1.dia\tbinary data
173 1\tart/concept2.dia\tbinary data
174 1\tcompat/zlib/contrib/blast/test.pk\tbinary data
175 1\tcompat/zlib/contrib/dotzlib/DotZLib.build\tCR/LF line endings
176 1\tcompat/zlib/contrib/dotzlib/DotZLib.chm\tbinary data
177 1\tcompat/zlib/contrib/dotzlib/DotZLib.sln\tCR/LF line endings
178 1\tcompat/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs\tCR/LF line endings
179 1\tcompat/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs\tinvalid UTF-8
180 1\tcompat/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs\tinvalid UTF-8
181 1\tcompat/zlib/contrib/dotzlib/DotZLib/CodecBase.cs\tinvalid UTF-8
182 1\tcompat/zlib/contrib/dotzlib/DotZLib/Deflater.cs\tinvalid UTF-8
183 1\tcompat/zlib/contrib/dotzlib/DotZLib/DotZLib.cs\tinvalid UTF-8
184 1\tcompat/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj\tCR/LF line endings
185 1\tcompat/zlib/contrib/dotzlib/DotZLib/GZipStream.cs\tinvalid UTF-8
186 1\tcompat/zlib/contrib/dotzlib/DotZLib/Inflater.cs\tinvalid UTF-8
187 1\tcompat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs\tCR/LF line endings
188 1\tcompat/zlib/contrib/dotzlib/LICENSE_1_0.txt\tCR/LF line endings
189 1\tcompat/zlib/contrib/dotzlib/readme.txt\tCR/LF line endings
190 1\tcompat/zlib/contrib/gcc_gvmat64/gvmat64.S\tCR/LF line endings
191 1\tcompat/zlib/contrib/masmx64/bld_ml64.bat\tCR/LF line endings
192 1\tcompat/zlib/contrib/masmx64/gvmat64.asm\tCR/LF line endings
193 1\tcompat/zlib/contrib/masmx64/inffas8664.c\tCR/LF line endings
194 1\tcompat/zlib/contrib/masmx64/inffasx64.asm\tCR/LF line endings
195 1\tcompat/zlib/contrib/masmx64/readme.txt\tCR/LF line endings
196 1\tcompat/zlib/contrib/masmx86/bld_ml32.bat\tCR/LF line endings
197 1\tcompat/zlib/contrib/masmx86/inffas32.asm\tCR/LF line endings
198 1\tcompat/zlib/contrib/masmx86/match686.asm\tCR/LF line endings
199 1\tcompat/zlib/contrib/masmx86/readme.txt\tCR/LF line endings
200 1\tcompat/zlib/contrib/puff/zeros.raw\tbinary data
201 1\tcompat/zlib/contrib/testzlib/testzlib.c\tCR/LF line endings
202 1\tcompat/zlib/contrib/testzlib/testzlib.txt\tCR/LF line endings
203 1\tcompat/zlib/contrib/vstudio/readme.txt\tCR/LF line endings
204 1\tcompat/zlib/contrib/vstudio/vc10/miniunz.vcxproj\tCR/LF line endings
205 1\tcompat/zlib/contrib/vstudio/vc10/miniunz.vcxproj.filters\tCR/LF line endings
206 1\tcompat/zlib/contrib/vstudio/vc10/minizip.vcxproj\tCR/LF line endings
207 1\tcompat/zlib/contrib/vstudio/vc10/minizip.vcxproj.filters\tCR/LF line endings
208 1\tcompat/zlib/contrib/vstudio/vc10/testzlib.vcxproj\tCR/LF line endings
209 1\tcompat/zlib/contrib/vstudio/vc10/testzlib.vcxproj.filters\tCR/LF line endings
210 1\tcompat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj\tCR/LF line endings
211 1\tcompat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.filters\tCR/LF line endings
212 1\tcompat/zlib/contrib/vstudio/vc10/zlib.rc\tCR/LF line endings
213 1\tcompat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj\tCR/LF line endings
214 1\tcompat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.filters\tCR/LF line endings
215 1\tcompat/zlib/contrib/vstudio/vc10/zlibvc.def\tCR/LF line endings
216 1\tcompat/zlib/contrib/vstudio/vc10/zlibvc.sln\tCR/LF line endings
217 1\tcompat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj\tCR/LF line endings
218 1\tcompat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.filters\tCR/LF line endings
219 1\tcompat/zlib/contrib/vstudio/vc11/miniunz.vcxproj\tCR/LF line endings
220 1\tcompat/zlib/contrib/vstudio/vc11/minizip.vcxproj\tCR/LF line endings
221 1\tcompat/zlib/contrib/vstudio/vc11/testzlib.vcxproj\tCR/LF line endings
222 1\tcompat/zlib/contrib/vstudio/vc11/testzlibdll.vcxproj\tCR/LF line endings
223 1\tcompat/zlib/contrib/vstudio/vc11/zlib.rc\tCR/LF line endings
224 1\tcompat/zlib/contrib/vstudio/vc11/zlibstat.vcxproj\tCR/LF line endings
225 1\tcompat/zlib/contrib/vstudio/vc11/zlibvc.def\tCR/LF line endings
226 1\tcompat/zlib/contrib/vstudio/vc11/zlibvc.sln\tCR/LF line endings
227 1\tcompat/zlib/contrib/vstudio/vc11/zlibvc.vcxproj\tCR/LF line endings
228 1\tcompat/zlib/contrib/vstudio/vc12/zlibvc.def\tCR/LF line endings
229 1\tcompat/zlib/contrib/vstudio/vc14/zlibvc.def\tCR/LF line endings
230 1\tcompat/zlib/contrib/vstudio/vc9/miniunz.vcproj\tCR/LF line endings
231 1\tcompat/zlib/contrib/vstudio/vc9/minizip.vcproj\tCR/LF line endings
232 1\tcompat/zlib/contrib/vstudio/vc9/testzlib.vcproj\tCR/LF line endings
233 1\tcompat/zlib/contrib/vstudio/vc9/testzlibdll.vcproj\tCR/LF line endings
234 1\tcompat/zlib/contrib/vstudio/vc9/zlib.rc\tCR/LF line endings
235 1\tcompat/zlib/contrib/vstudio/vc9/zlibstat.vcproj\tCR/LF line endings
236 1\tcompat/zlib/contrib/vstudio/vc9/zlibvc.def\tCR/LF line endings
237 1\tcompat/zlib/contrib/vstudio/vc9/zlibvc.sln\tCR/LF line endings
238 1\tcompat/zlib/contrib/vstudio/vc9/zlibvc.vcproj\tCR/LF line endings
239 1\tcompat/zlib/win32/zlib.def\tCR/LF line endings
240 1\tcompat/zlib/zlib.3.pdf\tbinary data
241 1\tcompat/zlib/zlib.map\tCR/LF line endings
242 1\tsetup/fossil.iss\tCR/LF line endings
243 1\tskins/blitz/arrow_project.png\tbinary data
244 1\tskins/blitz/dir.png\tbinary data
245 1\tskins/blitz/file.png\tbinary data
246 1\tskins/blitz/fossil_100.png\tbinary data
247 1\tskins/blitz/fossil_80_reversed_darkcyan.png\tbinary data
248 1\tskins/blitz/fossil_80_reversed_darkcyan_text.png\tbinary data
249 1\tskins/blitz/rss_20.png\tbinary data
250 1\tskins/bootstrap/css.txt\tlong lines
251 1\ttest/th1-docs-input.txt\tCR/LF line endings
252 1\ttest/th1-hooks-input.txt\tCR/LF line endings
253 1\ttest/utf16be.txt\tUnicode
254 1\ttest/utf16le.txt\tUnicode
255 1\twin/buildmsvc.bat\tCR/LF line endings
256 1\twin/fossil.ico\tbinary data
257 1\twin/fossil.rc\tinvalid UTF-8
258 1\twww/CollRev1.gif\tbinary data
259 1\twww/CollRev2.gif\tbinary data
260 1\twww/CollRev3.gif\tbinary data
261 1\twww/CollRev4.gif\tbinary data
262 1\twww/apple-touch-icon.png\tbinary data
263 1\twww/background.jpg\tbinary data
264 1\twww/branch01.gif\tbinary data
265 1\twww/branch02.gif\tbinary data
266 1\twww/branch03.gif\tbinary data
267 1\twww/branch04.gif\tbinary data
268 1\twww/branch05.gif\tbinary data
269 1\twww/build-icons/linux.gif\tbinary data
270 1\twww/build-icons/linux64.gif\tbinary data
271 1\twww/build-icons/mac.gif\tbinary data
272 1\twww/build-icons/openbsd.gif\tbinary data
273 1\twww/build-icons/src.gif\tbinary data
274 1\twww/build-icons/win32.gif\tbinary data
275 1\twww/concept1.gif\tbinary data
276 1\twww/concept2.gif\tbinary data
277 1\twww/copyright-release.pdf\tbinary data
278 1\twww/delta1.gif\tbinary data
279 1\twww/delta2.gif\tbinary data
280 1\twww/delta3.gif\tbinary data
281 1\twww/delta4.gif\tbinary data
282 1\twww/delta5.gif\tbinary data
283 1\twww/delta6.gif\tbinary data
284 1\twww/encode1.gif\tbinary data
285 1\twww/encode10.gif\tbinary data
286 1\twww/encode2.gif\tbinary data
287 1\twww/encode3.gif\tbinary data
288 1\twww/encode4.gif\tbinary data
289 1\twww/encode5.gif\tbinary data
290 1\twww/encode6.gif\tbinary data
291 1\twww/encode7.gif\tbinary data
292 1\twww/encode8.gif\tbinary data
293 1\twww/encode9.gif\tbinary data
294 1\twww/fossil.gif\tbinary data
295 1\twww/fossil2.gif\tbinary data
296 1\twww/fossil3.gif\tbinary data
297 1\twww/fossil_logo_small.gif\tbinary data
298 1\twww/fossil_logo_small2.gif\tbinary data
299 1\twww/fossil_logo_small3.gif\tbinary data
300 1\twww/xkcd-git.gif\tbinary data
301 1}]]}
302 }
303
304 ###############################################################################
305
306 test_cleanup
307
+56 -9
--- test/tester.tcl
+++ test/tester.tcl
@@ -31,14 +31,21 @@
3131
set testrundir [pwd]
3232
set testdir [file normalize [file dirname $argv0]]
3333
set fossilexe [file normalize [lindex $argv 0]]
3434
set is_windows [expr {$::tcl_platform(platform) eq "windows"}]
3535
36
-if {$is_windows && \
37
- [string length [file extension $fossilexe]] == 0} {
38
- append fossilexe .exe
36
+if {$::is_windows} {
37
+ if {[string length [file extension $fossilexe]] == 0} {
38
+ append fossilexe .exe
39
+ }
40
+ set outside_fossil_repo [expr ![file exists "$::testfiledir\\..\\_FOSSIL_"]]
41
+} else {
42
+ set outside_fossil_repo [expr ![file exists "$::testfiledir/../.fslckout"]]
3943
}
44
+
45
+catch {exec $::fossilexe changes --changed} res
46
+set dirty_ckout [string length $res]
4047
4148
set argv [lrange $argv 1 end]
4249
4350
set i [lsearch $argv -keep]
4451
if {$i>=0} {
@@ -517,26 +524,66 @@
517524
fossil test-th-eval --open-config "setting th1-hooks"
518525
if {[normalize_result] eq "1"} {return 1}
519526
return [info exists ::env(TH1_ENABLE_HOOKS)]
520527
}
521528
522
-# This (rarely used) procedure is designed to run a test within the Fossil
523
-# source checkout (e.g. one that does NOT modify any state), while saving
524
-# and restoring the current directory (e.g. one used when running a test
525
-# file outside of the Fossil source checkout). Please do NOT use this
526
-# procedure unless you are absolutely sure it does not modify the state of
527
-# the repository or source checkout in any way.
529
+# Run the given command script inside the Fossil source repo checkout.
530
+#
531
+# Callers of this function must ensure two things:
532
+#
533
+# 1. This test run is in fact being done from within a Fossil repo
534
+# checkout directory. If you are unsure, test $::outside_fossil_repo
535
+# or call one of the test_* wrappers below which do that for you.
536
+#
537
+# As a rule, you should not be calling this function directly!
538
+#
539
+# 2. This test run is being done from a repo checkout directory that
540
+# doesn't have any uncommitted changes. If it does, that affects the
541
+# output of any test based on the output of "fossil status",
542
+# "... diff", etc., which is likely to make the test appear to fail.
543
+# If you must call this function directly, test $::dirty_ckout and
544
+# skip the call if it's true. The test_* wrappers do this for you.
528545
#
546
+# 3. The test does NOT modify the Fossil checkout tree in any way.
529547
proc run_in_checkout { script {dir ""} } {
530548
if {[string length $dir] == 0} {set dir $::testfiledir}
531549
set savedPwd [pwd]; cd $dir
532550
set code [catch {
533551
uplevel 1 $script
534552
} result]
535553
cd $savedPwd; unset savedPwd
536554
return -code $code $result
537555
}
556
+
557
+# Wrapper for the above function pair. The tscript parameter is an
558
+# optional post-run test script. Some callers choose instead to put
559
+# the tests inline with the rscript commands.
560
+#
561
+# Be sure to adhere to the requirements of run_in_checkout!
562
+proc test_block_in_checkout { name rscript {tscript ""} } {
563
+ if {$::outside_fossil_repo || $::dirty_ckout} {
564
+ set $::CODE 0
565
+ set $::RESULT ""
566
+ } else {
567
+ run_in_checkout $rscript
568
+ if {[string length $tscript] == 0} {
569
+ return ""
570
+ } else {
571
+ set code [catch {
572
+ uplevel 1 $tscript
573
+ } result]
574
+ return -code $code $result
575
+ }
576
+ }
577
+}
578
+
579
+# Single-test wrapper for the above.
580
+proc test_in_checkout { name rscript tscript } {
581
+ return test_block_in_checkout name rscript {
582
+ test $name $tscript
583
+ }
584
+}
538585
539586
# Normalize file status lists (like those returned by 'fossil changes')
540587
# so they can be compared using simple string comparison
541588
#
542589
proc normalize_status_list {list} {
543590
--- test/tester.tcl
+++ test/tester.tcl
@@ -31,14 +31,21 @@
31 set testrundir [pwd]
32 set testdir [file normalize [file dirname $argv0]]
33 set fossilexe [file normalize [lindex $argv 0]]
34 set is_windows [expr {$::tcl_platform(platform) eq "windows"}]
35
36 if {$is_windows && \
37 [string length [file extension $fossilexe]] == 0} {
38 append fossilexe .exe
 
 
 
 
39 }
 
 
 
40
41 set argv [lrange $argv 1 end]
42
43 set i [lsearch $argv -keep]
44 if {$i>=0} {
@@ -517,26 +524,66 @@
517 fossil test-th-eval --open-config "setting th1-hooks"
518 if {[normalize_result] eq "1"} {return 1}
519 return [info exists ::env(TH1_ENABLE_HOOKS)]
520 }
521
522 # This (rarely used) procedure is designed to run a test within the Fossil
523 # source checkout (e.g. one that does NOT modify any state), while saving
524 # and restoring the current directory (e.g. one used when running a test
525 # file outside of the Fossil source checkout). Please do NOT use this
526 # procedure unless you are absolutely sure it does not modify the state of
527 # the repository or source checkout in any way.
 
 
 
 
 
 
 
 
 
 
528 #
 
529 proc run_in_checkout { script {dir ""} } {
530 if {[string length $dir] == 0} {set dir $::testfiledir}
531 set savedPwd [pwd]; cd $dir
532 set code [catch {
533 uplevel 1 $script
534 } result]
535 cd $savedPwd; unset savedPwd
536 return -code $code $result
537 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
538
539 # Normalize file status lists (like those returned by 'fossil changes')
540 # so they can be compared using simple string comparison
541 #
542 proc normalize_status_list {list} {
543
--- test/tester.tcl
+++ test/tester.tcl
@@ -31,14 +31,21 @@
31 set testrundir [pwd]
32 set testdir [file normalize [file dirname $argv0]]
33 set fossilexe [file normalize [lindex $argv 0]]
34 set is_windows [expr {$::tcl_platform(platform) eq "windows"}]
35
36 if {$::is_windows} {
37 if {[string length [file extension $fossilexe]] == 0} {
38 append fossilexe .exe
39 }
40 set outside_fossil_repo [expr ![file exists "$::testfiledir\\..\\_FOSSIL_"]]
41 } else {
42 set outside_fossil_repo [expr ![file exists "$::testfiledir/../.fslckout"]]
43 }
44
45 catch {exec $::fossilexe changes --changed} res
46 set dirty_ckout [string length $res]
47
48 set argv [lrange $argv 1 end]
49
50 set i [lsearch $argv -keep]
51 if {$i>=0} {
@@ -517,26 +524,66 @@
524 fossil test-th-eval --open-config "setting th1-hooks"
525 if {[normalize_result] eq "1"} {return 1}
526 return [info exists ::env(TH1_ENABLE_HOOKS)]
527 }
528
529 # Run the given command script inside the Fossil source repo checkout.
530 #
531 # Callers of this function must ensure two things:
532 #
533 # 1. This test run is in fact being done from within a Fossil repo
534 # checkout directory. If you are unsure, test $::outside_fossil_repo
535 # or call one of the test_* wrappers below which do that for you.
536 #
537 # As a rule, you should not be calling this function directly!
538 #
539 # 2. This test run is being done from a repo checkout directory that
540 # doesn't have any uncommitted changes. If it does, that affects the
541 # output of any test based on the output of "fossil status",
542 # "... diff", etc., which is likely to make the test appear to fail.
543 # If you must call this function directly, test $::dirty_ckout and
544 # skip the call if it's true. The test_* wrappers do this for you.
545 #
546 # 3. The test does NOT modify the Fossil checkout tree in any way.
547 proc run_in_checkout { script {dir ""} } {
548 if {[string length $dir] == 0} {set dir $::testfiledir}
549 set savedPwd [pwd]; cd $dir
550 set code [catch {
551 uplevel 1 $script
552 } result]
553 cd $savedPwd; unset savedPwd
554 return -code $code $result
555 }
556
557 # Wrapper for the above function pair. The tscript parameter is an
558 # optional post-run test script. Some callers choose instead to put
559 # the tests inline with the rscript commands.
560 #
561 # Be sure to adhere to the requirements of run_in_checkout!
562 proc test_block_in_checkout { name rscript {tscript ""} } {
563 if {$::outside_fossil_repo || $::dirty_ckout} {
564 set $::CODE 0
565 set $::RESULT ""
566 } else {
567 run_in_checkout $rscript
568 if {[string length $tscript] == 0} {
569 return ""
570 } else {
571 set code [catch {
572 uplevel 1 $tscript
573 } result]
574 return -code $code $result
575 }
576 }
577 }
578
579 # Single-test wrapper for the above.
580 proc test_in_checkout { name rscript tscript } {
581 return test_block_in_checkout name rscript {
582 test $name $tscript
583 }
584 }
585
586 # Normalize file status lists (like those returned by 'fossil changes')
587 # so they can be compared using simple string comparison
588 #
589 proc normalize_status_list {list} {
590
--- test/th1-docs.test
+++ test/th1-docs.test
@@ -29,10 +29,18 @@
2929
3030
if {[normalize_result] ne "1"} {
3131
puts "Fossil was not compiled with Tcl support."
3232
test_cleanup_then_return
3333
}
34
+
35
+if {$::outside_fossil_repo} {
36
+ puts "Skipping th1-docs-* tests: not in Fossil repo checkout."
37
+ test_cleanup_then_return
38
+} elseif ($::dirty_ckout) {
39
+ puts "Skipping th1-docs-* tests: uncommitted changes in Fossil checkout."
40
+ test_cleanup_then_return
41
+}
3442
3543
###############################################################################
3644
3745
test_setup ""
3846
3947
--- test/th1-docs.test
+++ test/th1-docs.test
@@ -29,10 +29,18 @@
29
30 if {[normalize_result] ne "1"} {
31 puts "Fossil was not compiled with Tcl support."
32 test_cleanup_then_return
33 }
 
 
 
 
 
 
 
 
34
35 ###############################################################################
36
37 test_setup ""
38
39
--- test/th1-docs.test
+++ test/th1-docs.test
@@ -29,10 +29,18 @@
29
30 if {[normalize_result] ne "1"} {
31 puts "Fossil was not compiled with Tcl support."
32 test_cleanup_then_return
33 }
34
35 if {$::outside_fossil_repo} {
36 puts "Skipping th1-docs-* tests: not in Fossil repo checkout."
37 test_cleanup_then_return
38 } elseif ($::dirty_ckout) {
39 puts "Skipping th1-docs-* tests: uncommitted changes in Fossil checkout."
40 test_cleanup_then_return
41 }
42
43 ###############################################################################
44
45 test_setup ""
46
47
+33 -37
--- test/th1.test
+++ test/th1.test
@@ -553,10 +553,19 @@
553553
554554
fossil test-th-eval "lindex list -0x"
555555
test th1-expr-49 {$RESULT eq {TH_ERROR: expected integer, got: "-0x"}}
556556
557557
###############################################################################
558
+
559
+set skip_anycap 1
560
+if {$::outside_fossil_repo} {
561
+ puts "Skipping th1-anycap-*-1 perm tests: not in Fossil repo checkout."
562
+} elseif ($::dirty_ckout) {
563
+ puts "Skipping th1-anycap-*-1 perm tests: uncommitted changes in Fossil checkout."
564
+} else {
565
+ set skip_anycap 0
566
+}
558567
559568
foreach perm [list a b c d e f g h i j k l m n o p q r s t u v w x y z] {
560569
if {$perm eq "u"} continue; # NOTE: Skip "reader" meta-permission.
561570
if {$perm eq "v"} continue; # NOTE: Skip "developer" meta-permission.
562571
@@ -566,10 +575,12 @@
566575
fossil test-th-eval "hascap $perm"
567576
test th1-hascap-no-$perm-1 {$RESULT eq {0}}
568577
569578
fossil test-th-eval "anoncap $perm"
570579
test th1-anoncap-no-$perm-1 {$RESULT eq {0}}
580
+
581
+ if {$skip_anycap} { continue }
571582
572583
run_in_checkout {
573584
fossil test-th-eval --set-user-caps "anycap $perm"
574585
test th1-anycap-yes-$perm-1 {$RESULT eq {1}}
575586
@@ -621,11 +632,11 @@
621632
fossil test-th-eval "anoncap o h"
622633
test th1-anoncap-no-multiple-2 {$RESULT eq {0}}
623634
624635
###############################################################################
625636
626
-run_in_checkout {
637
+test_block_in_checkout "test-anoncap-*" {
627638
fossil test-th-eval --set-user-caps "anycap oh"
628639
test th1-anycap-yes-multiple-1 {$RESULT eq {1}}
629640
630641
set ::env(TH1_TEST_USER_CAPS) o
631642
fossil test-th-eval --set-user-caps "anycap oh"
@@ -665,29 +676,25 @@
665676
unset ::env(TH1_TEST_ANON_CAPS)
666677
}
667678
668679
###############################################################################
669680
670
-run_in_checkout {
681
+test_in_checkout th1-checkout-1 {
671682
# NOTE: The "1" here forces the checkout to be opened.
672683
fossil test-th-eval "checkout 1"
673
-}
674
-
675
-test th1-checkout-1 {[string length $RESULT] > 0}
684
+} {[string length $RESULT] > 0}
676685
677686
###############################################################################
678687
679
-run_in_checkout {
688
+test_in_checkout th1-checkout-2 {
680689
if {$th1Hooks} {
681690
fossil test-th-eval "checkout"
682691
} else {
683692
# NOTE: No TH1 hooks, force checkout to be populated.
684693
fossil test-th-eval --open-config "checkout"
685694
}
686
-}
687
-
688
-test th1-checkout-2 {[string length $RESULT] > 0}
695
+} {[string length $RESULT] > 0}
689696
690697
###############################################################################
691698
692699
set savedPwd [pwd]; cd /
693700
fossil test-th-eval "checkout 1"
@@ -762,15 +769,13 @@
762769
fossil test-th-eval "styleHeader {Page Title Here}"
763770
test th1-header-1 {$RESULT eq {TH_ERROR: repository unavailable}}
764771
765772
###############################################################################
766773
767
-run_in_checkout {
774
+test_in_checkout th1-header-2 {
768775
fossil test-th-eval --open-config "styleHeader {Page Title Here}"
769
-}
770
-
771
-test th1-header-2 {[regexp -- {<title>Fossil: Page Title Here</title>} $RESULT]}
776
+} {[regexp -- {<title>Fossil: Page Title Here</title>} $RESULT]}
772777
773778
###############################################################################
774779
775780
fossil test-th-eval "styleFooter"
776781
test th1-footer-1 {$RESULT eq {TH_ERROR: repository unavailable}}
@@ -848,15 +853,13 @@
848853
fossil test-th-eval "artifact tip"
849854
test th1-artifact-2 {$RESULT eq {TH_ERROR: repository unavailable}}
850855
851856
###############################################################################
852857
853
-run_in_checkout {
858
+test_in_checkout th1-artifact-3 {
854859
fossil test-th-eval --open-config "artifact tip"
855
-}
856
-
857
-test th1-artifact-3 {[regexp -- {F test/th1\.test [0-9a-f]{40,64}} $RESULT]}
860
+} {[regexp -- {F test/th1\.test [0-9a-f]{40,64}} $RESULT]}
858861
859862
###############################################################################
860863
861864
fossil test-th-eval "artifact 0000000000"
862865
test th1-artifact-4 {$RESULT eq {TH_ERROR: repository unavailable}}
@@ -871,15 +874,13 @@
871874
fossil test-th-eval "artifact tip test/th1.test"
872875
test th1-artifact-6 {$RESULT eq {TH_ERROR: repository unavailable}}
873876
874877
###############################################################################
875878
876
-run_in_checkout {
879
+test_in_checkout th1-artifact-7 {
877880
fossil test-th-eval --open-config "artifact tip test/th1.test"
878
-}
879
-
880
-test th1-artifact-7 {[regexp -- {th1-artifact-7} $RESULT]}
881
+} {[regexp -- {th1-artifact-7} $RESULT]}
881882
882883
###############################################################################
883884
884885
fossil test-th-eval "artifact 0000000000 test/th1.test"
885886
test th1-artifact-8 {$RESULT eq {TH_ERROR: repository unavailable}}
@@ -889,24 +890,22 @@
889890
fossil test-th-eval --open-config "artifact 0000000000 test/th1.test"
890891
test th1-artifact-9 {$RESULT eq {TH_ERROR: manifest not found}}
891892
892893
###############################################################################
893894
894
-run_in_checkout {
895
+test_in_checkout th1-globalState-1 {
895896
if {$th1Hooks} {
896897
fossil test-th-eval "globalState checkout"
897898
} else {
898899
# NOTE: No TH1 hooks, force checkout to be populated.
899900
fossil test-th-eval --open-config "globalState checkout"
900901
}
901
-}
902
-
903
-test th1-globalState-1 {[string length $RESULT] > 0}
902
+} {[string length $RESULT] > 0}
904903
905904
###############################################################################
906905
907
-run_in_checkout {
906
+test_block_in_checkout th1-globalState-2 {
908907
if {$th1Hooks} {
909908
fossil test-th-eval "globalState checkout"
910909
test th1-globalState-2 {$RESULT eq [fossil test-th-eval checkout]}
911910
} else {
912911
# NOTE: No TH1 hooks, force checkout to be populated.
@@ -942,24 +941,22 @@
942941
fossil test-th-eval --errorlog foserrors.log "globalState log"
943942
test th1-globalState-7 {$RESULT eq "foserrors.log"}
944943
945944
###############################################################################
946945
947
-run_in_checkout {
946
+test_in_checkout th1-globalState-8 {
948947
if {$th1Hooks} {
949948
fossil test-th-eval "globalState repository"
950949
} else {
951950
# NOTE: No TH1 hooks, force repository to be populated.
952951
fossil test-th-eval --open-config "globalState repository"
953952
}
954
-}
955
-
956
-test th1-globalState-8 {[string length $RESULT] > 0}
953
+} {[string length $RESULT] > 0}
957954
958955
###############################################################################
959956
960
-run_in_checkout {
957
+test_block_in_checkout th1-globalState-9 {
961958
if {$th1Hooks} {
962959
fossil test-th-eval "globalState repository"
963960
test th1-globalState-9 {$RESULT eq [fossil test-th-eval repository]}
964961
} else {
965962
# NOTE: No TH1 hooks, force repository to be populated.
@@ -1603,21 +1600,20 @@
16031600
test th1-encode64-2 {$RESULT eq "dGVzdAA="}
16041601
16051602
###############################################################################
16061603
16071604
#
1608
-# TODO: Modify the result of this test if the source file (i.e.
1609
-# "ajax/cgi-bin/fossil-json.cgi.example") changes.
1605
+# This test will fail if the Fossil source file named below changes. Update
1606
+# the expected result string below if that happens.
16101607
#
1611
-run_in_checkout {
1608
+test_in_checkout th1-encode64-3 {
16121609
fossil test-th-eval --open-config \
16131610
{encode64 [artifact trunk ajax/cgi-bin/fossil-json.cgi.example]}
1611
+} {
1612
+ $RESULT eq "IyEvcGF0aC90by9mb3NzaWwvYmluYXJ5CnJlcG9zaXRvcnk6IC9wYXRoL3RvL3JlcG8uZnNsCg=="
16141613
}
16151614
1616
-test th1-encode64-3 {$RESULT eq \
1617
-"IyEvcGF0aC90by9mb3NzaWwvYmluYXJ5CnJlcG9zaXRvcnk6IC9wYXRoL3RvL3JlcG8uZnNsCg=="}
1618
-
16191615
###############################################################################
16201616
16211617
fossil test-th-eval {array exists tcl_platform}
16221618
test th1-platform-1 {$RESULT eq "1"}
16231619
16241620
--- test/th1.test
+++ test/th1.test
@@ -553,10 +553,19 @@
553
554 fossil test-th-eval "lindex list -0x"
555 test th1-expr-49 {$RESULT eq {TH_ERROR: expected integer, got: "-0x"}}
556
557 ###############################################################################
 
 
 
 
 
 
 
 
 
558
559 foreach perm [list a b c d e f g h i j k l m n o p q r s t u v w x y z] {
560 if {$perm eq "u"} continue; # NOTE: Skip "reader" meta-permission.
561 if {$perm eq "v"} continue; # NOTE: Skip "developer" meta-permission.
562
@@ -566,10 +575,12 @@
566 fossil test-th-eval "hascap $perm"
567 test th1-hascap-no-$perm-1 {$RESULT eq {0}}
568
569 fossil test-th-eval "anoncap $perm"
570 test th1-anoncap-no-$perm-1 {$RESULT eq {0}}
 
 
571
572 run_in_checkout {
573 fossil test-th-eval --set-user-caps "anycap $perm"
574 test th1-anycap-yes-$perm-1 {$RESULT eq {1}}
575
@@ -621,11 +632,11 @@
621 fossil test-th-eval "anoncap o h"
622 test th1-anoncap-no-multiple-2 {$RESULT eq {0}}
623
624 ###############################################################################
625
626 run_in_checkout {
627 fossil test-th-eval --set-user-caps "anycap oh"
628 test th1-anycap-yes-multiple-1 {$RESULT eq {1}}
629
630 set ::env(TH1_TEST_USER_CAPS) o
631 fossil test-th-eval --set-user-caps "anycap oh"
@@ -665,29 +676,25 @@
665 unset ::env(TH1_TEST_ANON_CAPS)
666 }
667
668 ###############################################################################
669
670 run_in_checkout {
671 # NOTE: The "1" here forces the checkout to be opened.
672 fossil test-th-eval "checkout 1"
673 }
674
675 test th1-checkout-1 {[string length $RESULT] > 0}
676
677 ###############################################################################
678
679 run_in_checkout {
680 if {$th1Hooks} {
681 fossil test-th-eval "checkout"
682 } else {
683 # NOTE: No TH1 hooks, force checkout to be populated.
684 fossil test-th-eval --open-config "checkout"
685 }
686 }
687
688 test th1-checkout-2 {[string length $RESULT] > 0}
689
690 ###############################################################################
691
692 set savedPwd [pwd]; cd /
693 fossil test-th-eval "checkout 1"
@@ -762,15 +769,13 @@
762 fossil test-th-eval "styleHeader {Page Title Here}"
763 test th1-header-1 {$RESULT eq {TH_ERROR: repository unavailable}}
764
765 ###############################################################################
766
767 run_in_checkout {
768 fossil test-th-eval --open-config "styleHeader {Page Title Here}"
769 }
770
771 test th1-header-2 {[regexp -- {<title>Fossil: Page Title Here</title>} $RESULT]}
772
773 ###############################################################################
774
775 fossil test-th-eval "styleFooter"
776 test th1-footer-1 {$RESULT eq {TH_ERROR: repository unavailable}}
@@ -848,15 +853,13 @@
848 fossil test-th-eval "artifact tip"
849 test th1-artifact-2 {$RESULT eq {TH_ERROR: repository unavailable}}
850
851 ###############################################################################
852
853 run_in_checkout {
854 fossil test-th-eval --open-config "artifact tip"
855 }
856
857 test th1-artifact-3 {[regexp -- {F test/th1\.test [0-9a-f]{40,64}} $RESULT]}
858
859 ###############################################################################
860
861 fossil test-th-eval "artifact 0000000000"
862 test th1-artifact-4 {$RESULT eq {TH_ERROR: repository unavailable}}
@@ -871,15 +874,13 @@
871 fossil test-th-eval "artifact tip test/th1.test"
872 test th1-artifact-6 {$RESULT eq {TH_ERROR: repository unavailable}}
873
874 ###############################################################################
875
876 run_in_checkout {
877 fossil test-th-eval --open-config "artifact tip test/th1.test"
878 }
879
880 test th1-artifact-7 {[regexp -- {th1-artifact-7} $RESULT]}
881
882 ###############################################################################
883
884 fossil test-th-eval "artifact 0000000000 test/th1.test"
885 test th1-artifact-8 {$RESULT eq {TH_ERROR: repository unavailable}}
@@ -889,24 +890,22 @@
889 fossil test-th-eval --open-config "artifact 0000000000 test/th1.test"
890 test th1-artifact-9 {$RESULT eq {TH_ERROR: manifest not found}}
891
892 ###############################################################################
893
894 run_in_checkout {
895 if {$th1Hooks} {
896 fossil test-th-eval "globalState checkout"
897 } else {
898 # NOTE: No TH1 hooks, force checkout to be populated.
899 fossil test-th-eval --open-config "globalState checkout"
900 }
901 }
902
903 test th1-globalState-1 {[string length $RESULT] > 0}
904
905 ###############################################################################
906
907 run_in_checkout {
908 if {$th1Hooks} {
909 fossil test-th-eval "globalState checkout"
910 test th1-globalState-2 {$RESULT eq [fossil test-th-eval checkout]}
911 } else {
912 # NOTE: No TH1 hooks, force checkout to be populated.
@@ -942,24 +941,22 @@
942 fossil test-th-eval --errorlog foserrors.log "globalState log"
943 test th1-globalState-7 {$RESULT eq "foserrors.log"}
944
945 ###############################################################################
946
947 run_in_checkout {
948 if {$th1Hooks} {
949 fossil test-th-eval "globalState repository"
950 } else {
951 # NOTE: No TH1 hooks, force repository to be populated.
952 fossil test-th-eval --open-config "globalState repository"
953 }
954 }
955
956 test th1-globalState-8 {[string length $RESULT] > 0}
957
958 ###############################################################################
959
960 run_in_checkout {
961 if {$th1Hooks} {
962 fossil test-th-eval "globalState repository"
963 test th1-globalState-9 {$RESULT eq [fossil test-th-eval repository]}
964 } else {
965 # NOTE: No TH1 hooks, force repository to be populated.
@@ -1603,21 +1600,20 @@
1603 test th1-encode64-2 {$RESULT eq "dGVzdAA="}
1604
1605 ###############################################################################
1606
1607 #
1608 # TODO: Modify the result of this test if the source file (i.e.
1609 # "ajax/cgi-bin/fossil-json.cgi.example") changes.
1610 #
1611 run_in_checkout {
1612 fossil test-th-eval --open-config \
1613 {encode64 [artifact trunk ajax/cgi-bin/fossil-json.cgi.example]}
 
 
1614 }
1615
1616 test th1-encode64-3 {$RESULT eq \
1617 "IyEvcGF0aC90by9mb3NzaWwvYmluYXJ5CnJlcG9zaXRvcnk6IC9wYXRoL3RvL3JlcG8uZnNsCg=="}
1618
1619 ###############################################################################
1620
1621 fossil test-th-eval {array exists tcl_platform}
1622 test th1-platform-1 {$RESULT eq "1"}
1623
1624
--- test/th1.test
+++ test/th1.test
@@ -553,10 +553,19 @@
553
554 fossil test-th-eval "lindex list -0x"
555 test th1-expr-49 {$RESULT eq {TH_ERROR: expected integer, got: "-0x"}}
556
557 ###############################################################################
558
559 set skip_anycap 1
560 if {$::outside_fossil_repo} {
561 puts "Skipping th1-anycap-*-1 perm tests: not in Fossil repo checkout."
562 } elseif ($::dirty_ckout) {
563 puts "Skipping th1-anycap-*-1 perm tests: uncommitted changes in Fossil checkout."
564 } else {
565 set skip_anycap 0
566 }
567
568 foreach perm [list a b c d e f g h i j k l m n o p q r s t u v w x y z] {
569 if {$perm eq "u"} continue; # NOTE: Skip "reader" meta-permission.
570 if {$perm eq "v"} continue; # NOTE: Skip "developer" meta-permission.
571
@@ -566,10 +575,12 @@
575 fossil test-th-eval "hascap $perm"
576 test th1-hascap-no-$perm-1 {$RESULT eq {0}}
577
578 fossil test-th-eval "anoncap $perm"
579 test th1-anoncap-no-$perm-1 {$RESULT eq {0}}
580
581 if {$skip_anycap} { continue }
582
583 run_in_checkout {
584 fossil test-th-eval --set-user-caps "anycap $perm"
585 test th1-anycap-yes-$perm-1 {$RESULT eq {1}}
586
@@ -621,11 +632,11 @@
632 fossil test-th-eval "anoncap o h"
633 test th1-anoncap-no-multiple-2 {$RESULT eq {0}}
634
635 ###############################################################################
636
637 test_block_in_checkout "test-anoncap-*" {
638 fossil test-th-eval --set-user-caps "anycap oh"
639 test th1-anycap-yes-multiple-1 {$RESULT eq {1}}
640
641 set ::env(TH1_TEST_USER_CAPS) o
642 fossil test-th-eval --set-user-caps "anycap oh"
@@ -665,29 +676,25 @@
676 unset ::env(TH1_TEST_ANON_CAPS)
677 }
678
679 ###############################################################################
680
681 test_in_checkout th1-checkout-1 {
682 # NOTE: The "1" here forces the checkout to be opened.
683 fossil test-th-eval "checkout 1"
684 } {[string length $RESULT] > 0}
 
 
685
686 ###############################################################################
687
688 test_in_checkout th1-checkout-2 {
689 if {$th1Hooks} {
690 fossil test-th-eval "checkout"
691 } else {
692 # NOTE: No TH1 hooks, force checkout to be populated.
693 fossil test-th-eval --open-config "checkout"
694 }
695 } {[string length $RESULT] > 0}
 
 
696
697 ###############################################################################
698
699 set savedPwd [pwd]; cd /
700 fossil test-th-eval "checkout 1"
@@ -762,15 +769,13 @@
769 fossil test-th-eval "styleHeader {Page Title Here}"
770 test th1-header-1 {$RESULT eq {TH_ERROR: repository unavailable}}
771
772 ###############################################################################
773
774 test_in_checkout th1-header-2 {
775 fossil test-th-eval --open-config "styleHeader {Page Title Here}"
776 } {[regexp -- {<title>Fossil: Page Title Here</title>} $RESULT]}
 
 
777
778 ###############################################################################
779
780 fossil test-th-eval "styleFooter"
781 test th1-footer-1 {$RESULT eq {TH_ERROR: repository unavailable}}
@@ -848,15 +853,13 @@
853 fossil test-th-eval "artifact tip"
854 test th1-artifact-2 {$RESULT eq {TH_ERROR: repository unavailable}}
855
856 ###############################################################################
857
858 test_in_checkout th1-artifact-3 {
859 fossil test-th-eval --open-config "artifact tip"
860 } {[regexp -- {F test/th1\.test [0-9a-f]{40,64}} $RESULT]}
 
 
861
862 ###############################################################################
863
864 fossil test-th-eval "artifact 0000000000"
865 test th1-artifact-4 {$RESULT eq {TH_ERROR: repository unavailable}}
@@ -871,15 +874,13 @@
874 fossil test-th-eval "artifact tip test/th1.test"
875 test th1-artifact-6 {$RESULT eq {TH_ERROR: repository unavailable}}
876
877 ###############################################################################
878
879 test_in_checkout th1-artifact-7 {
880 fossil test-th-eval --open-config "artifact tip test/th1.test"
881 } {[regexp -- {th1-artifact-7} $RESULT]}
 
 
882
883 ###############################################################################
884
885 fossil test-th-eval "artifact 0000000000 test/th1.test"
886 test th1-artifact-8 {$RESULT eq {TH_ERROR: repository unavailable}}
@@ -889,24 +890,22 @@
890 fossil test-th-eval --open-config "artifact 0000000000 test/th1.test"
891 test th1-artifact-9 {$RESULT eq {TH_ERROR: manifest not found}}
892
893 ###############################################################################
894
895 test_in_checkout th1-globalState-1 {
896 if {$th1Hooks} {
897 fossil test-th-eval "globalState checkout"
898 } else {
899 # NOTE: No TH1 hooks, force checkout to be populated.
900 fossil test-th-eval --open-config "globalState checkout"
901 }
902 } {[string length $RESULT] > 0}
 
 
903
904 ###############################################################################
905
906 test_block_in_checkout th1-globalState-2 {
907 if {$th1Hooks} {
908 fossil test-th-eval "globalState checkout"
909 test th1-globalState-2 {$RESULT eq [fossil test-th-eval checkout]}
910 } else {
911 # NOTE: No TH1 hooks, force checkout to be populated.
@@ -942,24 +941,22 @@
941 fossil test-th-eval --errorlog foserrors.log "globalState log"
942 test th1-globalState-7 {$RESULT eq "foserrors.log"}
943
944 ###############################################################################
945
946 test_in_checkout th1-globalState-8 {
947 if {$th1Hooks} {
948 fossil test-th-eval "globalState repository"
949 } else {
950 # NOTE: No TH1 hooks, force repository to be populated.
951 fossil test-th-eval --open-config "globalState repository"
952 }
953 } {[string length $RESULT] > 0}
 
 
954
955 ###############################################################################
956
957 test_block_in_checkout th1-globalState-9 {
958 if {$th1Hooks} {
959 fossil test-th-eval "globalState repository"
960 test th1-globalState-9 {$RESULT eq [fossil test-th-eval repository]}
961 } else {
962 # NOTE: No TH1 hooks, force repository to be populated.
@@ -1603,21 +1600,20 @@
1600 test th1-encode64-2 {$RESULT eq "dGVzdAA="}
1601
1602 ###############################################################################
1603
1604 #
1605 # This test will fail if the Fossil source file named below changes. Update
1606 # the expected result string below if that happens.
1607 #
1608 test_in_checkout th1-encode64-3 {
1609 fossil test-th-eval --open-config \
1610 {encode64 [artifact trunk ajax/cgi-bin/fossil-json.cgi.example]}
1611 } {
1612 $RESULT eq "IyEvcGF0aC90by9mb3NzaWwvYmluYXJ5CnJlcG9zaXRvcnk6IC9wYXRoL3RvL3JlcG8uZnNsCg=="
1613 }
1614
 
 
 
1615 ###############################################################################
1616
1617 fossil test-th-eval {array exists tcl_platform}
1618 test th1-platform-1 {$RESULT eq "1"}
1619
1620

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button