@@ -9,15 +9,15 @@ test_description="Test installation and some basic commands"
9
9
. lib/test-lib.sh
10
10
11
11
test_expect_success " current dir is writable" '
12
- echo "It works!" >test.txt
12
+ echo "It works!" > test.txt
13
13
'
14
14
15
15
test_expect_success " ipfs version succeeds" '
16
- ipfs version >version.txt
16
+ ipfs version > version.txt
17
17
'
18
18
19
19
test_expect_success " ipfs version shows js-ipfs" '
20
- grep "js-ipfs" version.txt >/dev/null ||
20
+ grep "js-ipfs" version.txt > /dev/null ||
21
21
test_fsh cat version.txt
22
22
'
23
23
@@ -26,4 +26,47 @@ 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 "js-ipfs version" version_all.txt
32
+ '
33
+
34
+ test_expect_success " ipfs help succeeds" '
35
+ ipfs help > help.txt
36
+ '
37
+
38
+ # test_expect_success "ipfs help output looks good" '
39
+ # egrep -i "^Usage" help.txt > /dev/null &&
40
+ # egrep "ipfs .* <command>" help.txt >/dev/null ||
41
+ # test_fsh cat help.txt
42
+ # '
43
+
44
+ test_expect_success " 'ipfs commands' succeeds" '
45
+ ipfs commands > commands.txt
46
+ '
47
+
48
+ test_expect_success " 'ipfs commands' output looks good" '
49
+ grep "add" commands.txt &&
50
+ grep "daemon" commands.txt &&
51
+ grep "update" commands.txt
52
+ '
53
+
54
+ # test_expect_success "All commands accept --help" '
55
+ # while read -r cmd
56
+ # do
57
+ # echo "running: $cmd --help"
58
+ # $cmd --help </dev/null >/dev/null || return
59
+ # done <commands.txt
60
+ # '
61
+
62
+ # test_expect_success "'ipfs commands --flags' succeeds" '
63
+ # ipfs commands --flags >commands.txt
64
+ # '
65
+
66
+ # test_expect_success "'ipfs commands --flags' output looks good" '
67
+ # grep "ipfs pin add --recursive / ipfs pin add -r" commands.txt &&
68
+ # grep "ipfs id --format / ipfs id -f" commands.txt &&
69
+ # grep "ipfs repo gc --quiet / ipfs repo gc -q" commands.txt
70
+ # '
71
+
29
72
test_done
0 commit comments