aboutsummaryrefslogtreecommitdiff
path: root/testsuite/xargs.tests
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/xargs.tests')
-rwxr-xr-xtestsuite/xargs.tests29
1 files changed, 29 insertions, 0 deletions
diff --git a/testsuite/xargs.tests b/testsuite/xargs.tests
new file mode 100755
index 0000000..3652449
--- /dev/null
+++ b/testsuite/xargs.tests
@@ -0,0 +1,29 @@
+#!/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"
+
+exit $FAILCOUNT