This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sharness: add t0010-basic-commands.sh
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |