Skip to content

Commit

Permalink
TST On Python 3 --version comes out in STDERR so test that too
Browse files Browse the repository at this point in the history
  • Loading branch information
unode committed Feb 10, 2017
1 parent e7394ce commit 5d3ade8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/bash_tap_fd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function skip_if_not_git {
}

function get_internal_version {
echo -e "grep . ${bashtap_org_pwd}/../CHANGELOG.md | head -n 1 | cut -d ' ' -f 2"
echo -e "$(grep '\.' ${bashtap_org_pwd}/../CHANGELOG.md | head -n 1 | cut -d ' ' -f 2)"
}

# Cut out the first two fields, from log as they are date and time (which would make it impossible to test ;D)
Expand Down
8 changes: 5 additions & 3 deletions tests/version.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@

CMD=$(get_script)
GIT_VERSION="git describe --tags"
EXPECTED_VERSION=$(get_internal_version)
EXPECTED_VERSION="get_internal_version"

skip_if_not_git || diff -u <(${CMD} --version || kill $$) <($GIT_VERSION)
diff -u <(cd / && ${CMD} --version || kill $$) <($EXPECTED_VERSION)
[ "x${GIT_VERSION}" != "x" ]
[ "x${EXPECTED_VERSION}" != "x" ]
skip_if_not_git || diff -u <(${CMD} --version 2>&1 || kill $$) <($GIT_VERSION)
diff -u <(cd / && ${CMD} --version 2>&1 || kill $$) <($EXPECTED_VERSION)

# vim: ai sts=4 et sw=4

0 comments on commit 5d3ade8

Please sign in to comment.