Fossil SCM
Trim a few trailing whitespaces.
Commit
3c44b079b527e8162845da87783358433bfe1248
Parent
0925f75a0c05f9c…
1 file changed
+14
-14
+14
-14
| --- test/set-manifest.test | ||
| +++ test/set-manifest.test | ||
| @@ -16,11 +16,11 @@ | ||
| 16 | 16 | ############################################################################ |
| 17 | 17 | # |
| 18 | 18 | # Test manifest setting |
| 19 | 19 | # |
| 20 | 20 | |
| 21 | -# We need SHA1 to effectively test the manifest files produced by | |
| 21 | +# We need SHA1 to effectively test the manifest files produced by | |
| 22 | 22 | # fossil. It looks like the one from tcllib is exactly what we need. |
| 23 | 23 | # On ActiveTcl, add it with teacup. On other platforms, YMMV. |
| 24 | 24 | # teacup install sha1 |
| 25 | 25 | package require sha1 |
| 26 | 26 | |
| @@ -41,24 +41,24 @@ | ||
| 41 | 41 | test_setup |
| 42 | 42 | |
| 43 | 43 | #### Verify classic behavior of the manifest setting |
| 44 | 44 | |
| 45 | 45 | # Setting is off by default, and there are no extra files. |
| 46 | -fossil settings manifest | |
| 46 | +fossil settings manifest | |
| 47 | 47 | test "set-manifest-1" {[regexp {^manifest *$} $RESULT]} |
| 48 | 48 | set filelist [glob -nocomplain manifest*] |
| 49 | -test "set-manifest-1-n" {[llength $filelist] == 0} | |
| 49 | +test "set-manifest-1-n" {[llength $filelist] == 0} | |
| 50 | 50 | |
| 51 | 51 | # Classic behavior: TRUE value creates manifest and manifest.uuid |
| 52 | 52 | set truths [list true on 1] |
| 53 | 53 | foreach v $truths { |
| 54 | 54 | fossil settings manifest $v |
| 55 | 55 | test "set-manifest-2-$v" {$RESULT eq ""} |
| 56 | - fossil settings manifest | |
| 56 | + fossil settings manifest | |
| 57 | 57 | test "set-manifest-2-$v-a" {[regexp "^manifest\\s+\\(local\\)\\s+$v\\s*$" $RESULT]} |
| 58 | 58 | set filelist [glob manifest*] |
| 59 | - test "set-manifest-2-$v-n" {[llength $filelist] == 2} | |
| 59 | + test "set-manifest-2-$v-n" {[llength $filelist] == 2} | |
| 60 | 60 | foreach f $filelist { |
| 61 | 61 | test "set-manifest-2-$v-f-$f" {[file isfile $f]} |
| 62 | 62 | } |
| 63 | 63 | } |
| 64 | 64 | |
| @@ -67,13 +67,13 @@ | ||
| 67 | 67 | regexp {(?m)^checkout:\s+([0-9a-f]{40})\s.*$} $RESULT ckoutline ckid |
| 68 | 68 | set uuid [string trim [read_file "manifest.uuid"]] |
| 69 | 69 | test "set-manifest-2-uuid" {$ckid eq $uuid} |
| 70 | 70 | |
| 71 | 71 | # ... which is also the SHA1 of the file "manifest" before it was |
| 72 | -# sterilized by appending an extra line when writing the file. The | |
| 72 | +# sterilized by appending an extra line when writing the file. The | |
| 73 | 73 | # extra text begins with # and is a full line, so we'll just strip |
| 74 | -# it with a brute-force substitution. This probably has the right | |
| 74 | +# it with a brute-force substitution. This probably has the right | |
| 75 | 75 | # effect even if the checkin was PGP-signed, but we don't have that |
| 76 | 76 | # setting turned on for this manifest in any case. |
| 77 | 77 | regsub {(?m)^#.*\n} [read_file "manifest"] "" manifest |
| 78 | 78 | set muuid [::sha1::sha1 $manifest] |
| 79 | 79 | test "set-manifest-2-manifest" {$muuid eq $uuid} |
| @@ -82,38 +82,38 @@ | ||
| 82 | 82 | # Classic behavior: FALSE value removes manifest and manifest.uuid |
| 83 | 83 | set falses [list false off 0] |
| 84 | 84 | foreach v $falses { |
| 85 | 85 | fossil settings manifest $v |
| 86 | 86 | test "set-manifest-3-$v" {$RESULT eq ""} |
| 87 | - fossil settings manifest | |
| 87 | + fossil settings manifest | |
| 88 | 88 | test "set-manifest-3-$v-a" {[regexp "^manifest\\s+\\(local\\)\\s+$v\\s*$" $RESULT]} |
| 89 | 89 | set filelist [glob -nocomplain manifest*] |
| 90 | - test "set-manifest-3-$v-n" {[llength $filelist] == 0} | |
| 90 | + test "set-manifest-3-$v-n" {[llength $filelist] == 0} | |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | |
| 94 | 94 | # Classic behavior: unset removes manifest and manifest.uuid |
| 95 | 95 | fossil unset manifest |
| 96 | 96 | test "set-manifest-4" {$RESULT eq ""} |
| 97 | -fossil settings manifest | |
| 97 | +fossil settings manifest | |
| 98 | 98 | test "set-manifest-4-a" {[regexp {^manifest *$} $RESULT]} |
| 99 | 99 | set filelist [glob -nocomplain manifest*] |
| 100 | -test "set-manifest-4-n" {[llength $filelist] == 0} | |
| 100 | +test "set-manifest-4-n" {[llength $filelist] == 0} | |
| 101 | 101 | |
| 102 | 102 | |
| 103 | 103 | ##### Tags Manifest feature extends the manifest setting |
| 104 | 104 | |
| 105 | 105 | # Manifest Tags: use letters r, u, and t to select each of manifest, |
| 106 | -# manifest.uuid, and manifest.tags files. | |
| 106 | +# manifest.uuid, and manifest.tags files. | |
| 107 | 107 | set truths [list r u t ru ut rt rut] |
| 108 | 108 | foreach v $truths { |
| 109 | 109 | fossil settings manifest $v |
| 110 | 110 | test "set-manifest-5-$v" {$RESULT eq ""} |
| 111 | - fossil settings manifest | |
| 111 | + fossil settings manifest | |
| 112 | 112 | test "set-manifest-5-$v-a" {[regexp "^manifest\\s+\\(local\\)\\s+$v\\s*$" $RESULT]} |
| 113 | 113 | set filelist [glob manifest*] |
| 114 | - test "set-manifest-5-$v-n" {[llength $filelist] == [string length $v]} | |
| 114 | + test "set-manifest-5-$v-n" {[llength $filelist] == [string length $v]} | |
| 115 | 115 | foreach f $filelist { |
| 116 | 116 | test "set-manifest-5-$v-f-$f" {[file isfile $f]} |
| 117 | 117 | } |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 |
| --- test/set-manifest.test | |
| +++ test/set-manifest.test | |
| @@ -16,11 +16,11 @@ | |
| 16 | ############################################################################ |
| 17 | # |
| 18 | # Test manifest setting |
| 19 | # |
| 20 | |
| 21 | # We need SHA1 to effectively test the manifest files produced by |
| 22 | # fossil. It looks like the one from tcllib is exactly what we need. |
| 23 | # On ActiveTcl, add it with teacup. On other platforms, YMMV. |
| 24 | # teacup install sha1 |
| 25 | package require sha1 |
| 26 | |
| @@ -41,24 +41,24 @@ | |
| 41 | test_setup |
| 42 | |
| 43 | #### Verify classic behavior of the manifest setting |
| 44 | |
| 45 | # Setting is off by default, and there are no extra files. |
| 46 | fossil settings manifest |
| 47 | test "set-manifest-1" {[regexp {^manifest *$} $RESULT]} |
| 48 | set filelist [glob -nocomplain manifest*] |
| 49 | test "set-manifest-1-n" {[llength $filelist] == 0} |
| 50 | |
| 51 | # Classic behavior: TRUE value creates manifest and manifest.uuid |
| 52 | set truths [list true on 1] |
| 53 | foreach v $truths { |
| 54 | fossil settings manifest $v |
| 55 | test "set-manifest-2-$v" {$RESULT eq ""} |
| 56 | fossil settings manifest |
| 57 | test "set-manifest-2-$v-a" {[regexp "^manifest\\s+\\(local\\)\\s+$v\\s*$" $RESULT]} |
| 58 | set filelist [glob manifest*] |
| 59 | test "set-manifest-2-$v-n" {[llength $filelist] == 2} |
| 60 | foreach f $filelist { |
| 61 | test "set-manifest-2-$v-f-$f" {[file isfile $f]} |
| 62 | } |
| 63 | } |
| 64 | |
| @@ -67,13 +67,13 @@ | |
| 67 | regexp {(?m)^checkout:\s+([0-9a-f]{40})\s.*$} $RESULT ckoutline ckid |
| 68 | set uuid [string trim [read_file "manifest.uuid"]] |
| 69 | test "set-manifest-2-uuid" {$ckid eq $uuid} |
| 70 | |
| 71 | # ... which is also the SHA1 of the file "manifest" before it was |
| 72 | # sterilized by appending an extra line when writing the file. The |
| 73 | # extra text begins with # and is a full line, so we'll just strip |
| 74 | # it with a brute-force substitution. This probably has the right |
| 75 | # effect even if the checkin was PGP-signed, but we don't have that |
| 76 | # setting turned on for this manifest in any case. |
| 77 | regsub {(?m)^#.*\n} [read_file "manifest"] "" manifest |
| 78 | set muuid [::sha1::sha1 $manifest] |
| 79 | test "set-manifest-2-manifest" {$muuid eq $uuid} |
| @@ -82,38 +82,38 @@ | |
| 82 | # Classic behavior: FALSE value removes manifest and manifest.uuid |
| 83 | set falses [list false off 0] |
| 84 | foreach v $falses { |
| 85 | fossil settings manifest $v |
| 86 | test "set-manifest-3-$v" {$RESULT eq ""} |
| 87 | fossil settings manifest |
| 88 | test "set-manifest-3-$v-a" {[regexp "^manifest\\s+\\(local\\)\\s+$v\\s*$" $RESULT]} |
| 89 | set filelist [glob -nocomplain manifest*] |
| 90 | test "set-manifest-3-$v-n" {[llength $filelist] == 0} |
| 91 | } |
| 92 | |
| 93 | |
| 94 | # Classic behavior: unset removes manifest and manifest.uuid |
| 95 | fossil unset manifest |
| 96 | test "set-manifest-4" {$RESULT eq ""} |
| 97 | fossil settings manifest |
| 98 | test "set-manifest-4-a" {[regexp {^manifest *$} $RESULT]} |
| 99 | set filelist [glob -nocomplain manifest*] |
| 100 | test "set-manifest-4-n" {[llength $filelist] == 0} |
| 101 | |
| 102 | |
| 103 | ##### Tags Manifest feature extends the manifest setting |
| 104 | |
| 105 | # Manifest Tags: use letters r, u, and t to select each of manifest, |
| 106 | # manifest.uuid, and manifest.tags files. |
| 107 | set truths [list r u t ru ut rt rut] |
| 108 | foreach v $truths { |
| 109 | fossil settings manifest $v |
| 110 | test "set-manifest-5-$v" {$RESULT eq ""} |
| 111 | fossil settings manifest |
| 112 | test "set-manifest-5-$v-a" {[regexp "^manifest\\s+\\(local\\)\\s+$v\\s*$" $RESULT]} |
| 113 | set filelist [glob manifest*] |
| 114 | test "set-manifest-5-$v-n" {[llength $filelist] == [string length $v]} |
| 115 | foreach f $filelist { |
| 116 | test "set-manifest-5-$v-f-$f" {[file isfile $f]} |
| 117 | } |
| 118 | } |
| 119 | |
| 120 |
| --- test/set-manifest.test | |
| +++ test/set-manifest.test | |
| @@ -16,11 +16,11 @@ | |
| 16 | ############################################################################ |
| 17 | # |
| 18 | # Test manifest setting |
| 19 | # |
| 20 | |
| 21 | # We need SHA1 to effectively test the manifest files produced by |
| 22 | # fossil. It looks like the one from tcllib is exactly what we need. |
| 23 | # On ActiveTcl, add it with teacup. On other platforms, YMMV. |
| 24 | # teacup install sha1 |
| 25 | package require sha1 |
| 26 | |
| @@ -41,24 +41,24 @@ | |
| 41 | test_setup |
| 42 | |
| 43 | #### Verify classic behavior of the manifest setting |
| 44 | |
| 45 | # Setting is off by default, and there are no extra files. |
| 46 | fossil settings manifest |
| 47 | test "set-manifest-1" {[regexp {^manifest *$} $RESULT]} |
| 48 | set filelist [glob -nocomplain manifest*] |
| 49 | test "set-manifest-1-n" {[llength $filelist] == 0} |
| 50 | |
| 51 | # Classic behavior: TRUE value creates manifest and manifest.uuid |
| 52 | set truths [list true on 1] |
| 53 | foreach v $truths { |
| 54 | fossil settings manifest $v |
| 55 | test "set-manifest-2-$v" {$RESULT eq ""} |
| 56 | fossil settings manifest |
| 57 | test "set-manifest-2-$v-a" {[regexp "^manifest\\s+\\(local\\)\\s+$v\\s*$" $RESULT]} |
| 58 | set filelist [glob manifest*] |
| 59 | test "set-manifest-2-$v-n" {[llength $filelist] == 2} |
| 60 | foreach f $filelist { |
| 61 | test "set-manifest-2-$v-f-$f" {[file isfile $f]} |
| 62 | } |
| 63 | } |
| 64 | |
| @@ -67,13 +67,13 @@ | |
| 67 | regexp {(?m)^checkout:\s+([0-9a-f]{40})\s.*$} $RESULT ckoutline ckid |
| 68 | set uuid [string trim [read_file "manifest.uuid"]] |
| 69 | test "set-manifest-2-uuid" {$ckid eq $uuid} |
| 70 | |
| 71 | # ... which is also the SHA1 of the file "manifest" before it was |
| 72 | # sterilized by appending an extra line when writing the file. The |
| 73 | # extra text begins with # and is a full line, so we'll just strip |
| 74 | # it with a brute-force substitution. This probably has the right |
| 75 | # effect even if the checkin was PGP-signed, but we don't have that |
| 76 | # setting turned on for this manifest in any case. |
| 77 | regsub {(?m)^#.*\n} [read_file "manifest"] "" manifest |
| 78 | set muuid [::sha1::sha1 $manifest] |
| 79 | test "set-manifest-2-manifest" {$muuid eq $uuid} |
| @@ -82,38 +82,38 @@ | |
| 82 | # Classic behavior: FALSE value removes manifest and manifest.uuid |
| 83 | set falses [list false off 0] |
| 84 | foreach v $falses { |
| 85 | fossil settings manifest $v |
| 86 | test "set-manifest-3-$v" {$RESULT eq ""} |
| 87 | fossil settings manifest |
| 88 | test "set-manifest-3-$v-a" {[regexp "^manifest\\s+\\(local\\)\\s+$v\\s*$" $RESULT]} |
| 89 | set filelist [glob -nocomplain manifest*] |
| 90 | test "set-manifest-3-$v-n" {[llength $filelist] == 0} |
| 91 | } |
| 92 | |
| 93 | |
| 94 | # Classic behavior: unset removes manifest and manifest.uuid |
| 95 | fossil unset manifest |
| 96 | test "set-manifest-4" {$RESULT eq ""} |
| 97 | fossil settings manifest |
| 98 | test "set-manifest-4-a" {[regexp {^manifest *$} $RESULT]} |
| 99 | set filelist [glob -nocomplain manifest*] |
| 100 | test "set-manifest-4-n" {[llength $filelist] == 0} |
| 101 | |
| 102 | |
| 103 | ##### Tags Manifest feature extends the manifest setting |
| 104 | |
| 105 | # Manifest Tags: use letters r, u, and t to select each of manifest, |
| 106 | # manifest.uuid, and manifest.tags files. |
| 107 | set truths [list r u t ru ut rt rut] |
| 108 | foreach v $truths { |
| 109 | fossil settings manifest $v |
| 110 | test "set-manifest-5-$v" {$RESULT eq ""} |
| 111 | fossil settings manifest |
| 112 | test "set-manifest-5-$v-a" {[regexp "^manifest\\s+\\(local\\)\\s+$v\\s*$" $RESULT]} |
| 113 | set filelist [glob manifest*] |
| 114 | test "set-manifest-5-$v-n" {[llength $filelist] == [string length $v]} |
| 115 | foreach f $filelist { |
| 116 | test "set-manifest-5-$v-f-$f" {[file isfile $f]} |
| 117 | } |
| 118 | } |
| 119 | |
| 120 |