summarylogtreecommitdiffstats
path: root/0001-fix-tests.patch
diff options
context:
space:
mode:
authorObserverOfTime2021-01-17 15:58:25 +0200
committerObserverOfTime2021-01-17 15:58:25 +0200
commit29d7c90f6bbacd8d5195f1a907b476f6d27d2b45 (patch)
tree2a3a9a417499820a50e759ff7f3fe63b69e2a062 /0001-fix-tests.patch
parent23e1a3c278350555b9ecc88bf086ded1aa5fb919 (diff)
downloadaur-yarn-completion-git.tar.gz
Fix pkgver & move patch to a file
Diffstat (limited to '0001-fix-tests.patch')
-rw-r--r--0001-fix-tests.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/0001-fix-tests.patch b/0001-fix-tests.patch
new file mode 100644
index 000000000000..137b40d9b4fa
--- /dev/null
+++ b/0001-fix-tests.patch
@@ -0,0 +1,41 @@
+@@ -7,27 +7,23 @@ COMPLETION_SRC="$TEST_DIR"/../yarn-completion.bash
+ # shellcheck source=./utils.sh
+ source "$TEST_DIR"/utils.sh
+
+-declare -i FALURES=0
++declare -i FAILURES=0
+
+ describe 'Environment checks'
+ {
+ it should match yarn version line in src file
+- t=$(
+- declare actual expected
+- actual=$(sed -n 's/# Yarn Version: \([^ ]*\)/\1/p' "$COMPLETION_SRC")
+- expected=$(yarn --version)
+- if [[ $actual != "${expected%-*}" ]]; then
+- prepend ' | ' <<- EOF
+- ERROR: mismatched yarn version line in src file.
+-
+- expected: ${expected%-*}
+- received: $actual
+- EOF
+- exit 1
+- fi
+- exit 0
+- )
+- passfail "$t"
++ declare actual expected
++ actual=$(sed -n 's/# Yarn Version: \([^ ]*\)/\1/p' "$COMPLETION_SRC")
++ expected=$(yarn --version)
++ if [[ $actual != "${expected%-*}" ]]; then
++ echo ..WARN
++ prepend ' | ' <<- EOF
++ WARNING: mismatched yarn version line in src file.
++
++ expected: ${expected%-*}
++ received: $actual
++ EOF
++ fi
+ }
+
+ describe 'Checking top-level commands'