2008-08-03 19:12:25 +00:00
|
|
|
#!/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"
|
|
|
|
|
2008-08-04 21:30:55 +00:00
|
|
|
testing "xargs -E _ stops on underscore" \
|
|
|
|
"xargs -E _" \
|
2008-08-03 19:12:25 +00:00
|
|
|
"a\n" \
|
|
|
|
"" "a\n_\nb\n"
|
|
|
|
|
2008-08-04 21:30:55 +00:00
|
|
|
testing "xargs -E ''" \
|
|
|
|
"xargs -E ''" \
|
|
|
|
"a _ b\n" \
|
|
|
|
"" "a\n_\nb\n"
|
|
|
|
|
2008-08-03 19:12:25 +00:00
|
|
|
testing "xargs -e without param" \
|
|
|
|
"xargs -e" \
|
|
|
|
"a _ b\n" \
|
|
|
|
"" "a\n_\nb\n"
|
|
|
|
|
2008-08-04 21:30:55 +00:00
|
|
|
testing "xargs does not stop on underscore ('new' GNU behavior)" \
|
|
|
|
"xargs" \
|
|
|
|
"a _ b\n" \
|
|
|
|
"" "a\n_\nb\n"
|
|
|
|
|
2008-08-03 19:12:25 +00:00
|
|
|
exit $FAILCOUNT
|