busser-bats 0.2.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/dependabot.yml +8 -0
- data/.github/workflows/lint.yaml +9 -0
- data/.github/workflows/publish.yaml +35 -0
- data/.gitignore +1 -0
- data/.markdownlint-cli2.jsonc +7 -0
- data/.markdownlint.yaml +9 -0
- data/.rubocop.yml +11 -0
- data/.tool-versions +1 -0
- data/CHANGELOG.md +28 -0
- data/Gemfile +25 -1
- data/Guardfile +26 -0
- data/README.md +12 -8
- data/Rakefile +5 -14
- data/busser-bats.gemspec +17 -24
- data/config/cucumber.yml +1 -0
- data/config/features/plugin_install_command.feature +17 -0
- data/{features → config/features}/support/env.rb +8 -3
- data/config/features/test_command.feature +44 -0
- data/lib/busser/bats/version.rb +1 -5
- data/lib/busser/runner_plugin/bats.rb +3 -4
- data/renovate.json +8 -0
- data/vendor/bats/.travis.yml +5 -0
- data/vendor/bats/LICENSE +1 -1
- data/vendor/bats/README.md +34 -13
- data/vendor/bats/VERSION.txt +1 -1
- data/vendor/bats/bin/bats +1 -0
- data/vendor/bats/install.sh +3 -1
- data/vendor/bats/libexec/bats +4 -2
- data/vendor/bats/libexec/bats-exec-suite +3 -3
- data/vendor/bats/libexec/bats-exec-test +151 -12
- data/vendor/bats/libexec/bats-format-tap-stream +13 -6
- data/vendor/bats/libexec/bats-preprocess +6 -5
- data/vendor/bats/man/Makefile +10 -0
- data/vendor/bats/man/README.md +5 -0
- data/vendor/bats/man/bats.1 +101 -0
- data/vendor/bats/man/bats.1.ronn +109 -0
- data/vendor/bats/man/bats.7 +178 -0
- data/vendor/bats/man/bats.7.ronn +156 -0
- data/vendor/bats/package.json +9 -0
- metadata +29 -103
- data/.cane +0 -0
- data/.tailor +0 -4
- data/.travis.yml +0 -11
- data/features/plugin_install_command.feature +0 -14
- data/features/test_command.feature +0 -44
- data/vendor/bats/bin/bats +0 -140
- /data/{features → config/features}/plugin_list_command.feature +0 -0
data/vendor/bats/bin/bats
DELETED
@@ -1,140 +0,0 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
set -e
|
3
|
-
|
4
|
-
version() {
|
5
|
-
echo "Bats 0.3.1"
|
6
|
-
}
|
7
|
-
|
8
|
-
usage() {
|
9
|
-
version
|
10
|
-
echo "Usage: bats [-c] [-p | -t] <test> [<test> ...]"
|
11
|
-
}
|
12
|
-
|
13
|
-
help() {
|
14
|
-
usage
|
15
|
-
echo
|
16
|
-
echo " <test> is the path to a Bats test file, or the path to a directory"
|
17
|
-
echo " containing Bats test files."
|
18
|
-
echo
|
19
|
-
echo " -c, --count Count the number of test cases without running any tests"
|
20
|
-
echo " -h, --help Display this help message"
|
21
|
-
echo " -p, --pretty Show results in pretty format (default for terminals)"
|
22
|
-
echo " -t, --tap Show results in TAP format"
|
23
|
-
echo " -v, --version Display the version number"
|
24
|
-
echo
|
25
|
-
echo " For more information, see https://github.com/sstephenson/bats"
|
26
|
-
echo
|
27
|
-
}
|
28
|
-
|
29
|
-
resolve_link() {
|
30
|
-
$(type -p greadlink readlink | head -1) "$1"
|
31
|
-
}
|
32
|
-
|
33
|
-
abs_dirname() {
|
34
|
-
local cwd="$(pwd)"
|
35
|
-
local path="$1"
|
36
|
-
|
37
|
-
while [ -n "$path" ]; do
|
38
|
-
cd "${path%/*}"
|
39
|
-
local name="${path##*/}"
|
40
|
-
path="$(resolve_link "$name" || true)"
|
41
|
-
done
|
42
|
-
|
43
|
-
pwd
|
44
|
-
cd "$cwd"
|
45
|
-
}
|
46
|
-
|
47
|
-
expand_path() {
|
48
|
-
{ cd "$(dirname "$1")" 2>/dev/null
|
49
|
-
local dirname="$PWD"
|
50
|
-
cd "$OLDPWD"
|
51
|
-
echo "$dirname/$(basename "$1")"
|
52
|
-
} || echo "$1"
|
53
|
-
}
|
54
|
-
|
55
|
-
BATS_LIBEXEC="$(abs_dirname "$0")"
|
56
|
-
export BATS_PREFIX="$(abs_dirname "$BATS_LIBEXEC")"
|
57
|
-
export PATH="$BATS_LIBEXEC:$PATH"
|
58
|
-
|
59
|
-
options=()
|
60
|
-
arguments=()
|
61
|
-
for arg in "$@"; do
|
62
|
-
if [ "${arg:0:1}" = "-" ]; then
|
63
|
-
if [ "${arg:1:1}" = "-" ]; then
|
64
|
-
options[${#options[*]}]="${arg:2}"
|
65
|
-
else
|
66
|
-
index=1
|
67
|
-
while option="${arg:$index:1}"; do
|
68
|
-
[ -n "$option" ] || break
|
69
|
-
options[${#options[*]}]="$option"
|
70
|
-
index=$(($index+1))
|
71
|
-
done
|
72
|
-
fi
|
73
|
-
else
|
74
|
-
arguments[${#arguments[*]}]="$arg"
|
75
|
-
fi
|
76
|
-
done
|
77
|
-
|
78
|
-
unset count_flag pretty
|
79
|
-
[ -t 0 ] && [ -t 1 ] && pretty="1"
|
80
|
-
|
81
|
-
for option in "${options[@]}"; do
|
82
|
-
case "$option" in
|
83
|
-
"h" | "help" )
|
84
|
-
help
|
85
|
-
exit 0
|
86
|
-
;;
|
87
|
-
"v" | "version" )
|
88
|
-
version
|
89
|
-
exit 0
|
90
|
-
;;
|
91
|
-
"c" | "count" )
|
92
|
-
count_flag="-c"
|
93
|
-
;;
|
94
|
-
"t" | "tap" )
|
95
|
-
pretty=""
|
96
|
-
;;
|
97
|
-
"p" | "pretty" )
|
98
|
-
pretty="1"
|
99
|
-
;;
|
100
|
-
* )
|
101
|
-
usage >&2
|
102
|
-
exit 1
|
103
|
-
;;
|
104
|
-
esac
|
105
|
-
done
|
106
|
-
|
107
|
-
if [ "${#arguments[@]}" -eq 0 ]; then
|
108
|
-
usage >&2
|
109
|
-
exit 1
|
110
|
-
fi
|
111
|
-
|
112
|
-
filenames=()
|
113
|
-
for filename in "${arguments[@]}"; do
|
114
|
-
if [ -d "$filename" ]; then
|
115
|
-
shopt -s nullglob
|
116
|
-
for suite_filename in "$(expand_path "$filename")"/*.bats; do
|
117
|
-
filenames["${#filenames[@]}"]="$suite_filename"
|
118
|
-
done
|
119
|
-
shopt -u nullglob
|
120
|
-
else
|
121
|
-
filenames["${#filenames[@]}"]="$(expand_path "$filename")"
|
122
|
-
fi
|
123
|
-
done
|
124
|
-
|
125
|
-
if [ "${#filenames[@]}" -eq 1 ]; then
|
126
|
-
command="bats-exec-test"
|
127
|
-
else
|
128
|
-
command="bats-exec-suite"
|
129
|
-
fi
|
130
|
-
|
131
|
-
if [ -n "$pretty" ]; then
|
132
|
-
extended_syntax_flag="-x"
|
133
|
-
formatter="bats-format-tap-stream"
|
134
|
-
else
|
135
|
-
extended_syntax_flag=""
|
136
|
-
formatter="cat"
|
137
|
-
fi
|
138
|
-
|
139
|
-
set -o pipefail execfail
|
140
|
-
exec "$command" $count_flag $extended_syntax_flag "${filenames[@]}" | "$formatter"
|
File without changes
|