@@ -26,4 +26,50 @@ test_expect_success "ipfs version output looks good" '
26
26
test_fsh cat version.txt
27
27
'
28
28
29
+ test_expect_success " ipfs version --all has all required fields" '
30
+ ipfs version --all > version_all.txt &&
31
+ grep "go-ipfs version" version_all.txt &&
32
+ grep "Repo version" version_all.txt &&
33
+ grep "System version" version_all.txt &&
34
+ grep "Golang version" version_all.txt
35
+ '
36
+
37
+ test_expect_success " ipfs help succeeds" '
38
+ ipfs help >help.txt
39
+ '
40
+
41
+ test_expect_success " ipfs help output looks good" '
42
+ egrep -i "^Usage" help.txt >/dev/null &&
43
+ egrep "ipfs .* <command>" help.txt >/dev/null ||
44
+ test_fsh cat help.txt
45
+ '
46
+
47
+ test_expect_success " 'ipfs commands' succeeds" '
48
+ ipfs commands >commands.txt
49
+ '
50
+
51
+ test_expect_success " 'ipfs commands' output looks good" '
52
+ grep "ipfs add" commands.txt &&
53
+ grep "ipfs daemon" commands.txt &&
54
+ grep "ipfs update" commands.txt
55
+ '
56
+
57
+ test_expect_success " All commands accept --help" '
58
+ while read -r cmd
59
+ do
60
+ echo "running: $cmd --help"
61
+ $cmd --help </dev/null >/dev/null || return
62
+ done <commands.txt
63
+ '
64
+
65
+ test_expect_success " 'ipfs commands --flags' succeeds" '
66
+ ipfs commands --flags >commands.txt
67
+ '
68
+
69
+ test_expect_success " 'ipfs commands --flags' output looks good" '
70
+ grep "ipfs pin add --recursive / ipfs pin add -r" commands.txt &&
71
+ grep "ipfs id --format / ipfs id -f" commands.txt &&
72
+ grep "ipfs repo gc --quiet / ipfs repo gc -q" commands.txt
73
+ '
74
+
29
75
test_done
0 commit comments