Fossil

Check-in [33efa2fa]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment: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.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | wrap-run_in_checkout
Files: files | file ages | folders
SHA3-256:33efa2fa05c1ff76376b1c96164dfebb16635ce3cec8a49ac6e019389f3da8cf
User & Date: wyoung 2018-09-03 00:40:05
References
2018-09-03
06:19
Fixed a Tcl syntax error checked in with [33efa2fa]. (Yay dynamic languages that run the code even if it's syntactically invalid. P'tui!) check-in: 4315d464 user: wyoung tags: wrap-run_in_checkout
06:13
Fixed a Tcl logic error committed with [33efa2fa]. check-in: 02430597 user: wyoung tags: wrap-run_in_checkout
Context
2018-09-03
02:57
Extracted the logic that was in tester.tcl's new outside_fossil_repo proc to the global level which just saves the result to a global variable so the logic doesn't have to be re-run for each test that relies on it. The result doesn't change from one call to the next, as you'd hope for a proc without parameters. check-in: 1a4e87dc user: wyoung tags: wrap-run_in_checkout
00:40
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. check-in: 33efa2fa user: wyoung tags: wrap-run_in_checkout
00:24
The -quiet flag passed by default to tester.tcl can now be overridden by passing TESTFLAGS to make. Before, there was no way to set -verbose this way because "-quiet -verbose" means the same thing as "-quiet". check-in: 401a4c3d user: wyoung tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/commit-warning.test.

159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303

304
305
306
# TODO: Change to a collection of test-case crafted files
#       rather than depend on this list of files that will
#       be fragile as development progresses.
#
# Unless the real goal of this test is to document a collection
# of source files that MUST NEVER BE TEXT.
#
run_in_checkout {
  fossil test-commit-warning --no-settings
}

