Skip to content

Commit

Permalink
sharness: replace POSIX prereq with STD_ERR_MSG
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
  • Loading branch information
chriscool committed Feb 22, 2016
1 parent 2600a02 commit 3758bb5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/sharness/lib/test-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ test "$TEST_EXPENSIVE" = 1 && test_set_prereq EXPENSIVE
test "$TEST_NO_DOCKER" != 1 && type docker && test_set_prereq DOCKER

TEST_OS=$(uname -s | tr [a-z] [A-Z])
test expr "$TEST_OS" : "CYGWIN_NT" >/dev/null && test_set_prereq POSIX
expr "$TEST_OS" : "CYGWIN_NT" >/dev/null || test_set_prereq STD_ERR_MSG

if test "$TEST_VERBOSE" = 1; then
echo '# TEST_VERBOSE='"$TEST_VERBOSE"
Expand Down
4 changes: 3 additions & 1 deletion test/sharness/t0020-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ test_expect_success "ipfs init fails" '
test_must_fail ipfs init 2> init_fail_out
'

test_expect_success POSIX "ipfs init output looks good" '
# Under Windows/Cygwin the error message is different,
# so we use the STD_ERR_MSG prereq.
test_expect_success STD_ERR_MSG "ipfs init output looks good" '
echo "Error: failed to take lock at $IPFS_PATH: permission denied" > init_fail_exp &&
test_cmp init_fail_exp init_fail_out
'
Expand Down

0 comments on commit 3758bb5

Please sign in to comment.