which.sh (471B)
- #!/bin/sh
- # SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
- # SPDX-License-Identifier: MPL-2.0
- plans=3
- WD="$(dirname "$0")"
- target="${WD}/../cmd/which"
- . "${WD}/tap.sh"
- CMD_DIR="$(realpath "${WD}/../cmd/")"
- t_cmd normal "${CMD_DIR}/which
- " env PATH="/var/empty:${CMD_DIR}" "$target" which
- t_cmd enoent "${CMD_DIR}/which
- " env PATH="/var/empty:/var/empty/enoent:${CMD_DIR}" "$target" which
- t_args slash "games/doom
- " "games/doom"