test pre-commit-warnings-fossil-1 {[normalize_result] eq \
    [subst -nocommands -novariables [string trim {
1\tart/branching.odp\tbinary data
1\tart/concept1.dia\tbinary data
1\tart/concept2.dia\tbinary data
1\tcompat/zlib/contrib/blast/test.pk\tbinary data
1\tcompat/zlib/contrib/dotzlib/DotZLib.build\tCR/LF line endings
1\tcompat/zlib/contrib/dotzlib/DotZLib.chm\tbinary data
1\tcompat/zlib/contrib/dotzlib/DotZLib.sln\tCR/LF line endings
1\tcompat/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs\tCR/LF line endings
1\tcompat/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs\tinvalid UTF-8
1\tcompat/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs\tinvalid UTF-8
1\tcompat/zlib/contrib/dotzlib/DotZLib/CodecBase.cs\tinvalid UTF-8
1\tcompat/zlib/contrib/dotzlib/DotZLib/Deflater.cs\tinvalid UTF-8
1\tcompat/zlib/contrib/dotzlib/DotZLib/DotZLib.cs\tinvalid UTF-8
1\tcompat/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj\tCR/LF line endings
1\tcompat/zlib/contrib/dotzlib/DotZLib/GZipStream.cs\tinvalid UTF-8
1\tcompat/zlib/contrib/dotzlib/DotZLib/Inflater.cs\tinvalid UTF-8
1\tcompat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs\tCR/LF line endings
1\tcompat/zlib/contrib/dotzlib/LICENSE_1_0.txt\tCR/LF line endings
1\tcompat/zlib/contrib/dotzlib/readme.txt\tCR/LF line endings
1\tcompat/zlib/contrib/gcc_gvmat64/gvmat64.S\tCR/LF line endings
1\tcompat/zlib/contrib/masmx64/bld_ml64.bat\tCR/LF line endings
1\tcompat/zlib/contrib/masmx64/gvmat64.asm\tCR/LF line endings
1\tcompat/zlib/contrib/masmx64/inffas8664.c\tCR/LF line endings
1\tcompat/zlib/contrib/masmx64/inffasx64.asm\tCR/LF line endings
1\tcompat/zlib/contrib/masmx64/readme.txt\tCR/LF line endings
1\tcompat/zlib/contrib/masmx86/bld_ml32.bat\tCR/LF line endings
1\tcompat/zlib/contrib/masmx86/inffas32.asm\tCR/LF line endings
1\tcompat/zlib/contrib/masmx86/match686.asm\tCR/LF line endings
1\tcompat/zlib/contrib/masmx86/readme.txt\tCR/LF line endings
1\tcompat/zlib/contrib/puff/zeros.raw\tbinary data
1\tcompat/zlib/contrib/testzlib/testzlib.c\tCR/LF line endings
1\tcompat/zlib/contrib/testzlib/testzlib.txt\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/readme.txt\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc10/miniunz.vcxproj\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc10/miniunz.vcxproj.filters\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc10/minizip.vcxproj\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc10/minizip.vcxproj.filters\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc10/testzlib.vcxproj\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc10/testzlib.vcxproj.filters\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.filters\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc10/zlib.rc\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.filters\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc10/zlibvc.def\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc10/zlibvc.sln\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.filters\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc11/miniunz.vcxproj\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc11/minizip.vcxproj\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc11/testzlib.vcxproj\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc11/testzlibdll.vcxproj\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc11/zlib.rc\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc11/zlibstat.vcxproj\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc11/zlibvc.def\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc11/zlibvc.sln\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc11/zlibvc.vcxproj\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc12/zlibvc.def\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc14/zlibvc.def\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc9/miniunz.vcproj\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc9/minizip.vcproj\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc9/testzlib.vcproj\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc9/testzlibdll.vcproj\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc9/zlib.rc\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc9/zlibstat.vcproj\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc9/zlibvc.def\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc9/zlibvc.sln\tCR/LF line endings
1\tcompat/zlib/contrib/vstudio/vc9/zlibvc.vcproj\tCR/LF line endings
1\tcompat/zlib/win32/zlib.def\tCR/LF line endings
1\tcompat/zlib/zlib.3.pdf\tbinary data
1\tcompat/zlib/zlib.map\tCR/LF line endings
1\tsetup/fossil.iss\tCR/LF line endings
1\tskins/blitz/arrow_project.png\tbinary data
1\tskins/blitz/dir.png\tbinary data
1\tskins/blitz/file.png\tbinary data
1\tskins/blitz/fossil_100.png\tbinary data
1\tskins/blitz/fossil_80_reversed_darkcyan.png\tbinary data
1\tskins/blitz/fossil_80_reversed_darkcyan_text.png\tbinary data
1\tskins/blitz/rss_20.png\tbinary data
1\tskins/bootstrap/css.txt\tlong lines
1\ttest/th1-docs-input.txt\tCR/LF line endings
1\ttest/th1-hooks-input.txt\tCR/LF line endings
1\ttest/utf16be.txt\tUnicode
1\ttest/utf16le.txt\tUnicode
1\twin/buildmsvc.bat\tCR/LF line endings
1\twin/fossil.ico\tbinary data
1\twin/fossil.rc\tinvalid UTF-8
1\twww/CollRev1.gif\tbinary data
1\twww/CollRev2.gif\tbinary data
1\twww/CollRev3.gif\tbinary data
1\twww/CollRev4.gif\tbinary data
1\twww/apple-touch-icon.png\tbinary data
1\twww/background.jpg\tbinary data
1\twww/branch01.gif\tbinary data
1\twww/branch02.gif\tbinary data
1\twww/branch03.gif\tbinary data
1\twww/branch04.gif\tbinary data
1\twww/branch05.gif\tbinary data
1\twww/build-icons/linux.gif\tbinary data
1\twww/build-icons/linux64.gif\tbinary data
1\twww/build-icons/mac.gif\tbinary data
1\twww/build-icons/openbsd.gif\tbinary data
1\twww/build-icons/src.gif\tbinary data
1\twww/build-icons/win32.gif\tbinary data
1\twww/concept1.gif\tbinary data
1\twww/concept2.gif\tbinary data
1\twww/copyright-release.pdf\tbinary data
1\twww/delta1.gif\tbinary data
1\twww/delta2.gif\tbinary data
1\twww/delta3.gif\tbinary data
1\twww/delta4.gif\tbinary data
1\twww/delta5.gif\tbinary data
1\twww/delta6.gif\tbinary data
1\twww/encode1.gif\tbinary data
1\twww/encode10.gif\tbinary data
1\twww/encode2.gif\tbinary data
1\twww/encode3.gif\tbinary data
1\twww/encode4.gif\tbinary data
1\twww/encode5.gif\tbinary data
1\twww/encode6.gif\tbinary data
1\twww/encode7.gif\tbinary data
1\twww/encode8.gif\tbinary data
1\twww/encode9.gif\tbinary data
1\twww/fossil.gif\tbinary data
1\twww/fossil2.gif\tbinary data
1\twww/fossil3.gif\tbinary data
1\twww/fossil_logo_small.gif\tbinary data
1\twww/fossil_logo_small2.gif\tbinary data
1\twww/fossil_logo_small3.gif\tbinary data
1\twww/xkcd-git.gif\tbinary data
1}]]}


###############################################################################

test_cleanup







|

|
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>



159
160
161
162
163
164
165
166
167
168

169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
# TODO: Change to a collection of test-case crafted files
#       rather than depend on this list of files that will
#       be fragile as development progresses.
#
# Unless the real goal of this test is to document a collection
# of source files that MUST NEVER BE TEXT.
#
test_block_in_checkout pre-commit-warnings-fossil-1 {
  fossil test-commit-warning --no-settings
} {

  test pre-commit-warnings-fossil-1 {[normalize_result] eq \
      [subst -nocommands -novariables [string trim {
  1\tart/branching.odp\tbinary data
  1\tart/concept1.dia\tbinary data
  1\tart/concept2.dia\tbinary data
  1\tcompat/zlib/contrib/blast/test.pk\tbinary data
  1\tcompat/zlib/contrib/dotzlib/DotZLib.build\tCR/LF line endings
  1\tcompat/zlib/contrib/dotzlib/DotZLib.chm\tbinary data
  1\tcompat/zlib/contrib/dotzlib/DotZLib.sln\tCR/LF line endings
  1\tcompat/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs\tCR/LF line endings
  1\tcompat/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs\tinvalid UTF-8
  1\tcompat/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs\tinvalid UTF-8
  1\tcompat/zlib/contrib/dotzlib/DotZLib/CodecBase.cs\tinvalid UTF-8
  1\tcompat/zlib/contrib/dotzlib/DotZLib/Deflater.cs\tinvalid UTF-8
  1\tcompat/zlib/contrib/dotzlib/DotZLib/DotZLib.cs\tinvalid UTF-8
  1\tcompat/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj\tCR/LF line endings
  1\tcompat/zlib/contrib/dotzlib/DotZLib/GZipStream.cs\tinvalid UTF-8
  1\tcompat/zlib/contrib/dotzlib/DotZLib/Inflater.cs\tinvalid UTF-8
  1\tcompat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs\tCR/LF line endings
  1\tcompat/zlib/contrib/dotzlib/LICENSE_1_0.txt\tCR/LF line endings
  1\tcompat/zlib/contrib/dotzlib/readme.txt\tCR/LF line endings
  1\tcompat/zlib/contrib/gcc_gvmat64/gvmat64.S\tCR/LF line endings
  1\tcompat/zlib/contrib/masmx64/bld_ml64.bat\tCR/LF line endings
  1\tcompat/zlib/contrib/masmx64/gvmat64.asm\tCR/LF line endings
  1\tcompat/zlib/contrib/masmx64/inffas8664.c\tCR/LF line endings
  1\tcompat/zlib/contrib/masmx64/inffasx64.asm\tCR/LF line endings
  1\tcompat/zlib/contrib/masmx64/readme.txt\tCR/LF line endings
  1\tcompat/zlib/contrib/masmx86/bld_ml32.bat\tCR/LF line endings
  1\tcompat/zlib/contrib/masmx86/inffas32.asm\tCR/LF line endings
  1\tcompat/zlib/contrib/masmx86/match686.asm\tCR/LF line endings
  1\tcompat/zlib/contrib/masmx86/readme.txt\tCR/LF line endings
  1\tcompat/zlib/contrib/puff/zeros.raw\tbinary data
  1\tcompat/zlib/contrib/testzlib/testzlib.c\tCR/LF line endings
  1\tcompat/zlib/contrib/testzlib/testzlib.txt\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/readme.txt\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc10/miniunz.vcxproj\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc10/miniunz.vcxproj.filters\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc10/minizip.vcxproj\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc10/minizip.vcxproj.filters\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc10/testzlib.vcxproj\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc10/testzlib.vcxproj.filters\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.filters\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc10/zlib.rc\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.filters\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc10/zlibvc.def\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc10/zlibvc.sln\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.filters\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc11/miniunz.vcxproj\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc11/minizip.vcxproj\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc11/testzlib.vcxproj\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc11/testzlibdll.vcxproj\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc11/zlib.rc\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc11/zlibstat.vcxproj\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc11/zlibvc.def\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc11/zlibvc.sln\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc11/zlibvc.vcxproj\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc12/zlibvc.def\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc14/zlibvc.def\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc9/miniunz.vcproj\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc9/minizip.vcproj\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc9/testzlib.vcproj\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc9/testzlibdll.vcproj\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc9/zlib.rc\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc9/zlibstat.vcproj\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc9/zlibvc.def\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc9/zlibvc.sln\tCR/LF line endings
  1\tcompat/zlib/contrib/vstudio/vc9/zlibvc.vcproj\tCR/LF line endings
  1\tcompat/zlib/win32/zlib.def\tCR/LF line endings
  1\tcompat/zlib/zlib.3.pdf\tbinary data
  1\tcompat/zlib/zlib.map\tCR/LF line endings
  1\tsetup/fossil.iss\tCR/LF line endings
  1\tskins/blitz/arrow_project.png\tbinary data
  1\tskins/blitz/dir.png\tbinary data
  1\tskins/blitz/file.png\tbinary data
  1\tskins/blitz/fossil_100.png\tbinary data
  1\tskins/blitz/fossil_80_reversed_darkcyan.png\tbinary data
  1\tskins/blitz/fossil_80_reversed_darkcyan_text.png\tbinary data
  1\tskins/blitz/rss_20.png\tbinary data
  1\tskins/bootstrap/css.txt\tlong lines
  1\ttest/th1-docs-input.txt\tCR/LF line endings
  1\ttest/th1-hooks-input.txt\tCR/LF line endings
  1\ttest/utf16be.txt\tUnicode
  1\ttest/utf16le.txt\tUnicode
  1\twin/buildmsvc.bat\tCR/LF line endings
  1\twin/fossil.ico\tbinary data
  1\twin/fossil.rc\tinvalid UTF-8
  1\twww/CollRev1.gif\tbinary data
  1\twww/CollRev2.gif\tbinary data
  1\twww/CollRev3.gif\tbinary data
  1\twww/CollRev4.gif\tbinary data
  1\twww/apple-touch-icon.png\tbinary data
  1\twww/background.jpg\tbinary data
  1\twww/branch01.gif\tbinary data
  1\twww/branch02.gif\tbinary data
  1\twww/branch03.gif\tbinary data
  1\twww/branch04.gif\tbinary data
  1\twww/branch05.gif\tbinary data
  1\twww/build-icons/linux.gif\tbinary data
  1\twww/build-icons/linux64.gif\tbinary data
  1\twww/build-icons/mac.gif\tbinary data
  1\twww/build-icons/openbsd.gif\tbinary data
  1\twww/build-icons/src.gif\tbinary data
  1\twww/build-icons/win32.gif\tbinary data
  1\twww/concept1.gif\tbinary data
  1\twww/concept2.gif\tbinary data
  1\twww/copyright-release.pdf\tbinary data
  1\twww/delta1.gif\tbinary data
  1\twww/delta2.gif\tbinary data
  1\twww/delta3.gif\tbinary data
  1\twww/delta4.gif\tbinary data
  1\twww/delta5.gif\tbinary data
  1\twww/delta6.gif\tbinary data
  1\twww/encode1.gif\tbinary data
  1\twww/encode10.gif\tbinary data
  1\twww/encode2.gif\tbinary data
  1\twww/encode3.gif\tbinary data
  1\twww/encode4.gif\tbinary data
  1\twww/encode5.gif\tbinary data
  1\twww/encode6.gif\tbinary data
  1\twww/encode7.gif\tbinary data
  1\twww/encode8.gif\tbinary data
  1\twww/encode9.gif\tbinary data
  1\twww/fossil.gif\tbinary data
  1\twww/fossil2.gif\tbinary data
  1\twww/fossil3.gif\tbinary data
  1\twww/fossil_logo_small.gif\tbinary data
  1\twww/fossil_logo_small2.gif\tbinary data
  1\twww/fossil_logo_small3.gif\tbinary data
  1\twww/xkcd-git.gif\tbinary data
  1}]]}
}

###############################################################################

test_cleanup

Changes to test/tester.tcl.

515
516
517
518
519
520
521
522
523

524
525

526
527

528



529
530
531
532
533
534
535
536
537







































538
539
540
541
542
543
544
  fossil test-th-eval "setting th1-hooks"
  if {[normalize_result] eq "1"} {return 1}
  fossil test-th-eval --open-config "setting th1-hooks"
  if {[normalize_result] eq "1"} {return 1}
  return [info exists ::env(TH1_ENABLE_HOOKS)]
}

# This (rarely used) procedure is designed to run a test within the Fossil
# source checkout (e.g. one that does NOT modify any state), while saving

# and restoring the current directory (e.g. one used when running a test
# file outside of the Fossil source checkout).  Please do NOT use this

# procedure unless you are absolutely sure it does not modify the state of
# the repository or source checkout in any way.

#



proc run_in_checkout { script {dir ""} } {
  if {[string length $dir] == 0} {set dir $::testfiledir}
  set savedPwd [pwd]; cd $dir
  set code [catch {
    uplevel 1 $script
  } result]
  cd $savedPwd; unset savedPwd
  return -code $code $result
}








































# Normalize file status lists (like those returned by 'fossil changes')
# so they can be compared using simple string comparison
#
proc normalize_status_list {list} {
  set normalized [list]
  set matches [regexp -all -inline -line {^\s*([A-Z_]+:?)\x20+(\S.*)$} $list]







|
<
>
|
<
>
|
|
>

>
>
>









>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







515
516
517
518
519
520
521
522

523
524

525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
  fossil test-th-eval "setting th1-hooks"
  if {[normalize_result] eq "1"} {return 1}
  fossil test-th-eval --open-config "setting th1-hooks"
  if {[normalize_result] eq "1"} {return 1}
  return [info exists ::env(TH1_ENABLE_HOOKS)]
}

