Fossil SCM

Trim a few trailing whitespaces.

jan 2016-08-12 02:55 jan-manifest-tags
Commit 3c44b079b527e8162845da87783358433bfe1248
1 file changed +14 -14
--- test/set-manifest.test
+++ test/set-manifest.test
@@ -16,11 +16,11 @@
1616
############################################################################
1717
#
1818
# Test manifest setting
1919
#
2020
21
-# We need SHA1 to effectively test the manifest files produced by
21
+# We need SHA1 to effectively test the manifest files produced by
2222
# fossil. It looks like the one from tcllib is exactly what we need.
2323
# On ActiveTcl, add it with teacup. On other platforms, YMMV.
2424
# teacup install sha1
2525
package require sha1
2626
@@ -41,24 +41,24 @@
4141
test_setup
4242
4343
#### Verify classic behavior of the manifest setting
4444
4545
# Setting is off by default, and there are no extra files.
46
-fossil settings manifest
46
+fossil settings manifest
4747
test "set-manifest-1" {[regexp {^manifest *$} $RESULT]}
4848
set filelist [glob -nocomplain manifest*]
49
-test "set-manifest-1-n" {[llength $filelist] == 0}
49
+test "set-manifest-1-n" {[llength $filelist] == 0}
5050
5151
# Classic behavior: TRUE value creates manifest and manifest.uuid
5252
set truths [list true on 1]
5353
foreach v $truths {
5454
fossil settings manifest $v
5555
test "set-manifest-2-$v" {$RESULT eq ""}
56
- fossil settings manifest
56
+ fossil settings manifest
5757
test "set-manifest-2-$v-a" {[regexp "^manifest\\s+\\(local\\)\\s+$v\\s*$" $RESULT]}
5858
set filelist [glob manifest*]
59
- test "set-manifest-2-$v-n" {[llength $filelist] == 2}
59
+ test "set-manifest-2-$v-n" {[llength $filelist] == 2}
6060
foreach f $filelist {
6161
test "set-manifest-2-$v-f-$f" {[file isfile $f]}
6262
}
6363
}
6464
@@ -67,13 +67,13 @@
6767
regexp {(?m)^checkout:\s+([0-9a-f]{40})\s.*$} $RESULT ckoutline ckid
6868
set uuid [string trim [read_file "manifest.uuid"]]
6969
test "set-manifest-2-uuid" {$ckid eq $uuid}
7070
7171
# ... 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
7373
# 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
7575
# effect even if the checkin was PGP-signed, but we don't have that
7676
# setting turned on for this manifest in any case.
7777
regsub {(?m)^#.*\n} [read_file "manifest"] "" manifest
7878
set muuid [::sha1::sha1 $manifest]
7979
test "set-manifest-2-manifest" {$muuid eq $uuid}
@@ -82,38 +82,38 @@
8282
# Classic behavior: FALSE value removes manifest and manifest.uuid
8383
set falses [list false off 0]
8484
foreach v $falses {
8585
fossil settings manifest $v
8686
test "set-manifest-3-$v" {$RESULT eq ""}
87
- fossil settings manifest
87
+ fossil settings manifest
8888
test "set-manifest-3-$v-a" {[regexp "^manifest\\s+\\(local\\)\\s+$v\\s*$" $RESULT]}
8989
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}
9191
}
9292
9393
9494
# Classic behavior: unset removes manifest and manifest.uuid
9595
fossil unset manifest
9696
test "set-manifest-4" {$RESULT eq ""}
97
-fossil settings manifest
97
+fossil settings manifest
9898
test "set-manifest-4-a" {[regexp {^manifest *$} $RESULT]}
9999
set filelist [glob -nocomplain manifest*]
100
-test "set-manifest-4-n" {[llength $filelist] == 0}
100
+test "set-manifest-4-n" {[llength $filelist] == 0}
101101
102102
103103
##### Tags Manifest feature extends the manifest setting
104104
105105
# 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.
107107
set truths [list r u t ru ut rt rut]
108108
foreach v $truths {
109109
fossil settings manifest $v
110110
test "set-manifest-5-$v" {$RESULT eq ""}
111
- fossil settings manifest
111
+ fossil settings manifest
112112
test "set-manifest-5-$v-a" {[regexp "^manifest\\s+\\(local\\)\\s+$v\\s*$" $RESULT]}
113113
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]}
115115
foreach f $filelist {
116116
test "set-manifest-5-$v-f-$f" {[file isfile $f]}
117117
}
118118
}
119119
120120
--- 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

Keyboard Shortcuts

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