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
dacdeb10
Commit
dacdeb10
authored
9 years ago
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1285 from ipfs/t0040-stdin-add-tests
t0040: test ipfs add with stdin
parents
0d1072a8
ee3092f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
test/sharness/t0040-add-and-cat.sh
test/sharness/t0040-add-and-cat.sh
+38
-0
No files found.
test/sharness/t0040-add-and-cat.sh
View file @
dacdeb10
...
...
@@ -83,6 +83,44 @@ test_expect_success "'ipfs add -q' output looks good" '
test_cmp expected actual
'
test_expect_success
"'ipfs add -q' with stdin input succeeds"
'
echo "Hello Jupiter!" | ipfs add -q >actual
'
test_expect_success
"'ipfs add -q' output looks good"
'
HASH="QmUnvPcBctVTAcJpigv6KMqDvmDewksPWrNVoy1E1WP5fh" &&
echo "$HASH" >expected &&
test_cmp expected actual
'
test_expect_success
"'ipfs cat' succeeds"
'
ipfs cat "$HASH" >actual
'
test_expect_success
"ipfs cat output looks good"
'
echo "Hello Jupiter!" >expected &&
test_cmp expected actual
'
test_expect_success
"'ipfs add' with stdin input succeeds"
'
printf "Hello Neptune!\nHello Pluton!" | ipfs add >actual
'
test_expect_success
"'ipfs add' output looks good"
'
HASH="QmZDhWpi8NvKrekaYYhxKCdNVGWsFFe1CREnAjP1QbPaB3" &&
echo "added $HASH " >expected &&
test_cmp expected actual
'
test_expect_success
"'ipfs cat' with stdin input succeeds"
'
echo "$HASH" | ipfs cat >actual
'
test_expect_success
"ipfs cat with stdin input output looks good"
'
printf "Hello Neptune!\nHello Pluton!" >expected &&
test_cmp expected actual
'
test_expect_success
"'ipfs add -r' succeeds"
'
mkdir mountdir/planets &&
echo "Hello Mars!" >mountdir/planets/mars.txt &&
...
...
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