# Run the given command script inside the Fossil source repo checkout.

#
# Callers of this function must ensure two things:

#
# 1. This test run is in fact being done from within a Fossil repo
#    checkout directory.  If you are unsure, call outside_fossil_repo
#    or one of the test_* wrappers below it which do call it first.
#
#    As a rule, you should not be calling this function directly!
#
# 2. The test does NOT modify the Fossil checkout tree in any way.
proc run_in_checkout { script {dir ""} } {
  if {[string length $dir] == 0} {set dir $::testfiledir}
  set savedPwd [pwd]; cd $dir
  set code [catch {
    uplevel 1 $script
  } result]
  cd $savedPwd; unset savedPwd
  return -code $code $result
}

# Return zero if we're being run from within a Fossil repo checkout.
# Used to skip uses of run_in_checkout so that those tests don't fail
# when run elsewhere, such as from a release tarball checkout.
proc outside_fossil_repo {} {
  if {$::is_windows} {
    return ![file exists "$::testfiledir\\..\\_FOSSIL_"]
  } else {
    return ![file exists "$::testfiledir/../.fslckout"]
  }
}

# Wrapper for the above function pair.  The tscript parameter is an
# optional post-run test script.  Some callers choose instead to put
# the tests inline with the rscript commands.
#
# Be sure to adhere to the requirements of run_in_checkout!
proc test_block_in_checkout { name rscript {tscript ""} } {
  if {[outside_fossil_repo]} {
    puts "Skipping $name test: not in Fossil repo checkout."
  } else {
    run_in_checkout $rscript
    if {[string length $tscript] == 0} {
      return ""
    } else {
      set code [catch {
        uplevel 1 $tscript
      } result]
      return -code $code $result
    }
  }
}

# Single-test wrapper for the above.
proc test_in_checkout { name rscript tscript } {
  return test_block_in_checkout name rscript {
    test $name $tscript
  }
}

