Re: [GSoC][RFC/PATCH] userdiff: added support for diffing shell scripts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Mar 24, 2019 at 9:04 AM Kapil Jain <jkapil.cs@xxxxxxxxx> wrote:
>
> On Sun, Mar 24, 2019 at 1:34 AM Christian Couder
> <christian.couder@xxxxxxxxx> wrote:
> >
> > To save some work by people who could help you, it might be a good
> > idea to show the output of the failing test, for example the output of
> > `./t4034-diff-words.sh -i -v` or `./t4034-diff-words.sh -i -v -x`.
>
> Looks like i just needed to know about -i, -v and -x switches, they
> helped in debugging.
> The problem was with the expect file. It is resolved now.

Great!

> Thanks, will be resubmitting with updated expect file.

It looks like you sent "[GSoC][RFC/PATCH 2/2] userdiff: added shell
script support, clears test". I think though that it should have been
named "[GSoC][RFC/PATCH v2] userdiff: added shell script support,
clears test".

"2/2" means that it is patch number 2 in a patch series that has 2
patches (which should be marked with "1/2" and "2/2"). When
resubmitting an already submitted patch (or patch series) we ask for a
version number like "v2", "v3", so that we can know that it has
already been submitted.

`git format-patch -v 2 ...` will automatically add "v2".

> is the parser used to parse the expect file specific to git ? or is it
> some general one ?

The test_language_driver() function used to test the regexps is
defined in t4034-diff-words.sh and it calls the word_diff() function
(also defined in t4034-diff-words.sh) which is:

word_diff () {
    test_must_fail git diff --no-index "$@" pre post >output &&
    test_decode_color <output >output.decrypted &&
    test_cmp expect output.decrypted
}

So it uses test_decode_color() and test_cmp() that are defined in
t/test-lib-functions.sh. test_cmp() in turn is defined using
GIT_TEST_CMP which is usually either "diff -u" or "diff -c".



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux