#!/bin/sh # Copyright (c) 2024 DTB # Copyright (c) 2024 Emma Tebibyte # SPDX-License-Identifier: FSFAP # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice and this # notice are preserved. This file is offered as-is, without any warranty. . tests/bonsai/test_env ! dj -h # Linux has a /dev/full pseudodevice useful for testing errors. case "$(uname)" in Linux) dj -Hi /dev/zero -o /dev/full 2>&1 \ | xargs -I out "$BIN"/strcmp '1+0 > 0+0; 1024 > 0' out ;; esac # Read nothing from /dev/null, write nothing to /dev/null. dj -Hi /dev/null -o /dev/null 2>&1 \ | xargs -I out "$BIN"/strcmp '0+0 > 0+0; 0 > 0' out # Test skipping stdin. #dd count=1 bs=1024 /dev/null \ # | dj -H -s 24 -o /dev/null 2>&1 \ # | xargs -I out "$BIN"/strcmp '1+0 > 1+0; 1024 > 1000' out