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
0f906596
Commit
0f906596
authored
Aug 25, 2015
by
Juan Benet
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1599 from ipfs/binary-data-and-json
Binary data and json test
parents
5301b33e
5cced6f2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
test/sharness/t0051-object-data/UTF-8-test.txt
test/sharness/t0051-object-data/UTF-8-test.txt
+0
-0
test/sharness/t0051-object.sh
test/sharness/t0051-object.sh
+21
-1
No files found.
test/sharness/t0051-object-data/UTF-8-test.txt
0 → 100644
View file @
0f906596
File added
test/sharness/t0051-object.sh
View file @
0f906596
...
...
@@ -59,7 +59,7 @@ test_object_cmd() {
echo "CumulativeSize: 18" >> expected_stat &&
test_cmp expected_stat actual_stat
'
test_expect_success
"'ipfs object put file.json' succeeds"
'
ipfs object put ../t0051-object-data/testPut.json > actual_putOut
'
...
...
@@ -111,6 +111,26 @@ test_object_cmd() {
test_cmp expected_putBrokenErr actual_putBrokenErr
'
test_expect_success
"setup: add UTF-8 test file"
'
HASH="QmNY5sQeH9ttVCg24sizH71dNbcZTpGd7Yb3YwsKZ4jiFP" &&
ipfs add ../t0051-object-data/UTF-8-test.txt >actual &&
echo "added $HASH UTF-8-test.txt" >expected &&
test_cmp expected actual
'
test_expect_success
"'ipfs object get --enc=json' succeeds"
'
ipfs object get --enc=json $HASH >utf8_json
'
test_expect_success
"'ipfs object put --inputenc=json' succeeds"
'
ipfs object put --inputenc=json <utf8_json >actual
'
test_expect_failure
"'ipfs object put --inputenc=json' output looks good"
'
echo "added $HASH" >expected &&
test_cmp expected actual
'
test_expect_success
"'ipfs object patch' should work"
'
EMPTY_DIR=$(ipfs object new unixfs-dir) &&
OUTPUT=$(ipfs object patch $EMPTY_DIR add-link foo $EMPTY_DIR)
...
...
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