Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Add a basic set of tests for the manifest property, including minimal coverage of the existance of the tags manifest. This can and should be extended to cover interesting content for the tags manifest, and likely should be extended to cover lots more corner cases. These new tests pass on Windows, but should be tried on at least one unix-like platform. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | jan-manifest-tags |
Files: | files | file ages | folders |
SHA1: |
c33f02de133f6c1ceed546ec679cc39a |
User & Date: | rberteig 2016-08-05 00:46:30 |
Context
2016-08-06
| ||
16:20 | Add more tags manifest test cases. Check the manifest.tags contents updates on tagging, commit and switching branches. Tests pass successfully on OS X. check-in: 2350b068 user: jan tags: jan-manifest-tags | |
2016-08-05
| ||
00:46 | Add a basic set of tests for the manifest property, including minimal coverage of the existance of the tags manifest. This can and should be extended to cover interesting content for the tags manifest, and likely should be extended to cover lots more corner cases. These new tests pass on Windows, but should be tried on at least one unix-like platform. check-in: c33f02de user: rberteig tags: jan-manifest-tags | |
2016-08-03
| ||
15:01 | Fix working tree manifest generation/deletion to handle all cases properly. check-in: 81bf21bd user: jan tags: jan-manifest-tags | |
Changes
Added test/set-manifest.test.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# # Copyright (c) 2016 D. Richard Hipp # # This program is free software; you can redistribute it and/or # modify it under the terms of the Simplified BSD License (also # known as the "2-Clause License" or "FreeBSD License".) # # This program is distributed in the hope that it will be useful, # but without any warranty; without even the implied warranty of # merchantability or fitness for a particular purpose. # # Author contact information: # drh@hwaci.com # http://www.hwaci.com/drh/ # ############################################################################ # # Test manifest setting # # We need a respository, so let it have one. test_setup #### Verify classic behavior of the manifest setting # Setting is off by default, and there are no extra files. fossil settings manifest test "set-manifest-1" {[regexp {^manifest *$} $RESULT]} set filelist [glob -nocomplain manifest*] test "set-manifest-1-n" {[llength $filelist] == 0} # Classic behavior: TRUE value creates manifest and manifest.uuid set truths [list true on 1] foreach v $truths { fossil settings manifest $v test "set-manifest-2-$v" {$RESULT eq ""} fossil settings manifest test "set-manifest-2-$v-a" {[regexp "^manifest\\s+\\(local\\)\\s+$v\\s*$" $RESULT]} set filelist [glob manifest*] test "set-manifest-2-$v-n" {[llength $filelist] == 2} foreach f $filelist { test "set-manifest-2-$v-f-$f" {[file isfile $f]} } } # Classic behavior: FALSE value removes manifest and manifest.uuid set falses [list false off 0] foreach v $falses { fossil settings manifest $v test "set-manifest-3-$v" {$RESULT eq ""} fossil settings manifest test "set-manifest-3-$v-a" {[regexp "^manifest\\s+\\(local\\)\\s+$v\\s*$" $RESULT]} set filelist [glob -nocomplain manifest*] test "set-manifest-3-$v-n" {[llength $filelist] == 0} } # Classic behavior: unset removes manifest and manifest.uuid fossil unset manifest test "set-manifest-4" {$RESULT eq ""} fossil settings manifest test "set-manifest-4-a" {[regexp {^manifest *$} $RESULT]} set filelist [glob -nocomplain manifest*] test "set-manifest-4-n" {[llength $filelist] == 0} ##### Tags Manifest feature extends the manifest setting # Manifest Tags: use letters r, u, and t to select each of manifest, # manifest.uuid, and manifest.tags files. set truths [list r u t ru ut rt rut] foreach v $truths { fossil settings manifest $v test "set-manifest-5-$v" {$RESULT eq ""} fossil settings manifest test "set-manifest-5-$v-a" {[regexp "^manifest\\s+\\(local\\)\\s+$v\\s*$" $RESULT]} set filelist [glob manifest*] test "set-manifest-5-$v-n" {[llength $filelist] == [string length $v]} foreach f $filelist { test "set-manifest-5-$v-f-$f" {[file isfile $f]} } } # Quick check for tags applied in trunk test_file_contents "set-manifest-6" "manifest.tags" "branch=trunk\ntrunk\n" # TODO: check content of manifest.tags file under more conditions test_cleanup |