Fossil SCM

In json.test, look for the empty file artifact using its new SHA3 hash explicitly. This allows json-artifact-file and related tests to pass, and eliminates a cascade of false failures that had crashed the test harness.

rberteig 2017-03-16 00:38 trunk
Commit 5ad7038fa33a741610c807074f6c0ec48c0c90948bbaf4b215187a52969c7674
1 file changed +3 -1
+3 -1
--- test/json.test
+++ test/json.test
@@ -201,10 +201,12 @@
201201
202202
#### ARTIFACT
203203
204204
# sha1 of 0 bytes and a file to match in a commit
205205
set UUID_empty da39a3ee5e6b4b0d3255bfef95601890afd80709
206
+# sha3 of 0 bytes and a file to match in a commit
207
+set UUID_empty_64 a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a
206208
write_file empty ""
207209
fossil add empty
208210
fossil ci -m "empty file"
209211
210212
# json artifact (checkin)
@@ -213,11 +215,11 @@
213215
test json-artifact-checkin {[dict get $JR payload type] eq "checkin"}
214216
test_json_payload json-artifact \
215217
[concat type uuid isLeaf timestamp user comment parents tags files] {}
216218
217219
# json artifact (file)
218
-fossil_json [concat artifact $UUID_empty]
220
+fossil_json [concat artifact $UUID_empty_64]
219221
test_json_envelope_ok json-artifact-file-env
220222
test json-artifact-file {[dict get $JR payload type] eq "file"}
221223
test_json_payload json-artifact [concat type uuid size checkins] {}
222224
223225
# json artifact (wiki)
224226
--- test/json.test
+++ test/json.test
@@ -201,10 +201,12 @@
201
202 #### ARTIFACT
203
204 # sha1 of 0 bytes and a file to match in a commit
205 set UUID_empty da39a3ee5e6b4b0d3255bfef95601890afd80709
 
 
206 write_file empty ""
207 fossil add empty
208 fossil ci -m "empty file"
209
210 # json artifact (checkin)
@@ -213,11 +215,11 @@
213 test json-artifact-checkin {[dict get $JR payload type] eq "checkin"}
214 test_json_payload json-artifact \
215 [concat type uuid isLeaf timestamp user comment parents tags files] {}
216
217 # json artifact (file)
218 fossil_json [concat artifact $UUID_empty]
219 test_json_envelope_ok json-artifact-file-env
220 test json-artifact-file {[dict get $JR payload type] eq "file"}
221 test_json_payload json-artifact [concat type uuid size checkins] {}
222
223 # json artifact (wiki)
224
--- test/json.test
+++ test/json.test
@@ -201,10 +201,12 @@
201
202 #### ARTIFACT
203
204 # sha1 of 0 bytes and a file to match in a commit
205 set UUID_empty da39a3ee5e6b4b0d3255bfef95601890afd80709
206 # sha3 of 0 bytes and a file to match in a commit
207 set UUID_empty_64 a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a
208 write_file empty ""
209 fossil add empty
210 fossil ci -m "empty file"
211
212 # json artifact (checkin)
@@ -213,11 +215,11 @@
215 test json-artifact-checkin {[dict get $JR payload type] eq "checkin"}
216 test_json_payload json-artifact \
217 [concat type uuid isLeaf timestamp user comment parents tags files] {}
218
219 # json artifact (file)
220 fossil_json [concat artifact $UUID_empty_64]
221 test_json_envelope_ok json-artifact-file-env
222 test json-artifact-file {[dict get $JR payload type] eq "file"}
223 test_json_payload json-artifact [concat type uuid size checkins] {}
224
225 # json artifact (wiki)
226

Keyboard Shortcuts

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