diff --git a/test/sharness/t0010-basic-commands.sh b/test/sharness/t0010-basic-commands.sh new file mode 100755 index 0000000000..33d3ea8de2 --- /dev/null +++ b/test/sharness/t0010-basic-commands.sh @@ -0,0 +1,29 @@ +#!/bin/sh +# +# Copyright (c) 2014 Christian Couder +# MIT Licensed; see the LICENSE file in this repository. +# + +test_description="Test installation and some basic commands" + +. lib/test-lib.sh + +test_expect_success "current dir is writable" ' + echo "It works!" >test.txt +' + +test_expect_success "ipfs version succeeds" ' + ipfs version >version.txt +' + +test_expect_success "ipfs version shows js-ipfs" ' + grep "js-ipfs" version.txt >/dev/null || + test_fsh cat version.txt +' + +test_expect_success "ipfs version output looks good" ' + egrep "^js-ipfs version: [0-9]+\.[0-9]+\.[0-9]" version.txt >/dev/null || + test_fsh cat version.txt +' + +test_done