@cryptotaxi247 / kubo / commits / 12490cb47

Add t0010-basic-commands.sh

This checks a little bit the installation and some basic commands. You can run it like that: $ cd test $ ./t0010-basic-commands.sh ok 1 - current dir is writable ok 2 - ipfs version succeeds ok 3 - ipfs version output looks good ok 4 - ipfs help succeeds ok 5 - ipfs help output looks good # passed all 5 test(s) 1..5

Christian Couder committed Oct 25, 2014 at 09:58 UTC 12490cb477786c3bce9e16eb37027b60c5b382ff
1 file changed +32
test/t0010-basic-commands.sh new
+32
@@ -0,0 +1,32 @@
1 +#!/bin/sh
2 +#
3 +# Copyright (c) 2014 Christian Couder
4 +# MIT Licensed; see the LICENSE file in this repository.
5 +#
6 +
7 +test_description="Test installation and some basic commands"
8 +
9 +. ./test-lib.sh
10 +
11 +test_expect_success "current dir is writable" '
12 + echo "It works!" >test.txt
13 +'
14 +
15 +test_expect_success "ipfs version succeeds" '
16 + ipfs version >version.txt
17 +'
18 +
19 +test_expect_success "ipfs version output looks good" '
20 + cat version.txt | egrep "^ipfs version [0-9]+\.[0-9]+\.[0-9]"
21 +'
22 +
23 +test_expect_success "ipfs help succeeds" '
24 + ipfs help >help.txt
25 +'
26 +
27 +test_expect_success "ipfs help output looks good" '
28 + cat help.txt | egrep "^Usage: +ipfs"
29 +'
30 +
31 +test_done
32 +