# Normalize file status lists (like those returned by 'fossil changes')
# so they can be compared using simple string comparison
#
proc normalize_status_list {list} {
  set normalized [list]
  set matches [regexp -all -inline -line {^\s*([A-Z_]+:?)\x20+(\S.*)$} $list]

Changes to test/th1-docs.test.

13
14
15
16
17
18
19





20
21
22
23
24
25
26
#   drh@hwaci.com
#   http://www.hwaci.com/drh/
#
############################################################################
#
# TH1 Docs
#






fossil test-th-eval "hasfeature th1Docs"

if {[normalize_result] ne "1"} {
  puts "Fossil was not compiled with TH1 docs support."
  test_cleanup_then_return
}







>
>
>
>
>







13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#   drh@hwaci.com
#   http://www.hwaci.com/drh/
#
############################################################################
#
# TH1 Docs
#

if {[outside_fossil_repo]} {
  puts "Skipping th1-docs-* tests: not in Fossil repo checkout."
  test_cleanup_then_return
}

fossil test-th-eval "hasfeature th1Docs"

if {[normalize_result] ne "1"} {
  puts "Fossil was not compiled with TH1 docs support."
  test_cleanup_then_return
}

Changes to test/th1.test.

565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
...
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
...
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
...
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
...
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
...
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
...
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
....
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614

1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625

  fossil test-th-eval "hascap $perm"
  test th1-hascap-no-$perm-1 {$RESULT eq {0}}

  fossil test-th-eval "anoncap $perm"
  test th1-anoncap-no-$perm-1 {$RESULT eq {0}}

  run_in_checkout {
    fossil test-th-eval --set-user-caps "anycap $perm"
    test th1-anycap-yes-$perm-1 {$RESULT eq {1}}

    set ::env(TH1_TEST_USER_CAPS) 1; # NOTE: Bad permission.
    fossil test-th-eval --set-user-caps "anycap $perm"
    test th1-anycap-no-$perm-1 {$RESULT eq {0}}
    unset ::env(TH1_TEST_USER_CAPS)
................................................................................
###############################################################################

fossil test-th-eval "anoncap o h"
test th1-anoncap-no-multiple-2 {$RESULT eq {0}}

###############################################################################

run_in_checkout {
  fossil test-th-eval --set-user-caps "anycap oh"
  test th1-anycap-yes-multiple-1 {$RESULT eq {1}}

  set ::env(TH1_TEST_USER_CAPS) o
  fossil test-th-eval --set-user-caps "anycap oh"
  test th1-anycap-yes-multiple-2 {$RESULT eq {1}}
  unset ::env(TH1_TEST_USER_CAPS)
................................................................................
  fossil test-th-eval --set-anon-caps "anoncap o h"
  test th1-anoncap-no-multiple-4 {$RESULT eq {0}}
  unset ::env(TH1_TEST_ANON_CAPS)
}

###############################################################################

run_in_checkout {
  # NOTE: The "1" here forces the checkout to be opened.
  fossil test-th-eval "checkout 1"
}

test th1-checkout-1 {[string length $RESULT] > 0}

###############################################################################

run_in_checkout {
  if {$th1Hooks} {
    fossil test-th-eval "checkout"
  } else {
    # NOTE: No TH1 hooks, force checkout to be populated.
    fossil test-th-eval --open-config "checkout"
  }
}

test th1-checkout-2 {[string length $RESULT] > 0}

###############################################################################

set savedPwd [pwd]; cd /
fossil test-th-eval "checkout 1"
cd $savedPwd; unset savedPwd
test th1-checkout-3 {[string length $RESULT] == 0}
................................................................................
###############################################################################

fossil test-th-eval "styleHeader {Page Title Here}"
test th1-header-1 {$RESULT eq {TH_ERROR: repository unavailable}}

###############################################################################

run_in_checkout {
  fossil test-th-eval --open-config "styleHeader {Page Title Here}"
}

test th1-header-2 {[regexp -- {<title>Fossil: Page Title Here</title>} $RESULT]}

###############################################################################

fossil test-th-eval "styleFooter"
test th1-footer-1 {$RESULT eq {TH_ERROR: repository unavailable}}

###############################################################################
................................................................................
###############################################################################

fossil test-th-eval "artifact tip"
test th1-artifact-2 {$RESULT eq {TH_ERROR: repository unavailable}}

###############################################################################

run_in_checkout {
  fossil test-th-eval --open-config "artifact tip"
}

test th1-artifact-3 {[regexp -- {F test/th1\.test [0-9a-f]{40,64}} $RESULT]}

###############################################################################

fossil test-th-eval "artifact 0000000000"
test th1-artifact-4 {$RESULT eq {TH_ERROR: repository unavailable}}

###############################################################################
................................................................................
###############################################################################

fossil test-th-eval "artifact tip test/th1.test"
test th1-artifact-6 {$RESULT eq {TH_ERROR: repository unavailable}}

###############################################################################

run_in_checkout {
  fossil test-th-eval --open-config "artifact tip test/th1.test"
}

test th1-artifact-7 {[regexp -- {th1-artifact-7} $RESULT]}

###############################################################################

fossil test-th-eval "artifact 0000000000 test/th1.test"
test th1-artifact-8 {$RESULT eq {TH_ERROR: repository unavailable}}

###############################################################################

fossil test-th-eval --open-config "artifact 0000000000 test/th1.test"
test th1-artifact-9 {$RESULT eq {TH_ERROR: manifest not found}}

###############################################################################

run_in_checkout {
  if {$th1Hooks} {
    fossil test-th-eval "globalState checkout"
  } else {
    # NOTE: No TH1 hooks, force checkout to be populated.
    fossil test-th-eval --open-config "globalState checkout"
  }
}

test th1-globalState-1 {[string length $RESULT] > 0}

###############################################################################

run_in_checkout {
  if {$th1Hooks} {
    fossil test-th-eval "globalState checkout"
    test th1-globalState-2 {$RESULT eq [fossil test-th-eval checkout]}
  } else {
    # NOTE: No TH1 hooks, force checkout to be populated.
    fossil test-th-eval --open-config "globalState checkout"

................................................................................
###############################################################################

fossil test-th-eval --errorlog foserrors.log "globalState log"
test th1-globalState-7 {$RESULT eq "foserrors.log"}

###############################################################################

run_in_checkout {
  if {$th1Hooks} {
    fossil test-th-eval "globalState repository"
  } else {
    # NOTE: No TH1 hooks, force repository to be populated.
    fossil test-th-eval --open-config "globalState repository"
  }
}

test th1-globalState-8 {[string length $RESULT] > 0}

###############################################################################

run_in_checkout {
  if {$th1Hooks} {
    fossil test-th-eval "globalState repository"
    test th1-globalState-9 {$RESULT eq [fossil test-th-eval repository]}
  } else {
    # NOTE: No TH1 hooks, force repository to be populated.
    fossil test-th-eval --open-config "globalState repository"

................................................................................

fossil test-th-eval {encode64 test\x00}
test th1-encode64-2 {$RESULT eq "dGVzdAA="}

###############################################################################

#
# TODO: Modify the result of this test if the source file (i.e.
#       "ajax/cgi-bin/fossil-json.cgi.example") changes.
#
run_in_checkout {
  fossil test-th-eval --open-config \
      {encode64 [artifact trunk ajax/cgi-bin/fossil-json.cgi.example]}
}


test th1-encode64-3 {$RESULT eq \
"IyEvcGF0aC90by9mb3NzaWwvYmluYXJ5CnJlcG9zaXRvcnk6IC9wYXRoL3RvL3JlcG8uZnNsCg=="}

###############################################################################

fossil test-th-eval {array exists tcl_platform}
test th1-platform-1 {$RESULT eq "1"}

###############################################################################








|







 







|







 







|


<
<
|



|






<
<
|







 







|

<
<
|







 







|

<
<
|







 







|

<
<
|













|






<
<
|



|







 







|






<
<
|



|







 







|
|

|


|
>
|
<
<








565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
...
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
...
663
664
665
666
667
668
669
670
671
672


673
674
675
676
677
678
679
680
681
682
683


684
685
686
687
688
689
690
691
...
756
757
758
759
760
761
762
763
764


765
766
767
768
769
770
771
772
...
840
841
842
843
844
845
846
847
848


849
850
851
852
853
854
855
856
...
861
862
863
864
865
866
867
868
869


870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890


891
892
893
894
895
896
897
898
899
900
901
902
...
928
929
930
931
932
933
934
935
936
937
938
939
940
941


942
943
944
945
946
947
948
949
950
951
952
953
....
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602


1603
1604
1605
1606
1607
1608
1609
1610

  fossil test-th-eval "hascap $perm"
  test th1-hascap-no-$perm-1 {$RESULT eq {0}}

  fossil test-th-eval "anoncap $perm"
  test th1-anoncap-no-$perm-1 {$RESULT eq {0}}

  test_block_in_checkout "th1-anycap-*-1 perm" {
    fossil test-th-eval --set-user-caps "anycap $perm"
    test th1-anycap-yes-$perm-1 {$RESULT eq {1}}

    set ::env(TH1_TEST_USER_CAPS) 1; # NOTE: Bad permission.
    fossil test-th-eval --set-user-caps "anycap $perm"
    test th1-anycap-no-$perm-1 {$RESULT eq {0}}
    unset ::env(TH1_TEST_USER_CAPS)
................................................................................
###############################################################################

fossil test-th-eval "anoncap o h"
test th1-anoncap-no-multiple-2 {$RESULT eq {0}}

###############################################################################

test_block_in_checkout "test-anoncap-*" {
  fossil test-th-eval --set-user-caps "anycap oh"
  test th1-anycap-yes-multiple-1 {$RESULT eq {1}}

  set ::env(TH1_TEST_USER_CAPS) o
  fossil test-th-eval --set-user-caps "anycap oh"
  test th1-anycap-yes-multiple-2 {$RESULT eq {1}}
  unset ::env(TH1_TEST_USER_CAPS)
................................................................................
  fossil test-th-eval --set-anon-caps "anoncap o h"
  test th1-anoncap-no-multiple-4 {$RESULT eq {0}}
  unset ::env(TH1_TEST_ANON_CAPS)
}

###############################################################################

test_in_checkout th1-checkout-1 {
  # NOTE: The "1" here forces the checkout to be opened.
  fossil test-th-eval "checkout 1"


} [string length $RESULT] > 0}

###############################################################################

test_in_checkout th1-checkout-2 {
  if {$th1Hooks} {
    fossil test-th-eval "checkout"
  } else {
    # NOTE: No TH1 hooks, force checkout to be populated.
    fossil test-th-eval --open-config "checkout"
  }


} {[string length $RESULT] > 0}

###############################################################################

set savedPwd [pwd]; cd /
fossil test-th-eval "checkout 1"
cd $savedPwd; unset savedPwd
test th1-checkout-3 {[string length $RESULT] == 0}
................................................................................
###############################################################################

fossil test-th-eval "styleHeader {Page Title Here}"
test th1-header-1 {$RESULT eq {TH_ERROR: repository unavailable}}

###############################################################################

test_in_checkout th1-header-2 {
  fossil test-th-eval --open-config "styleHeader {Page Title Here}"


} {[regexp -- {<title>Fossil: Page Title Here</title>} $RESULT]}

###############################################################################

fossil test-th-eval "styleFooter"
test th1-footer-1 {$RESULT eq {TH_ERROR: repository unavailable}}

###############################################################################
................................................................................
###############################################################################

fossil test-th-eval "artifact tip"
test th1-artifact-2 {$RESULT eq {TH_ERROR: repository unavailable}}

###############################################################################

test_in_checkout th1-artifact-3 {
  fossil test-th-eval --open-config "artifact tip"


} {[regexp -- {F test/th1\.test [0-9a-f]{40,64}} $RESULT]}

###############################################################################

fossil test-th-eval "artifact 0000000000"
test th1-artifact-4 {$RESULT eq {TH_ERROR: repository unavailable}}

###############################################################################
................................................................................
###############################################################################

fossil test-th-eval "artifact tip test/th1.test"
test th1-artifact-6 {$RESULT eq {TH_ERROR: repository unavailable}}

###############################################################################

test_in_checkout th1-artifact-7 {
  fossil test-th-eval --open-config "artifact tip test/th1.test"


} {[regexp -- {th1-artifact-7} $RESULT]}

###############################################################################

fossil test-th-eval "artifact 0000000000 test/th1.test"
test th1-artifact-8 {$RESULT eq {TH_ERROR: repository unavailable}}

###############################################################################

fossil test-th-eval --open-config "artifact 0000000000 test/th1.test"
test th1-artifact-9 {$RESULT eq {TH_ERROR: manifest not found}}

###############################################################################

test_in_checkout th1-globalState-1 {
  if {$th1Hooks} {
    fossil test-th-eval "globalState checkout"
  } else {
    # NOTE: No TH1 hooks, force checkout to be populated.
    fossil test-th-eval --open-config "globalState checkout"
  }


} {[string length $RESULT] > 0}

###############################################################################

test_block_in_checkout th1-globalState-2 {
  if {$th1Hooks} {
    fossil test-th-eval "globalState checkout"
    test th1-globalState-2 {$RESULT eq [fossil test-th-eval checkout]}
  } else {
    # NOTE: No TH1 hooks, force checkout to be populated.
    fossil test-th-eval --open-config "globalState checkout"

................................................................................
###############################################################################

fossil test-th-eval --errorlog foserrors.log "globalState log"
test th1-globalState-7 {$RESULT eq "foserrors.log"}

###############################################################################

test_in_checkout th1-globalState-8 {
  if {$th1Hooks} {
    fossil test-th-eval "globalState repository"
  } else {
    # NOTE: No TH1 hooks, force repository to be populated.
    fossil test-th-eval --open-config "globalState repository"
  }


} {[string length $RESULT] > 0}

###############################################################################

test_block_in_checkout th1-globalState-9 {
  if {$th1Hooks} {
    fossil test-th-eval "globalState repository"
    test th1-globalState-9 {$RESULT eq [fossil test-th-eval repository]}
  } else {
    # NOTE: No TH1 hooks, force repository to be populated.
    fossil test-th-eval --open-config "globalState repository"

................................................................................

fossil test-th-eval {encode64 test\x00}
test th1-encode64-2 {$RESULT eq "dGVzdAA="}

###############################################################################

#
# This test will fail if the Fossil source file named below changes.  Update
# the expected result string below if that happens.
#
test_in_checkout th1-encode64-3 {
  fossil test-th-eval --open-config \
      {encode64 [artifact trunk ajax/cgi-bin/fossil-json.cgi.example]}
} {
  $RESULT eq "IyEvcGF0aC90by9mb3NzaWwvYmluYXJ5CnJlcG9zaXRvcnk6IC9wYXRoL3RvL3JlcG8uZnNsCg=="
}



###############################################################################

fossil test-th-eval {array exists tcl_platform}
test th1-platform-1 {$RESULT eq "1"}

###############################################################################