@@ -26,11 +26,7 @@ test_expect_success "'ipfs object get' succeeds" '
26
26
'
27
27
28
28
test_expect_success " 'ipfs object get' output looks good" '
29
- echo "{" > expected_getOut &&
30
- echo " \"Links\": []," >> expected_getOut &&
31
- echo " \"Data\": \"\u0008\u0002\u0012\nHello Mars\u0018\n\"" >> expected_getOut &&
32
- echo -n "}" >> expected_getOut &&
33
- test_cmp expected_getOut actual_getOut
29
+ test_cmp ../t0051-object-data/expected_getOut actual_getOut
34
30
'
35
31
36
32
test_expect_success " 'ipfs object stat' succeeds" '
@@ -46,17 +42,8 @@ echo "CumulativeSize: 18" >> expected_stat &&
46
42
test_cmp expected_stat actual_stat
47
43
'
48
44
49
- # semicool way to get json inline without much escaping
50
- objectPutJson=$( cat << EOF
51
- {
52
- "Data": "test json for sharness test"
53
- }
54
- EOF
55
- )
56
-
57
45
test_expect_success " 'ipfs object put file.json' succeeds" '
58
- echo $objectPutJson > file.json &&
59
- ipfs object put file.json > actual_putOut
46
+ ipfs object put ../t0051-object-data/testPut.json > actual_putOut
60
47
'
61
48
62
49
test_expect_success " 'ipfs object put file.json' output looks good" '
@@ -66,7 +53,7 @@ test_expect_success "'ipfs object put file.json' output looks good" '
66
53
'
67
54
68
55
test_expect_success " 'ipfs object put' from stdin succeeds" '
69
- echo $objectPutJson | ipfs object put > actual_putStdinOut
56
+ cat ../t0051-object-data/testPut.json | ipfs object put > actual_putStdinOut
70
57
'
71
58
72
59
test_expect_success " 'ipfs object put' from stdin output looks good" '
0 commit comments