[PATCH] test case fixes for Solaris
Danek Duvall
danek.duvall at oracle.com
Thu Aug 22 18:17:00 CDT 2013
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
>
> - 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?
Dammit, I need to investigate more before hitting send. The one instance
in test-glog.t of diff -u is in a function which is used dozens of times,
numerous ones with actual output. Should I convert them all?
Thanks,
Danek
More information about the Mercurial-devel
mailing list