Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
71575746
Commit
71575746
authored
9 years ago
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1250 from ipfs/test-cat-with-stdin
t0040: add tests for ipfs cat with stdin
parents
dcd34c6b
863f3862
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
0 deletions
+51
-0
test/sharness/t0040-add-and-cat.sh
test/sharness/t0040-add-and-cat.sh
+51
-0
No files found.
test/sharness/t0040-add-and-cat.sh
View file @
71575746
...
...
@@ -48,6 +48,22 @@ test_expect_success "ipfs cat output looks good" '
test_cmp expected actual
'
test_expect_success
"ipfs cat succeeds with stdin opened (issue #1141)"
'
cat mountdir/hello.txt | while read line; do ipfs cat "$HASH" >actual || exit; done
'
test_expect_success
"ipfs cat output looks good"
'
test_cmp expected actual
'
test_expect_success
"ipfs cat accept hash from stdin"
'
echo "$HASH" | ipfs cat >actual
'
test_expect_success
"ipfs cat output looks good"
'
test_cmp expected actual
'
test_expect_success FUSE
"cat ipfs/stuff succeeds"
'
cat "ipfs/$HASH" >actual
'
...
...
@@ -84,6 +100,41 @@ test_expect_success "'ipfs add -r' output looks good" '
test_cmp expected actual
'
test_expect_success
"ipfs cat accept many hashes from stdin"
'
{ echo "$MARS"; echo "$VENUS"; } | ipfs cat >actual
'
test_expect_success
"ipfs cat output looks good"
'
cat mountdir/planets/mars.txt mountdir/planets/venus.txt >expected &&
test_cmp expected actual
'
test_expect_success
"ipfs cat accept many hashes as args"
'
ipfs cat "$MARS" "$VENUS" >actual
'
test_expect_success
"ipfs cat output looks good"
'
test_cmp expected actual
'
test_expect_success
"ipfs cat with both arg and stdin"
'
echo "$MARS" | ipfs cat "$VENUS" >actual
'
test_expect_success
"ipfs cat output looks good"
'
cat mountdir/planets/venus.txt >expected &&
test_cmp expected actual
'
test_expect_success
"ipfs cat with two args and stdin"
'
echo "$MARS" | ipfs cat "$VENUS" "$VENUS" >actual
'
test_expect_success
"ipfs cat output looks good"
'
cat mountdir/planets/venus.txt mountdir/planets/venus.txt >expected &&
test_cmp expected actual
'
test_expect_success
"go-random is installed"
'
type random
'
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment