File tree 2 files changed +22
-0
lines changed
2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change
1
+
2
+ test json for sharness test
Original file line number Diff line number Diff line change @@ -52,6 +52,16 @@ test_expect_success "'ipfs object put file.json' output looks good" '
52
52
test_cmp expected_putOut actual_putOut
53
53
'
54
54
55
+ test_expect_success " 'ipfs object put file.pb' succeeds" '
56
+ ipfs object put --encoding=protobuf ../t0051-object-data/testPut.pb > actual_putOut
57
+ '
58
+
59
+ test_expect_success " 'ipfs object put file.pb' output looks good" '
60
+ HASH="QmUTSAdDi2xsNkDtLqjFgQDMEn5di3Ab9eqbrt4gaiNbUD" &&
61
+ echo -n "added $HASH" > expected_putOut &&
62
+ test_cmp expected_putOut actual_putOut
63
+ '
64
+
55
65
test_expect_success " 'ipfs object put' from stdin succeeds" '
56
66
cat ../t0051-object-data/testPut.json | ipfs object put > actual_putStdinOut
57
67
'
@@ -62,6 +72,16 @@ test_expect_success "'ipfs object put' from stdin output looks good" '
62
72
test_cmp expected_putStdinOut actual_putStdinOut
63
73
'
64
74
75
+ test_expect_success " 'ipfs object put' from stdin (pb) succeeds" '
76
+ cat ../t0051-object-data/testPut.pb | ipfs object put --inputenc=protobuf > actual_putPbStdinOut
77
+ '
78
+
79
+ test_expect_success " 'ipfs object put' from stdin (pb) output looks good" '
80
+ HASH="QmUTSAdDi2xsNkDtLqjFgQDMEn5di3Ab9eqbrt4gaiNbUD" &&
81
+ echo -n "added $HASH" > expected_putStdinOut &&
82
+ test_cmp expected_putStdinOut actual_putPbStdinOut
83
+ '
84
+
65
85
66
86
67
87
test_done
You can’t perform that action at this time.
0 commit comments