-
-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1185 from MartinNowak/improve_test_output
improve test output
- Loading branch information
Showing
45 changed files
with
191 additions
and
187 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 |
---|---|---|
@@ -1,16 +1,19 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
|
||
. $(dirname "${BASH_SOURCE[0]}")/common.sh | ||
packname="0-init-fail-pack" | ||
deps="logger PACKAGE_DONT_EXIST" # would be very unlucky if it does exist... | ||
|
||
$DUB init -n $packname $deps -f json | ||
if $$DUB init -n $packname $deps -f json 2>/dev/null; then | ||
die $LINENO 'Init with unknown non-existing dependency expected to fail' | ||
fi | ||
|
||
|
||
function cleanup { | ||
rm -rf $packname | ||
} | ||
|
||
if [ -e $packname/dub.json ]; then # package is there, it should have failed | ||
cleanup | ||
exit 1 | ||
die $LINENO "$packname/dub.json was not created" | ||
fi | ||
exit 0 |
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 |
---|---|---|
@@ -1,16 +1,18 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
|
||
. $(dirname "${BASH_SOURCE[0]}")/common.sh | ||
packname="0-init-fail-pack" | ||
deps="logger PACKAGE_DONT_EXIST" # would be very unlucky if it does exist... | ||
|
||
$DUB init -n $packname $deps | ||
if $DUB init -n $packname $deps 2>/dev/null; then | ||
die $LINENO 'Init with unknown non-existing dependency expected to fail' | ||
fi | ||
|
||
function cleanup { | ||
rm -rf $packname | ||
} | ||
|
||
if [ -e $packname/dub.sdl ]; then # package is there, it should have failed | ||
cleanup | ||
exit 1 | ||
die $LINENO "$packname/dub.sdl was not created" | ||
fi | ||
exit 0 |
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
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
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
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
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
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
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
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
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
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
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
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
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
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,13 @@ | ||
SOURCE_FILE=$_ | ||
|
||
set -ueEo pipefail | ||
|
||
# lineno[, msg] | ||
function die() { | ||
local line=$1 | ||
local msg=${2:-command failed} | ||
local rc=${3:-1} | ||
>&2 echo "$SOURCE_FILE:$1 Error: $msg" | ||
exit $rc | ||
} | ||
trap 'die $LINENO' ERR |
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
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 |
---|---|---|
@@ -1,5 +1,12 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
|
||
${DUB} search 2>/dev/null && exit 1 | ||
${DUB} search nonexistent123456789package 2>/dev/null && exit 1 | ||
${DUB} search dub | grep -q '^dub' || exit 1 | ||
. $(dirname "${BASH_SOURCE[0]}")/common.sh | ||
if ${DUB} search 2>/dev/null; then | ||
die $LINENO '`dub search` succeeded' | ||
fi | ||
if ${DUB} search nonexistent123456789package 2>/dev/null; then | ||
die $LINENO '`dub search nonexistent123456789package` succeeded' | ||
fi | ||
if ! ${DUB} search dub | grep -q '^dub'; then | ||
die $LINENO '`dub search dub` failed' | ||
fi |
Oops, something went wrong.