Blame tests/p_which/which_fail.sh

Alice Kaerast 381eee
#!/bin/bash
Alice Kaerast 381eee
# Author: Alice Kaerast <alice@kaerast.info>
Alice Kaerast 381eee
Alice Kaerast 381eee
t_Log "Running $0 - Checking which can fails on non-existing commands"
Alice Kaerast 381eee
which abc123 2> /dev/null
Alice Kaerast 381eee
[ $? -eq 1 ] || { t_Log "Which should have exited with 1 for a non-existing file"; exit $FAIL; }
Alice Kaerast 381eee
t_CheckExitStatus $?