File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ test_description=" Test multihash basics"
4
+
5
+ . ./lib/sharness/sharness.sh
6
+
7
+ test_expect_success " current dir is writable" '
8
+ echo "It works!" >test.txt
9
+ '
10
+
11
+ test_expect_success " multihash is available" '
12
+ type multihash
13
+ '
14
+
15
+ test_expect_success " 'multihash --help' looks good" '
16
+ multihash --help >actual 2>&1 || true &&
17
+ egrep -i "usage" actual >/dev/null
18
+ '
19
+
20
+ for opt in algorithm check encoding length quiet help
21
+ do
22
+ test_expect_success " 'multihash --help' mention -$opt option" '
23
+ egrep "[-]$opt" actual >/dev/null
24
+ '
25
+ done
26
+
27
+ test_expect_success " 'multihash test.txt' works" '
28
+ multihash test.txt >actual
29
+ '
30
+
31
+ test_expect_success " 'multihash test.txt' output looks good" '
32
+ echo "QmTwovvskpD1hzuJA8wLA73wjxSisrVknKeNvGZVyjDguU" >expected &&
33
+ test_cmp expected actual
34
+ '
35
+
36
+ test_done
37
+
38
+ # vi: set ft=sh :
You can’t perform that action at this time.
0 commit comments