summaryrefslogtreecommitdiff
path: root/testsuite/xargs.tests
blob: c733630388eb1ca1908db1163d1110a5b707583f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/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