busybox/testsuite/xargs.tests
Denys Vlasenko d5fa1a0f49 xargs: code shrink -15 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-13 03:43:43 +02:00

35 lines
629 B
Bash
Executable File

#!/bin/sh
# Copyright 2008 by Denys Vlasenko
# Licensed under GPL v2, see file LICENSE for details.
. ./testing.sh
# testing "test name" "command" "expected result" "file input" "stdin"
testing "xargs -E _ stops on underscore" \
"xargs -E _" \
"a\n" \
"" "a\n_\nb\n"
testing "xargs -E ''" \
"xargs -E ''" \
"a _ b\n" \
"" "a\n_\nb\n"
testing "xargs -e without param" \
"xargs -e" \
"a _ b\n" \
"" "a\n_\nb\n"
testing "xargs does not stop on underscore ('new' GNU behavior)" \
"xargs" \
"a _ b\n" \
"" "a\n_\nb\n"
testing "xargs -s7 can take one-char input" \
"xargs -s7" \
"a\n" \
"" "a\n"
exit $FAILCOUNT