github.com/zignig/go-ipfs@v0.0.0-20141111235910-c9e5fdf55a52/test/t0010-basic-commands.sh (about)

     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  . lib/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