2008-08-04 00:42:25 +05:30
|
|
|
#!/bin/sh
|
|
|
|
# Copyright 2008 by Denys Vlasenko
|
|
|
|
# Licensed under GPL v2, see file LICENSE for details.
|
|
|
|
|
2009-11-05 05:11:22 +05:30
|
|
|
. ./testing.sh
|
2008-08-04 00:42:25 +05:30
|
|
|
|
|
|
|
# testing "test name" "command" "expected result" "file input" "stdin"
|
|
|
|
|
2008-08-05 03:00:55 +05:30
|
|
|
testing "xargs -E _ stops on underscore" \
|
|
|
|
"xargs -E _" \
|
2008-08-04 00:42:25 +05:30
|
|
|
"a\n" \
|
|
|
|
"" "a\n_\nb\n"
|
|
|
|
|
2008-08-05 03:00:55 +05:30
|
|
|
testing "xargs -E ''" \
|
|
|
|
"xargs -E ''" \
|
|
|
|
"a _ b\n" \
|
|
|
|
"" "a\n_\nb\n"
|
|
|
|
|
2008-08-04 00:42:25 +05:30
|
|
|
testing "xargs -e without param" \
|
|
|
|
"xargs -e" \
|
|
|
|
"a _ b\n" \
|
|
|
|
"" "a\n_\nb\n"
|
|
|
|
|
2008-08-05 03:00:55 +05:30
|
|
|
testing "xargs does not stop on underscore ('new' GNU behavior)" \
|
|
|
|
"xargs" \
|
|
|
|
"a _ b\n" \
|
|
|
|
"" "a\n_\nb\n"
|
|
|
|
|
2010-06-13 07:13:43 +05:30
|
|
|
testing "xargs -s7 can take one-char input" \
|
|
|
|
"xargs -s7" \
|
|
|
|
"a\n" \
|
|
|
|
"" "a\n"
|
|
|
|
|
2008-08-04 00:42:25 +05:30
|
|
|
exit $FAILCOUNT
|