Commit Graph

3 Commits

Author SHA1 Message Date
FUJIWARA Katsunori
898fb03733 tests: make pdiff return appropriate exit code at comparison of files
Before this patch, pdiff script returns 0, even if diff is detected.

This issue doesn't cause failure of tests using it, if it is invoked
via extdiff extension, because extdiff itself examines changes between
specified revisions and decides exit code.

BTW, this patch ignores recursive comparison case, because:

  - there is no portable way for current while-read based
    implementation to return 1 at detecting changes

  - it isn't yet needed to replace direct "diff -r" invocation by
    pdiff for portability
2017-07-31 13:10:19 +09:00
Danek Duvall
9276956bbf 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.
2016-03-02 14:58:29 -08:00
FUJIWARA Katsunori
469ca8bae6 tests: use portable diff script via extdiff extension
Before this patch, some tests using external "diff" command via
extdiff extension fail on Solaris, because of incompatibility of
"diff" command and its output.

For example, system standard "diff" (= /usr/bin/diff) on Solaris
differs from GNU diff in points below:

  - "-N" (treat absent files as empty) option isn't supported

  - files are examined not in dictionary order
    (maybe, in order in storage)

This patch introduces portable diff script "pdiff" and make tests use
it via extdiff extension.

For portability of tests, this patch invokes "pdiff" script with
explicit "sh", because standard shell of runtime platform ("cmd.exe"
on Windows) is used at first to invoke external diff command.
2016-02-08 18:29:17 +09:00