yes.t (569B)
- #!/usr/bin/env cram
- # SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
- # SPDX-License-Identifier: MPL-2.0
- $ export PATH="$TESTDIR/../cmd:$PATH"
- $ test "$(command -v yes)" = "$TESTDIR/../cmd/yes"
- $ yes | head -n 3
- y
- y
- y
- $ yes foo | head -n 4
- foo
- foo
- foo
- foo
- $ yes "" | head -n 5
- $ yes foo '' | head -n 6
- foo
- foo
- foo
- foo
- foo
- foo
- $ yes "$(printf 'foo\nbar')" | head -n 4
- foo
- bar
- foo
- bar
- $ yes 2>&1 >/dev/full
- yes: Write Error: No space left on device
- [1]