[PATCH] test case fixes for Solaris
mpm at selenic.com
Thu Aug 22 18:48:24 CDT 2013
On Thu, 2013-08-22 at 16:13 -0700, Danek Duvall wrote:
> Danek Duvall wrote:
> > Matt Mackall wrote:
> > > On Wed, 2013-08-21 at 15:14 -0700, Danek Duvall wrote:
> > > > Seems to be "diff -u" specifically when there's no difference. We could
> > > > make the rule that when you expect no difference, you use plain "diff", or
> > > > "cmp", or something, though of course when something goes wrong, and there
> > > > *is* a difference, you either get less useful output (context diffs) or no
> > > > output at all (cmp). test-command-template.t uses both cmp and diff,
> > > > running diff only if cmp finds differences.
> > >
> > > I'm not super-worried about the case where the test fails and we get
> > > weird output.
> > Okay.
> Oh, but I'm still not sure what to do for a test here, as "diff -u" is just
> fine as long as there's output; it's only if there is none that it's
> problematic. Usage is all over the place:
> - three instances of using "cmp" before "diff -u"
> - one instance of piping "diff -u" through "grep"
> - one instance of actually expecting output
This sort of thing can be replaced with cat as the files are one line.
> - three instances of expecting no output (I missed one, since the bzr tests
> aren't run on my machine)
> Seems like the simplest testable option is to convert all calls to diff to
> not use -u, remove all the cmp/grep calls, and convert the one bit of
> output to be context diffs. Does that work for you?
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel