Fossil SCM

Replaced most of the direct calls to run_in_checkout from within the test suite with one of two wrapper functions that skip those tests when you run "make test" outside a Fossil repository checkout directory, such as from a directory containing an unpacked source release tarball. (The two remaining direct calls to that proc from test/*.test are preceded by a check that skips the whole file they're in, since that whole file does nothing else.) This is being checked in on a branch because it is not yet thoroughly tested, yet I need the checkpoint.

wyoung 2018-09-03 00:40 trunk
Commit 33efa2fa05c1ff76376b1c96164dfebb16635ce3cec8a49ac6e019389f3da8cf
--- 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
+49 -6
--- test/tester.tcl
+++ test/tester.tcl
@@ -517,26 +517,69 @@
517517
fossil test-th-eval --open-config "setting th1-hooks"
518518
if {[normalize_result] eq "1"} {return 1}
519519
return [info exists ::env(TH1_ENABLE_HOOKS)]
520520
}
521521
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.
522
+# Run the given command script inside the Fossil source repo checkout.
523
+#
524
+# Callers of this function must ensure two things:
525
+#
526
+# 1. This test run is in fact being done from within a Fossil repo
527
+# checkout directory. If you are unsure, call outside_fossil_repo
528
+# or one of the test_* wrappers below it which do call it first.
529
+#
530
+# As a rule, you should not be calling this function directly!
528531
#
532
+# 2. The test does NOT modify the Fossil checkout tree in any way.
529533
proc run_in_checkout { script {dir ""} } {
530534
if {[string length $dir] == 0} {set dir $::testfiledir}
531535
set savedPwd [pwd]; cd $dir
532536
set code [catch {
533537
uplevel 1 $script
534538
} result]
535539
cd $savedPwd; unset savedPwd
536540
return -code $code $result
537541
}
542
+
543
+# Return zero if we're being run from within a Fossil repo checkout.
544
+# Used to skip uses of run_in_checkout so that those tests don't fail
545
+# when run elsewhere, such as from a release tarball checkout.
546
+proc outside_fossil_repo {} {
547
+ if {$::is_windows} {
548
+ return ![file exists "$::testfiledir\\..\\_FOSSIL_"]
549
+ } else {
550
+ return ![file exists "$::testfiledir/../.fslckout"]
551
+ }
552
+}
553
+
554
+# Wrapper for the above function pair. The tscript parameter is an
555
+# optional post-run test script. Some callers choose instead to put
556
+# the tests inline with the rscript commands.
557
+#
558
+# Be sure to adhere to the requirements of run_in_checkout!
559
+proc test_block_in_checkout { name rscript {tscript ""} } {
560
+ if {[outside_fossil_repo]} {
561
+ puts "Skipping $name test: not in Fossil repo checkout."
562
+ } else {
563
+ run_in_checkout $rscript
564
+ if {[string length $tscript] == 0} {
565
+ return ""
566
+ } else {
567
+ set code [catch {
568
+ uplevel 1 $tscript
569
+ } result]
570
+ return -code $code $result
571
+ }
572
+ }
573
+}
574
+
575
+# Single-test wrapper for the above.
576
+proc test_in_checkout { name rscript tscript } {
577
+ return test_block_in_checkout name rscript {
578
+ test $name $tscript
579
+ }
580
+}
538581
539582
# Normalize file status lists (like those returned by 'fossil changes')
540583
# so they can be compared using simple string comparison
541584
#
542585
proc normalize_status_list {list} {
543586
--- test/tester.tcl
+++ test/tester.tcl
@@ -517,26 +517,69 @@
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
@@ -517,26 +517,69 @@
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 # Run the given command script inside the Fossil source repo checkout.
523 #
524 # Callers of this function must ensure two things:
525 #
526 # 1. This test run is in fact being done from within a Fossil repo
527 # checkout directory. If you are unsure, call outside_fossil_repo
528 # or one of the test_* wrappers below it which do call it first.
529 #
530 # As a rule, you should not be calling this function directly!
531 #
532 # 2. The test does NOT modify the Fossil checkout tree in any way.
533 proc run_in_checkout { script {dir ""} } {
534 if {[string length $dir] == 0} {set dir $::testfiledir}
535 set savedPwd [pwd]; cd $dir
536 set code [catch {
537 uplevel 1 $script
538 } result]
539 cd $savedPwd; unset savedPwd
540 return -code $code $result
541 }
542
543 # Return zero if we're being run from within a Fossil repo checkout.
544 # Used to skip uses of run_in_checkout so that those tests don't fail
545 # when run elsewhere, such as from a release tarball checkout.
546 proc outside_fossil_repo {} {
547 if {$::is_windows} {
548 return ![file exists "$::testfiledir\\..\\_FOSSIL_"]
549 } else {
550 return ![file exists "$::testfiledir/../.fslckout"]
551 }
552 }
553
554 # Wrapper for the above function pair. The tscript parameter is an
555 # optional post-run test script. Some callers choose instead to put
556 # the tests inline with the rscript commands.
557 #
558 # Be sure to adhere to the requirements of run_in_checkout!
559 proc test_block_in_checkout { name rscript {tscript ""} } {
560 if {[outside_fossil_repo]} {
561 puts "Skipping $name test: not in Fossil repo checkout."
562 } else {
563 run_in_checkout $rscript
564 if {[string length $tscript] == 0} {
565 return ""
566 } else {
567 set code [catch {
568 uplevel 1 $tscript
569 } result]
570 return -code $code $result
571 }
572 }
573 }
574
575 # Single-test wrapper for the above.
576 proc test_in_checkout { name rscript tscript } {
577 return test_block_in_checkout name rscript {
578 test $name $tscript
579 }
580 }
581
582 # Normalize file status lists (like those returned by 'fossil changes')
583 # so they can be compared using simple string comparison
584 #
585 proc normalize_status_list {list} {
586
--- test/th1-docs.test
+++ test/th1-docs.test
@@ -15,10 +15,15 @@
1515
#
1616
############################################################################
1717
#
1818
# TH1 Docs
1919
#
20
+
21
+if {[outside_fossil_repo]} {
22
+ puts "Skipping th1-docs-* tests: not in Fossil repo checkout."
23
+ test_cleanup_then_return
24
+}
2025
2126
fossil test-th-eval "hasfeature th1Docs"
2227
2328
if {[normalize_result] ne "1"} {
2429
puts "Fossil was not compiled with TH1 docs support."
2530
--- test/th1-docs.test
+++ test/th1-docs.test
@@ -15,10 +15,15 @@
15 #
16 ############################################################################
17 #
18 # TH1 Docs
19 #
 
 
 
 
 
20
21 fossil test-th-eval "hasfeature th1Docs"
22
23 if {[normalize_result] ne "1"} {
24 puts "Fossil was not compiled with TH1 docs support."
25
--- test/th1-docs.test
+++ test/th1-docs.test
@@ -15,10 +15,15 @@
15 #
16 ############################################################################
17 #
18 # TH1 Docs
19 #
20
21 if {[outside_fossil_repo]} {
22 puts "Skipping th1-docs-* tests: not in Fossil repo checkout."
23 test_cleanup_then_return
24 }
25
26 fossil test-th-eval "hasfeature th1Docs"
27
28 if {[normalize_result] ne "1"} {
29 puts "Fossil was not compiled with TH1 docs support."
30
+23 -38
--- test/th1.test
+++ test/th1.test
@@ -567,11 +567,11 @@
567567
test th1-hascap-no-$perm-1 {$RESULT eq {0}}
568568
569569
fossil test-th-eval "anoncap $perm"
570570
test th1-anoncap-no-$perm-1 {$RESULT eq {0}}
571571
572
- run_in_checkout {
572
+ test_block_in_checkout "th1-anycap-*-1 perm" {
573573
fossil test-th-eval --set-user-caps "anycap $perm"
574574
test th1-anycap-yes-$perm-1 {$RESULT eq {1}}
575575
576576
set ::env(TH1_TEST_USER_CAPS) 1; # NOTE: Bad permission.
577577
fossil test-th-eval --set-user-caps "anycap $perm"
@@ -621,11 +621,11 @@
621621
fossil test-th-eval "anoncap o h"
622622
test th1-anoncap-no-multiple-2 {$RESULT eq {0}}
623623
624624
###############################################################################
625625
626
-run_in_checkout {
626
+test_block_in_checkout "test-anoncap-*" {
627627
fossil test-th-eval --set-user-caps "anycap oh"
628628
test th1-anycap-yes-multiple-1 {$RESULT eq {1}}
629629
630630
set ::env(TH1_TEST_USER_CAPS) o
631631
fossil test-th-eval --set-user-caps "anycap oh"
@@ -665,29 +665,25 @@
665665
unset ::env(TH1_TEST_ANON_CAPS)
666666
}
667667
668668
###############################################################################
669669
670
-run_in_checkout {
670
+test_in_checkout th1-checkout-1 {
671671
# NOTE: The "1" here forces the checkout to be opened.
672672
fossil test-th-eval "checkout 1"
673
-}
674
-
675
-test th1-checkout-1 {[string length $RESULT] > 0}
673
+} [string length $RESULT] > 0}
676674
677675
###############################################################################
678676
679
-run_in_checkout {
677
+test_in_checkout th1-checkout-2 {
680678
if {$th1Hooks} {
681679
fossil test-th-eval "checkout"
682680
} else {
683681
# NOTE: No TH1 hooks, force checkout to be populated.
684682
fossil test-th-eval --open-config "checkout"
685683
}
686
-}
687
-
688
-test th1-checkout-2 {[string length $RESULT] > 0}
684
+} {[string length $RESULT] > 0}
689685
690686
###############################################################################
691687
692688
set savedPwd [pwd]; cd /
693689
fossil test-th-eval "checkout 1"
@@ -762,15 +758,13 @@
762758
fossil test-th-eval "styleHeader {Page Title Here}"
763759
test th1-header-1 {$RESULT eq {TH_ERROR: repository unavailable}}
764760
765761
###############################################################################
766762
767
-run_in_checkout {
763
+test_in_checkout th1-header-2 {
768764
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]}
765
+} {[regexp -- {<title>Fossil: Page Title Here</title>} $RESULT]}
772766
773767
###############################################################################
774768
775769
fossil test-th-eval "styleFooter"
776770
test th1-footer-1 {$RESULT eq {TH_ERROR: repository unavailable}}
@@ -848,15 +842,13 @@
848842
fossil test-th-eval "artifact tip"
849843
test th1-artifact-2 {$RESULT eq {TH_ERROR: repository unavailable}}
850844
851845
###############################################################################
852846
853
-run_in_checkout {
847
+test_in_checkout th1-artifact-3 {
854848
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]}
849
+} {[regexp -- {F test/th1\.test [0-9a-f]{40,64}} $RESULT]}
858850
859851
###############################################################################
860852
861853
fossil test-th-eval "artifact 0000000000"
862854
test th1-artifact-4 {$RESULT eq {TH_ERROR: repository unavailable}}
@@ -871,15 +863,13 @@
871863
fossil test-th-eval "artifact tip test/th1.test"
872864
test th1-artifact-6 {$RESULT eq {TH_ERROR: repository unavailable}}
873865
874866
###############################################################################
875867
876
-run_in_checkout {
868
+test_in_checkout th1-artifact-7 {
877869
fossil test-th-eval --open-config "artifact tip test/th1.test"
878
-}
879
-
880
-test th1-artifact-7 {[regexp -- {th1-artifact-7} $RESULT]}
870
+} {[regexp -- {th1-artifact-7} $RESULT]}
881871
882872
###############################################################################
883873
884874
fossil test-th-eval "artifact 0000000000 test/th1.test"
885875
test th1-artifact-8 {$RESULT eq {TH_ERROR: repository unavailable}}
@@ -889,24 +879,22 @@
889879
fossil test-th-eval --open-config "artifact 0000000000 test/th1.test"
890880
test th1-artifact-9 {$RESULT eq {TH_ERROR: manifest not found}}
891881
892882
###############################################################################
893883
894
-run_in_checkout {
884
+test_in_checkout th1-globalState-1 {
895885
if {$th1Hooks} {
896886
fossil test-th-eval "globalState checkout"
897887
} else {
898888
# NOTE: No TH1 hooks, force checkout to be populated.
899889
fossil test-th-eval --open-config "globalState checkout"
900890
}
901
-}
902
-
903
-test th1-globalState-1 {[string length $RESULT] > 0}
891
+} {[string length $RESULT] > 0}
904892
905893
###############################################################################
906894
907
-run_in_checkout {
895
+test_block_in_checkout th1-globalState-2 {
908896
if {$th1Hooks} {
909897
fossil test-th-eval "globalState checkout"
910898
test th1-globalState-2 {$RESULT eq [fossil test-th-eval checkout]}
911899
} else {
912900
# NOTE: No TH1 hooks, force checkout to be populated.
@@ -942,24 +930,22 @@
942930
fossil test-th-eval --errorlog foserrors.log "globalState log"
943931
test th1-globalState-7 {$RESULT eq "foserrors.log"}
944932
945933
###############################################################################
946934
947
-run_in_checkout {
935
+test_in_checkout th1-globalState-8 {
948936
if {$th1Hooks} {
949937
fossil test-th-eval "globalState repository"
950938
} else {
951939
# NOTE: No TH1 hooks, force repository to be populated.
952940
fossil test-th-eval --open-config "globalState repository"
953941
}
954
-}
955
-
956
-test th1-globalState-8 {[string length $RESULT] > 0}
942
+} {[string length $RESULT] > 0}
957943
958944
###############################################################################
959945
960
-run_in_checkout {
946
+test_block_in_checkout th1-globalState-9 {
961947
if {$th1Hooks} {
962948
fossil test-th-eval "globalState repository"
963949
test th1-globalState-9 {$RESULT eq [fossil test-th-eval repository]}
964950
} else {
965951
# NOTE: No TH1 hooks, force repository to be populated.
@@ -1603,21 +1589,20 @@
16031589
test th1-encode64-2 {$RESULT eq "dGVzdAA="}
16041590
16051591
###############################################################################
16061592
16071593
#
1608
-# TODO: Modify the result of this test if the source file (i.e.
1609
-# "ajax/cgi-bin/fossil-json.cgi.example") changes.
1594
+# This test will fail if the Fossil source file named below changes. Update
1595
+# the expected result string below if that happens.
16101596
#
1611
-run_in_checkout {
1597
+test_in_checkout th1-encode64-3 {
16121598
fossil test-th-eval --open-config \
16131599
{encode64 [artifact trunk ajax/cgi-bin/fossil-json.cgi.example]}
1600
+} {
1601
+ $RESULT eq "IyEvcGF0aC90by9mb3NzaWwvYmluYXJ5CnJlcG9zaXRvcnk6IC9wYXRoL3RvL3JlcG8uZnNsCg=="
16141602
}
16151603
1616
-test th1-encode64-3 {$RESULT eq \
1617
-"IyEvcGF0aC90by9mb3NzaWwvYmluYXJ5CnJlcG9zaXRvcnk6IC9wYXRoL3RvL3JlcG8uZnNsCg=="}
1618
-
16191604
###############################################################################
16201605
16211606
fossil test-th-eval {array exists tcl_platform}
16221607
test th1-platform-1 {$RESULT eq "1"}
16231608
16241609
--- test/th1.test
+++ test/th1.test
@@ -567,11 +567,11 @@
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
576 set ::env(TH1_TEST_USER_CAPS) 1; # NOTE: Bad permission.
577 fossil test-th-eval --set-user-caps "anycap $perm"
@@ -621,11 +621,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 +665,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 +758,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 +842,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 +863,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 +879,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 +930,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 +1589,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
@@ -567,11 +567,11 @@
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 test_block_in_checkout "th1-anycap-*-1 perm" {
573 fossil test-th-eval --set-user-caps "anycap $perm"
574 test th1-anycap-yes-$perm-1 {$RESULT eq {1}}
575
576 set ::env(TH1_TEST_USER_CAPS) 1; # NOTE: Bad permission.
577 fossil test-th-eval --set-user-caps "anycap $perm"
@@ -621,11 +621,11 @@
621 fossil test-th-eval "anoncap o h"
622 test th1-anoncap-no-multiple-2 {$RESULT eq {0}}
623
624 ###############################################################################
625
626 test_block_in_checkout "test-anoncap-*" {
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 +665,25 @@
665 unset ::env(TH1_TEST_ANON_CAPS)
666 }
667
668 ###############################################################################
669
670 test_in_checkout th1-checkout-1 {
671 # NOTE: The "1" here forces the checkout to be opened.
672 fossil test-th-eval "checkout 1"
673 } [string length $RESULT] > 0}
 
 
674
675 ###############################################################################
676
677 test_in_checkout th1-checkout-2 {
678 if {$th1Hooks} {
679 fossil test-th-eval "checkout"
680 } else {
681 # NOTE: No TH1 hooks, force checkout to be populated.
682 fossil test-th-eval --open-config "checkout"
683 }
684 } {[string length $RESULT] > 0}
 
 
685
686 ###############################################################################
687
688 set savedPwd [pwd]; cd /
689 fossil test-th-eval "checkout 1"
@@ -762,15 +758,13 @@
758 fossil test-th-eval "styleHeader {Page Title Here}"
759 test th1-header-1 {$RESULT eq {TH_ERROR: repository unavailable}}
760
761 ###############################################################################
762
763 test_in_checkout th1-header-2 {
764 fossil test-th-eval --open-config "styleHeader {Page Title Here}"
765 } {[regexp -- {<title>Fossil: Page Title Here</title>} $RESULT]}
 
 
766
767 ###############################################################################
768
769 fossil test-th-eval "styleFooter"
770 test th1-footer-1 {$RESULT eq {TH_ERROR: repository unavailable}}
@@ -848,15 +842,13 @@
842 fossil test-th-eval "artifact tip"
843 test th1-artifact-2 {$RESULT eq {TH_ERROR: repository unavailable}}
844
845 ###############################################################################
846
847 test_in_checkout th1-artifact-3 {
848 fossil test-th-eval --open-config "artifact tip"
849 } {[regexp -- {F test/th1\.test [0-9a-f]{40,64}} $RESULT]}
 
 
850
851 ###############################################################################
852
853 fossil test-th-eval "artifact 0000000000"
854 test th1-artifact-4 {$RESULT eq {TH_ERROR: repository unavailable}}
@@ -871,15 +863,13 @@
863 fossil test-th-eval "artifact tip test/th1.test"
864 test th1-artifact-6 {$RESULT eq {TH_ERROR: repository unavailable}}
865
866 ###############################################################################
867
868 test_in_checkout th1-artifact-7 {
869 fossil test-th-eval --open-config "artifact tip test/th1.test"
870 } {[regexp -- {th1-artifact-7} $RESULT]}
 
 
871
872 ###############################################################################
873
874 fossil test-th-eval "artifact 0000000000 test/th1.test"
875 test th1-artifact-8 {$RESULT eq {TH_ERROR: repository unavailable}}
@@ -889,24 +879,22 @@
879 fossil test-th-eval --open-config "artifact 0000000000 test/th1.test"
880 test th1-artifact-9 {$RESULT eq {TH_ERROR: manifest not found}}
881
882 ###############################################################################
883
884 test_in_checkout th1-globalState-1 {
885 if {$th1Hooks} {
886 fossil test-th-eval "globalState checkout"
887 } else {
888 # NOTE: No TH1 hooks, force checkout to be populated.
889 fossil test-th-eval --open-config "globalState checkout"
890 }
891 } {[string length $RESULT] > 0}
 
 
892
893 ###############################################################################
894
895 test_block_in_checkout th1-globalState-2 {
896 if {$th1Hooks} {
897 fossil test-th-eval "globalState checkout"
898 test th1-globalState-2 {$RESULT eq [fossil test-th-eval checkout]}
899 } else {
900 # NOTE: No TH1 hooks, force checkout to be populated.
@@ -942,24 +930,22 @@
930 fossil test-th-eval --errorlog foserrors.log "globalState log"
931 test th1-globalState-7 {$RESULT eq "foserrors.log"}
932
933 ###############################################################################
934
935 test_in_checkout th1-globalState-8 {
936 if {$th1Hooks} {
937 fossil test-th-eval "globalState repository"
938 } else {
939 # NOTE: No TH1 hooks, force repository to be populated.
940 fossil test-th-eval --open-config "globalState repository"
941 }
942 } {[string length $RESULT] > 0}
 
 
943
944 ###############################################################################
945
946 test_block_in_checkout th1-globalState-9 {
947 if {$th1Hooks} {
948 fossil test-th-eval "globalState repository"
949 test th1-globalState-9 {$RESULT eq [fossil test-th-eval repository]}
950 } else {
951 # NOTE: No TH1 hooks, force repository to be populated.
@@ -1603,21 +1589,20 @@
1589 test th1-encode64-2 {$RESULT eq "dGVzdAA="}
1590
1591 ###############################################################################
1592
1593 #
1594 # This test will fail if the Fossil source file named below changes. Update
1595 # the expected result string below if that happens.
1596 #
1597 test_in_checkout th1-encode64-3 {
1598 fossil test-th-eval --open-config \
1599 {encode64 [artifact trunk ajax/cgi-bin/fossil-json.cgi.example]}
1600 } {
1601 $RESULT eq "IyEvcGF0aC90by9mb3NzaWwvYmluYXJ5CnJlcG9zaXRvcnk6IC9wYXRoL3RvL3JlcG8uZnNsCg=="
1602 }
1603
 
 
 
1604 ###############################################################################
1605
1606 fossil test-th-eval {array exists tcl_platform}
1607 test th1-platform-1 {$RESULT eq "1"}
1608
1609

Keyboard Shortcuts

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