xcd.sh (632B)
- #!/bin/sh
- # SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+xcd-rgb@hacktivis.me>
- # SPDX-License-Identifier: MPL-2.0
- WD=$(dirname "$0")
- set -x -e
- tempfile=$(mktemp)
- trap "rm $tempfile" EXIT
- ./xcd "${WD}/inputs/all_bytes" > "$tempfile"
- cmp -l "${WD}/outputs/all_bytes" "$tempfile"
- ./xcd - < "${WD}/inputs/all_bytes" > "$tempfile"
- cmp -l "${WD}/outputs/all_bytes" "$tempfile"
- ./xcd < "${WD}/inputs/all_bytes" > "$tempfile"
- cmp -l "${WD}/outputs/all_bytes" "$tempfile"
- ./xcd /dev/null > "$tempfile"
- cmp -l "${WD}/outputs/null" "$tempfile"
- ./xcd </dev/null > "$tempfile"
- cmp -l "${WD}/outputs/null" "$tempfile"