提交 fea0b940 作者: Jakub Sztandera

Replace head piping with --hash option in t0250

License: MIT
Signed-off-by: 's avatarJakub Sztandera <kubuxu@protonmail.ch>
上级 64677e75
......@@ -76,7 +76,7 @@ test_files_api() {
test_expect_success "stat --hash gives only hash" '
ipfs files stat --hash / >actual &&
head -1 stat >expected &&
head -n1 stat >expected &&
test_cmp expected actual
'
......@@ -96,7 +96,7 @@ test_files_api() {
'
test_expect_success "check root hash" '
ipfs files stat / | head -n1 > roothash
ipfs files stat --hash / > roothash
'
test_expect_success "cannot mkdir /" '
......@@ -104,7 +104,7 @@ test_files_api() {
'
test_expect_success "check root hash was not changed" '
ipfs files stat / | head -n1 > roothashafter &&
ipfs files stat --hash / > roothashafter &&
test_cmp roothash roothashafter
'
......@@ -197,7 +197,7 @@ test_files_api() {
'
test_expect_success "check root hash" '
ipfs files stat / | head -n1 > roothash
ipfs files stat --hash / > roothash
'
test_expect_success "cannot remove root" '
......@@ -205,7 +205,7 @@ test_files_api() {
'
test_expect_success "check root hash was not changed" '
ipfs files stat / | head -n1 > roothashafter &&
ipfs files stat --hash / > roothashafter &&
test_cmp roothash roothashafter
'
......@@ -303,12 +303,12 @@ test_files_api() {
'
test_expect_success "cant write to negative offset" '
ipfs files stat /cats/ipfs | head -n1 > filehash &&
ipfs files stat --hash /cats/ipfs > filehash &&
test_expect_code 1 ipfs files write --offset -1 /cats/ipfs < output
'
test_expect_success "verify file was not changed" '
ipfs files stat /cats/ipfs | head -n1 > afterhash &&
ipfs files stat --hash /cats/ipfs > afterhash &&
test_cmp filehash afterhash
'
......@@ -335,12 +335,12 @@ test_files_api() {
'
test_expect_success "cannot write to directory" '
ipfs files stat /cats | head -n1 > dirhash &&
ipfs files stat --hash /cats > dirhash &&
test_expect_code 1 ipfs files write /cats < output
'
test_expect_success "verify dir was not changed" '
ipfs files stat /cats | head -n1 > afterdirhash &&
ipfs files stat --hash /cats > afterdirhash &&
test_cmp dirhash afterdirhash
'
......@@ -363,7 +363,7 @@ test_files_api() {
'
test_expect_success "changes bubbled up to root on inspection" '
ipfs files stat / | head -n1 > root_hash
ipfs files stat --hash / > root_hash
'
test_expect_success "root hash looks good" '
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论