Denis Vlasenko | cc08ad2 | 2008-08-03 19:12:25 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # Copyright 2008 by Denys Vlasenko |
| 3 | # Licensed under GPL v2, see file LICENSE for details. |
| 4 | |
Mike Frysinger | caa7940 | 2009-11-04 18:41:22 -0500 | [diff] [blame] | 5 | . ./testing.sh |
Denis Vlasenko | cc08ad2 | 2008-08-03 19:12:25 +0000 | [diff] [blame] | 6 | |
| 7 | # testing "test name" "command" "expected result" "file input" "stdin" |
| 8 | |
Denis Vlasenko | 82ad032 | 2008-08-04 21:30:55 +0000 | [diff] [blame] | 9 | testing "xargs -E _ stops on underscore" \ |
| 10 | "xargs -E _" \ |
Denis Vlasenko | cc08ad2 | 2008-08-03 19:12:25 +0000 | [diff] [blame] | 11 | "a\n" \ |
| 12 | "" "a\n_\nb\n" |
| 13 | |
Denis Vlasenko | 82ad032 | 2008-08-04 21:30:55 +0000 | [diff] [blame] | 14 | testing "xargs -E ''" \ |
| 15 | "xargs -E ''" \ |
| 16 | "a _ b\n" \ |
| 17 | "" "a\n_\nb\n" |
| 18 | |
Denis Vlasenko | cc08ad2 | 2008-08-03 19:12:25 +0000 | [diff] [blame] | 19 | testing "xargs -e without param" \ |
| 20 | "xargs -e" \ |
| 21 | "a _ b\n" \ |
| 22 | "" "a\n_\nb\n" |
| 23 | |
Denis Vlasenko | 82ad032 | 2008-08-04 21:30:55 +0000 | [diff] [blame] | 24 | testing "xargs does not stop on underscore ('new' GNU behavior)" \ |
| 25 | "xargs" \ |
| 26 | "a _ b\n" \ |
| 27 | "" "a\n_\nb\n" |
| 28 | |
Denis Vlasenko | cc08ad2 | 2008-08-03 19:12:25 +0000 | [diff] [blame] | 29 | exit $FAILCOUNT |