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 Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/commit-warning.test.

   159    159   # TODO: Change to a collection of test-case crafted files
   160    160   #       rather than depend on this list of files that will
   161    161   #       be fragile as development progresses.
   162    162   #
   163    163   # Unless the real goal of this test is to document a collection
   164    164   # of source files that MUST NEVER BE TEXT.
   165    165   #
   166         -run_in_checkout {
          166  +test_block_in_checkout pre-commit-warnings-fossil-1 {
   167    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}]]}
          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    303   
   304    304   ###############################################################################
   305    305   
   306    306   test_cleanup

Changes to test/tester.tcl.

   515    515     fossil test-th-eval "setting th1-hooks"
   516    516     if {[normalize_result] eq "1"} {return 1}
   517    517     fossil test-th-eval --open-config "setting th1-hooks"
   518    518     if {[normalize_result] eq "1"} {return 1}
   519    519     return [info exists ::env(TH1_ENABLE_HOOKS)]
   520    520   }
   521    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.
          522  +# Run the given command script inside the Fossil source repo checkout.
   528    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.
   529    533   proc run_in_checkout { script {dir ""} } {
   530    534     if {[string length $dir] == 0} {set dir $::testfiledir}
   531    535     set savedPwd [pwd]; cd $dir
   532    536     set code [catch {
   533    537       uplevel 1 $script
   534    538     } result]
   535    539     cd $savedPwd; unset savedPwd
   536    540     return -code $code $result
   537    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  +}
   538    581   
   539    582   # Normalize file status lists (like those returned by 'fossil changes')
   540    583   # so they can be compared using simple string comparison
   541    584   #
   542    585   proc normalize_status_list {list} {
   543    586     set normalized [list]
   544    587     set matches [regexp -all -inline -line {^\s*([A-Z_]+:?)\x20+(\S.*)$} $list]

Changes to test/th1-docs.test.

    13     13   #   drh@hwaci.com
    14     14   #   http://www.hwaci.com/drh/
    15     15   #
    16     16   ############################################################################
    17     17   #
    18     18   # TH1 Docs
    19     19   #
           20  +
           21  +if {[outside_fossil_repo]} {
           22  +  puts "Skipping th1-docs-* tests: not in Fossil repo checkout."
           23  +  test_cleanup_then_return
           24  +}
    20     25   
    21     26   fossil test-th-eval "hasfeature th1Docs"
    22     27   
    23     28   if {[normalize_result] ne "1"} {
    24     29     puts "Fossil was not compiled with TH1 docs support."
    25     30     test_cleanup_then_return
    26     31   }

Changes to test/th1.test.

   565    565   
   566    566     fossil test-th-eval "hascap $perm"
   567    567     test th1-hascap-no-$perm-1 {$RESULT eq {0}}
   568    568   
   569    569     fossil test-th-eval "anoncap $perm"
   570    570     test th1-anoncap-no-$perm-1 {$RESULT eq {0}}
   571    571   
   572         -  run_in_checkout {
          572  +  test_block_in_checkout "th1-anycap-*-1 perm" {
   573    573       fossil test-th-eval --set-user-caps "anycap $perm"
   574    574       test th1-anycap-yes-$perm-1 {$RESULT eq {1}}
   575    575   
   576    576       set ::env(TH1_TEST_USER_CAPS) 1; # NOTE: Bad permission.
   577    577       fossil test-th-eval --set-user-caps "anycap $perm"
   578    578       test th1-anycap-no-$perm-1 {$RESULT eq {0}}
   579    579       unset ::env(TH1_TEST_USER_CAPS)
................................................................................
   619    619   ###############################################################################
   620    620   
   621    621   fossil test-th-eval "anoncap o h"
   622    622   test th1-anoncap-no-multiple-2 {$RESULT eq {0}}
   623    623   
   624    624   ###############################################################################
   625    625   
   626         -run_in_checkout {
          626  +test_block_in_checkout "test-anoncap-*" {
   627    627     fossil test-th-eval --set-user-caps "anycap oh"
   628    628     test th1-anycap-yes-multiple-1 {$RESULT eq {1}}
   629    629   
   630    630     set ::env(TH1_TEST_USER_CAPS) o
   631    631     fossil test-th-eval --set-user-caps "anycap oh"
   632    632     test th1-anycap-yes-multiple-2 {$RESULT eq {1}}
   633    633     unset ::env(TH1_TEST_USER_CAPS)
................................................................................
   663    663     fossil test-th-eval --set-anon-caps "anoncap o h"
   664    664     test th1-anoncap-no-multiple-4 {$RESULT eq {0}}
   665    665     unset ::env(TH1_TEST_ANON_CAPS)
   666    666   }
   667    667   
   668    668   ###############################################################################
   669    669   
   670         -run_in_checkout {
          670  +test_in_checkout th1-checkout-1 {
   671    671     # NOTE: The "1" here forces the checkout to be opened.
   672    672     fossil test-th-eval "checkout 1"
   673         -}
   674         -
   675         -test th1-checkout-1 {[string length $RESULT] > 0}
          673  +} [string length $RESULT] > 0}
   676    674   
   677    675   ###############################################################################
   678    676   
   679         -run_in_checkout {
          677  +test_in_checkout th1-checkout-2 {
   680    678     if {$th1Hooks} {
   681    679       fossil test-th-eval "checkout"
   682    680     } else {
   683    681       # NOTE: No TH1 hooks, force checkout to be populated.
   684    682       fossil test-th-eval --open-config "checkout"
   685    683     }
   686         -}
   687         -
   688         -test th1-checkout-2 {[string length $RESULT] > 0}
          684  +} {[string length $RESULT] > 0}
   689    685   
   690    686   ###############################################################################
   691    687   
   692    688   set savedPwd [pwd]; cd /
   693    689   fossil test-th-eval "checkout 1"
   694    690   cd $savedPwd; unset savedPwd
   695    691   test th1-checkout-3 {[string length $RESULT] == 0}
................................................................................
   760    756   ###############################################################################
   761    757   
   762    758   fossil test-th-eval "styleHeader {Page Title Here}"
   763    759   test th1-header-1 {$RESULT eq {TH_ERROR: repository unavailable}}
   764    760   
   765    761   ###############################################################################
   766    762   
   767         -run_in_checkout {
          763  +test_in_checkout th1-header-2 {
   768    764     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]}
   772    766   
   773    767   ###############################################################################
   774    768   
   775    769   fossil test-th-eval "styleFooter"
   776    770   test th1-footer-1 {$RESULT eq {TH_ERROR: repository unavailable}}
   777    771   
   778    772   ###############################################################################
................................................................................
   846    840   ###############################################################################
   847    841   
   848    842   fossil test-th-eval "artifact tip"
   849    843   test th1-artifact-2 {$RESULT eq {TH_ERROR: repository unavailable}}
   850    844   
   851    845   ###############################################################################
   852    846   
   853         -run_in_checkout {
          847  +test_in_checkout th1-artifact-3 {
   854    848     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]}
   858    850   
   859    851   ###############################################################################
   860    852   
   861    853   fossil test-th-eval "artifact 0000000000"
   862    854   test th1-artifact-4 {$RESULT eq {TH_ERROR: repository unavailable}}
   863    855   
   864    856   ###############################################################################
................................................................................
   869    861   ###############################################################################
   870    862   
   871    863   fossil test-th-eval "artifact tip test/th1.test"
   872    864   test th1-artifact-6 {$RESULT eq {TH_ERROR: repository unavailable}}
   873    865   
   874    866   ###############################################################################
   875    867   
   876         -run_in_checkout {
          868  +test_in_checkout th1-artifact-7 {
   877    869     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]}
   881    871   
   882    872   ###############################################################################
   883    873   
   884    874   fossil test-th-eval "artifact 0000000000 test/th1.test"
   885    875   test th1-artifact-8 {$RESULT eq {TH_ERROR: repository unavailable}}
   886    876   
   887    877   ###############################################################################
   888    878   
   889    879   fossil test-th-eval --open-config "artifact 0000000000 test/th1.test"
   890    880   test th1-artifact-9 {$RESULT eq {TH_ERROR: manifest not found}}
   891    881   
   892    882   ###############################################################################
   893    883   
   894         -run_in_checkout {
          884  +test_in_checkout th1-globalState-1 {
   895    885     if {$th1Hooks} {
   896    886       fossil test-th-eval "globalState checkout"
   897    887     } else {
   898    888       # NOTE: No TH1 hooks, force checkout to be populated.
   899    889       fossil test-th-eval --open-config "globalState checkout"
   900    890     }
   901         -}
   902         -
   903         -test th1-globalState-1 {[string length $RESULT] > 0}
          891  +} {[string length $RESULT] > 0}
   904    892   
   905    893   ###############################################################################
   906    894   
   907         -run_in_checkout {
          895  +test_block_in_checkout th1-globalState-2 {
   908    896     if {$th1Hooks} {
   909    897       fossil test-th-eval "globalState checkout"
   910    898       test th1-globalState-2 {$RESULT eq [fossil test-th-eval checkout]}
   911    899     } else {
   912    900       # NOTE: No TH1 hooks, force checkout to be populated.
   913    901       fossil test-th-eval --open-config "globalState checkout"
   914    902   
................................................................................
   940    928   ###############################################################################
   941    929   
   942    930   fossil test-th-eval --errorlog foserrors.log "globalState log"
   943    931   test th1-globalState-7 {$RESULT eq "foserrors.log"}
   944    932   
   945    933   ###############################################################################
   946    934   
   947         -run_in_checkout {
          935  +test_in_checkout th1-globalState-8 {
   948    936     if {$th1Hooks} {
   949    937       fossil test-th-eval "globalState repository"
   950    938     } else {
   951    939       # NOTE: No TH1 hooks, force repository to be populated.
   952    940       fossil test-th-eval --open-config "globalState repository"
   953    941     }
   954         -}
   955         -
   956         -test th1-globalState-8 {[string length $RESULT] > 0}
          942  +} {[string length $RESULT] > 0}
   957    943   
   958    944   ###############################################################################
   959    945   
   960         -run_in_checkout {
          946  +test_block_in_checkout th1-globalState-9 {
   961    947     if {$th1Hooks} {
   962    948       fossil test-th-eval "globalState repository"
   963    949       test th1-globalState-9 {$RESULT eq [fossil test-th-eval repository]}
   964    950     } else {
   965    951       # NOTE: No TH1 hooks, force repository to be populated.
   966    952       fossil test-th-eval --open-config "globalState repository"
   967    953   
................................................................................
  1601   1587   
  1602   1588   fossil test-th-eval {encode64 test\x00}
  1603   1589   test th1-encode64-2 {$RESULT eq "dGVzdAA="}
  1604   1590   
  1605   1591   ###############################################################################
  1606   1592   
  1607   1593   #
  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.
  1610   1596   #
  1611         -run_in_checkout {
         1597  +test_in_checkout th1-encode64-3 {
  1612   1598     fossil test-th-eval --open-config \
  1613   1599         {encode64 [artifact trunk ajax/cgi-bin/fossil-json.cgi.example]}
         1600  +} {
         1601  +  $RESULT eq "IyEvcGF0aC90by9mb3NzaWwvYmluYXJ5CnJlcG9zaXRvcnk6IC9wYXRoL3RvL3JlcG8uZnNsCg=="
  1614   1602   }
  1615   1603   
  1616         -test th1-encode64-3 {$RESULT eq \
  1617         -"IyEvcGF0aC90by9mb3NzaWwvYmluYXJ5CnJlcG9zaXRvcnk6IC9wYXRoL3RvL3JlcG8uZnNsCg=="}
  1618         -
  1619   1604   ###############################################################################
  1620   1605   
  1621   1606   fossil test-th-eval {array exists tcl_platform}
  1622   1607   test th1-platform-1 {$RESULT eq "1"}
  1623   1608   
  1624   1609   ###############################################################################
  1625   1610