aboutsummaryrefslogtreecommitdiff
path: root/tests/ranking.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ranking.sh')
-rwxr-xr-xtests/ranking.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/ranking.sh b/tests/ranking.sh
index d7df451..370c61b 100755
--- a/tests/ranking.sh
+++ b/tests/ranking.sh
@@ -56,7 +56,7 @@ pick_x() {
echo "${2:-$INPUT}" | \
sh remembering \
-p "$PROFILE" \
- -c "tee -a /dev/stderr | grep '$PICK'" \
+ -c "tee -a /dev/stderr | grep \"$PICK\"" \
1>"$OUT" 2>"$ERR"
STATUS=$?
assert_status 0
@@ -66,8 +66,8 @@ pick_x() {
assert_first() {
FIRST="$(head -n1 "$ERR")"
if [ "$FIRST" != "$1" ]; then
- echo 'Previous choice did not appear at the beginning of the list'
- printf '\nexpected: %s\ngot: %s\n' "$1" "$FIRST"
+ printf '\nERR: Previous choice did not appear at the beginning of the list:\n\nexpected: %s\ngot: %s\n' \
+ "$1" "$FIRST" >&2
exit 1
fi
}
@@ -216,7 +216,6 @@ test_stdin_is_smaller_than_profile() {
echo "$BASE_PROFILE" > "$XDG_DATA_HOME/$PROFILE"
INPUT='a'
pick_x a "$INPUT"
- # echo "err is: $(cat "$ERR")"
assert_profile "$PROFILE" "$BASE_PROFILE_A_PICKED"
test_ok
}