# HG changeset patch # User Danek Duvall # Date 2016-03-02 22:58:29 # Node ID 869e65e68aee0135840b5920df264aacbf46d190 # Parent a5a13eeffc598c2790caa3dd32494fded4d1ac01 tests: Solaris cmp complains about empty files, even with -s When you compare an empty file, such as /dev/null, with a non-empty file, Solaris cmp complains on stderr with "cmp: EOF on /dev/null", even if the -s argument is present. GNU cmp makes the complaint, but silences it with -s. We can change the pdiff utility to simply redirect stderr to /dev/null so that we don't have to worry about this difference in the test files. diff --git a/tests/pdiff b/tests/pdiff --- a/tests/pdiff +++ b/tests/pdiff @@ -25,7 +25,7 @@ filediff(){ file2=/dev/null fi - if cmp -s "$file1" "$file2"; then + if cmp -s "$file1" "$file2" 2> /dev/null; then # Return immediately, because comparison isn't needed. This # also avoids redundant message of diff like "No differences # encountered" (on Solaris)