diff options
author | Jim Meyering <meyering@redhat.com> | 2010-02-07 12:16:34 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2010-02-07 17:18:02 +0100 |
commit | 86573d33a70248bb67567272629af9841ae2f562 (patch) | |
tree | 2162db0bfe938a288a19f2ae62d4fa66004234d9 /tests/misc/help-version | |
parent | cea6d15720ea595e313a79df55bcb6f3dea1dcc9 (diff) | |
download | coreutils-86573d33a70248bb67567272629af9841ae2f562.tar.xz |
tests: include help-version test settings used by gzip and grep
* tests/misc/help-version: ...the better to keep this file in sync.
Diffstat (limited to 'tests/misc/help-version')
-rwxr-xr-x | tests/misc/help-version | 49 |
1 files changed, 46 insertions, 3 deletions
diff --git a/tests/misc/help-version b/tests/misc/help-version index 6202dee7a..063c3ebf8 100755 --- a/tests/misc/help-version +++ b/tests/misc/help-version @@ -43,6 +43,19 @@ expected_failure_status_dir=2 expected_failure_status_ls=2 expected_failure_status_vdir=2 +expected_failure_status_cmp=2 +expected_failure_status_zcmp=2 +expected_failure_status_sdiff=2 +expected_failure_status_diff3=2 +expected_failure_status_diff=2 +expected_failure_status_zdiff=2 +expected_failure_status_zgrep=2 +expected_failure_status_zegrep=2 +expected_failure_status_zfgrep=2 + +expected_failure_status_grep=2 +expected_failure_status_egrep=2 +expected_failure_status_fgrep=2 test "$built_programs" \ || { echo "$this_test: no programs built!?!" 1>&2; Exit 1; } @@ -90,6 +103,10 @@ for lang in C fr da; do done done +bigZ_in=bigZ-in.Z +zin=zin.gz +zin2=zin2.gz + tmp=tmp-$$ tmp_in=in-$$ tmp_in2=in2-$$ @@ -123,6 +140,24 @@ cmp_args="$tmp_in $tmp_in2" # The transfer rate would vary between runs. dd_args=status=noxfer +zdiff_args="$zin $zin2" +zcmp_args="$zin $zin2" +zcat_args=$zin +gunzip_args=$zin +zmore_args=$zin +zless_args=$zin +znew_args=$bigZ_in +zforce_args=$zin +zgrep_args="z $zin" +zegrep_args="z $zin" +zfgrep_args="z $zin" +gzexe_args=$tmp_in + +# We know that $tmp_in contains a "0" +grep_args="0 $tmp_in" +egrep_args="0 $tmp_in" +fgrep_args="0 $tmp_in" + diff_args="$tmp_in $tmp_in2" sdiff_args="$tmp_in $tmp_in2" diff3_args="$tmp_in $tmp_in2 $tmp_in2" @@ -188,9 +223,17 @@ for i in $built_programs; do # Skip these. case $i in chroot|stty|tty|false|chcon|runcon) continue;; esac - rm -rf $tmp_in $tmp_in2 $tmp_dir $tmp_out - echo > $tmp_in - echo > $tmp_in2 + rm -rf $tmp_in $tmp_in2 $tmp_dir $tmp_out $bigZ_in $zin $zin2 + echo z |gzip > $zin + cp $zin $zin2 + cp $zin $bigZ_in + + # This is sort of kludgey: use numbers so this is valid input for factor, + # and two tokens so it's valid input for tsort. + echo 2147483647 0 > $tmp_in + # Make $tmp_in2 identical. Then, using $tmp_in and $tmp_in2 as arguments + # to the likes of cmp and diff makes them exit successfully. + cp $tmp_in $tmp_in2 mkdir $tmp_dir # echo ================== $i test $i = [ && prog=lbracket || prog=$i |